Jerome Buisine 6 лет назад
Родитель
Сommit
a1292b8c4b

+ 5 - 5
metrics_predictions/predict_noisy_image_svd_low_bits_2.py

@@ -41,15 +41,15 @@ def main():
             assert False, "unhandled option"
 
     # load of model file
-    model = joblib.load(p_model_file) 
+    model = joblib.load(p_model_file)
 
     # load image
     img = Image.open(p_img_file)
-    low_bits_2_values = metrics.get_SVD_s(image_processing.rgb_to_grey_low_bits(img, 3))
+    low_bits_2_values = metrics.get_SVD_s(image_processing.rgb_to_LAB_L_low_bits(img, 3))
 
     # check mode to normalize data
     if p_mode == 'svdne':
-        
+
         # need to read min_max_file
         file_path = os.path.join(os.path.join(os.path.dirname(__file__),'../'), min_max_file_path)
         with open(file_path, 'r') as f:
@@ -63,7 +63,7 @@ def main():
     else:
         l_values = low_bits_2_values
 
-    
+
     # get interval values
     begin, end = p_interval
     test_data = l_values[begin:end]
@@ -75,4 +75,4 @@ def main():
 
 
 if __name__== "__main__":
-    main()
+    main()

+ 5 - 5
metrics_predictions/predict_noisy_image_svd_low_bits_3.py

@@ -41,15 +41,15 @@ def main():
             assert False, "unhandled option"
 
     # load of model file
-    model = joblib.load(p_model_file) 
+    model = joblib.load(p_model_file)
 
     # load image
     img = Image.open(p_img_file)
-    low_bits_3_values = metrics.get_SVD_s(image_processing.rgb_to_grey_low_bits(img, 7))
+    low_bits_3_values = metrics.get_SVD_s(image_processing.rgb_to_LAB_L_low_bits(img, 7))
 
     # check mode to normalize data
     if p_mode == 'svdne':
-        
+
         # need to read min_max_file
         file_path = os.path.join(os.path.join(os.path.dirname(__file__),'../'), min_max_file_path)
         with open(file_path, 'r') as f:
@@ -63,7 +63,7 @@ def main():
     else:
         l_values = low_bits_3_values
 
-    
+
     # get interval values
     begin, end = p_interval
     test_data = l_values[begin:end]
@@ -75,4 +75,4 @@ def main():
 
 
 if __name__== "__main__":
-    main()
+    main()

+ 5 - 5
metrics_predictions/predict_noisy_image_svd_low_bits_4.py

@@ -41,15 +41,15 @@ def main():
             assert False, "unhandled option"
 
     # load of model file
-    model = joblib.load(p_model_file) 
+    model = joblib.load(p_model_file)
 
     # load image
     img = Image.open(p_img_file)
-    low_bits_4_values = metrics.get_SVD_s(image_processing.rgb_to_grey_low_bits(img))
+    low_bits_4_values = metrics.get_SVD_s(image_processing.rgb_to_LAB_L_low_bits(img))
 
     # check mode to normalize data
     if p_mode == 'svdne':
-        
+
         # need to read min_max_file
         file_path = os.path.join(os.path.join(os.path.dirname(__file__),'../'), min_max_file_path)
         with open(file_path, 'r') as f:
@@ -63,7 +63,7 @@ def main():
     else:
         l_values = low_bits_4_values
 
-    
+
     # get interval values
     begin, end = p_interval
     test_data = l_values[begin:end]
@@ -75,4 +75,4 @@ def main():
 
 
 if __name__== "__main__":
-    main()
+    main()