瀏覽代碼

Add of new global parameters

Jérôme BUISINE 4 年之前
父節點
當前提交
033ef3187b
共有 2 個文件被更改,包括 10 次插入1 次删除
  1. 3 1
      config/global_config.py
  2. 7 0
      utils/data.py

+ 3 - 1
config/global_config.py

@@ -34,4 +34,6 @@ cycle_scenes_indices            = ['E', 'I']
 
 zones_indices                   = np.arange(16)
 
-# parameters
+# parameters
+scene_image_quality_separator     = '_'
+scene_image_extension             = '.png'

+ 7 - 0
utils/data.py

@@ -32,6 +32,13 @@ def get_renderer_scenes_names(renderer_name):
         return context_vars[renderer_name + _scenes_names_prefix]
 
 
+def get_scene_image_quality(img_path):
+
+    img_postfix = img_path.split('/')[-1].split(scene_image_quality_separator)[-1]
+    img_quality = img_postfix.replace(scene_image_extension, '')
+
+    return img_quality
+
 def augmented_data_image(block, output_folder, prefix_image_name):
 
     rotations = [0, 90, 180, 270]