Browse Source

Add of new method for postfix image name

Jérôme BUISINE 11 months ago
parent
commit
32f474bf88
2 changed files with 9 additions and 1 deletions
  1. 0 1
      config/global_config.py
  2. 9 0
      utils/data.py

+ 0 - 1
config/global_config.py

@@ -14,7 +14,6 @@ learned_zones_folder            = 'learned_zones'
 # files or extensions
 csv_model_comparisons_filename  = 'models_comparisons.csv'
 seuil_expe_filename             = 'seuilExpe'
-config_filename                 = 'config'
 min_max_filename_extension      = '_min_max_values'
 
 # variables 

+ 9 - 0
utils/data.py

@@ -41,6 +41,15 @@ def get_scene_image_quality(img_path):
     return int(img_quality)
 
 
+def get_scene_image_postfix(img_path):
+
+    # if path getting last element (image name) and extract quality
+    img_postfix = img_path.split('/')[-1].split(scene_image_quality_separator)[-1]
+    img_quality = img_postfix.replace(scene_image_extension, '')
+
+    return img_quality
+
+
 def get_scene_image_prefix(img_path):
 
     # if path getting last element (image name) and extract prefix