Refactor optimize-disk-space fix

pull/1209/head
Piero Toffanin 2020-11-21 13:21:10 -05:00
rodzic 1287f09bc3
commit ee2d82fdd8
2 zmienionych plików z 14 dodań i 5 usunięć

Wyświetl plik

@ -83,14 +83,14 @@ class ODMOpenMVSStage(types.ODM_Stage):
if args.optimize_disk_space:
files = [scene_dense,
os.path.join(tree.openmvs, 'scene_dense.ply'),
os.path.join(tree.openmvs, 'scene_dense_dense_filtered.mvs')]
os.path.join(tree.openmvs, 'scene_dense_dense_filtered.mvs'),
octx.path("undistorted", "tracks.csv"),
octx.path("undistorted", "reconstruction.json")
]
for f in files:
if os.path.exists(f):
os.remove(f)
shutil.rmtree(depthmaps_dir)
os.remove(octx.path("undistorted", "tracks.csv"))
os.remove(octx.path("undistorted", "reconstruction.json"))
else:
log.ODM_WARNING('Found a valid OpenMVS reconstruction file in: %s' %
tree.openmvs_model)

Wyświetl plik

@ -135,4 +135,13 @@ class ODMOpenSfMStage(types.ODM_Stage):
if io.dir_exists(octx.path("undistorted", "depthmaps")):
files = glob.glob(octx.path("undistorted", "depthmaps", "*.npz"))
for f in files:
os.remove(f)
os.remove(f)
# Keep these if using OpenMVS
if args.fast_orthophoto or args.use_opensfm_dense:
files = [octx.path("undistorted", "tracks.csv"),
octx.path("undistorted", "reconstruction.json")
]
for f in files:
if os.path.exists(f):
os.remove(f)