瀏覽代碼

Enable restart if already generated

Jérôme BUISINE 3 年之前
父節點
當前提交
63ccc1c9e5
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      run/run_all_estimators.py

+ 5 - 1
run/run_all_estimators.py

@@ -34,7 +34,11 @@ def main():
                     os.makedirs(output_folder)
 
                 outfilename = os.path.join(output_folder, scene + '_10000.rawls')
-                os.system('./build/main/extract_stats_images --folder {0} --bwidth {1} --bheight {2} --outfile {3} --estimator {4}'.format(scene_path, x_tile, y_tile, est, outfilename))
+
+                if not os.path.exists(outfilename):
+                    os.system('./build/main/extract_stats_images --folder {0} --bwidth {1} --bheight {2} --outfile {3} --estimator {4}'.format(scene_path, x_tile, y_tile, est, outfilename))
+                else:
+                    print('Already generated')