kopia lustrzana https://github.com/OpenDroneMap/ODM
Refactor optimize-disk-space fix
rodzic
1287f09bc3
commit
ee2d82fdd8
|
@ -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)
|
||||
|
|
|
@ -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)
|
Ładowanie…
Reference in New Issue