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