Explorar el Código

Enable restart if already generated

Jérôme BUISINE hace 4 años
padre
commit
63ccc1c9e5
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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')