kopia lustrzana https://github.com/OpenDroneMap/ODM
Fix --optimize-disk-space
rodzic
8b6d636abf
commit
3ca4629f08
|
@ -35,6 +35,7 @@ class ODMOpenSfMStage(types.ODM_Stage):
|
||||||
octx.extract_cameras(tree.path("cameras.json"), self.rerun())
|
octx.extract_cameras(tree.path("cameras.json"), self.rerun())
|
||||||
self.update_progress(70)
|
self.update_progress(70)
|
||||||
|
|
||||||
|
def cleanup_disk_space():
|
||||||
if args.optimize_disk_space:
|
if args.optimize_disk_space:
|
||||||
for folder in ["features", "matches", "exif", "reports"]:
|
for folder in ["features", "matches", "exif", "reports"]:
|
||||||
folder_path = octx.path(folder)
|
folder_path = octx.path(folder)
|
||||||
|
@ -47,6 +48,7 @@ class ODMOpenSfMStage(types.ODM_Stage):
|
||||||
if os.path.exists(octx.path("split_merge_stop_at_reconstruction.txt")):
|
if os.path.exists(octx.path("split_merge_stop_at_reconstruction.txt")):
|
||||||
log.ODM_INFO("Stopping OpenSfM early because we found: %s" % octx.path("split_merge_stop_at_reconstruction.txt"))
|
log.ODM_INFO("Stopping OpenSfM early because we found: %s" % octx.path("split_merge_stop_at_reconstruction.txt"))
|
||||||
self.next_stage = None
|
self.next_stage = None
|
||||||
|
cleanup_disk_space()
|
||||||
return
|
return
|
||||||
|
|
||||||
updated_config_flag_file = octx.path('updated_config.txt')
|
updated_config_flag_file = octx.path('updated_config.txt')
|
||||||
|
@ -205,6 +207,8 @@ class ODMOpenSfMStage(types.ODM_Stage):
|
||||||
if not args.skip_report:
|
if not args.skip_report:
|
||||||
octx.export_stats(self.rerun())
|
octx.export_stats(self.rerun())
|
||||||
|
|
||||||
|
cleanup_disk_space()
|
||||||
|
|
||||||
if args.optimize_disk_space:
|
if args.optimize_disk_space:
|
||||||
os.remove(octx.path("tracks.csv"))
|
os.remove(octx.path("tracks.csv"))
|
||||||
if io.file_exists(octx.recon_backup_file()):
|
if io.file_exists(octx.recon_backup_file()):
|
||||||
|
|
Ładowanie…
Reference in New Issue