Full pipeline rerun test

pull/1467/head
Piero Toffanin 2022-06-15 16:14:17 -04:00
rodzic e80b89a055
commit 7da3e19e6d
2 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -73,6 +73,12 @@ class OSFMContext:
if not io.file_exists(rs_file) or rerun:
self.run('rs_correct --output reconstruction.json --output-tracks tracks.csv')
log.ODM_INFO("Re-running the reconstruction pipeline")
self.match_features(True)
self.create_tracks(True)
self.reconstruct(rolling_shutter_correct=False, rerun=True)
self.touch(rs_file)
else:
log.ODM_WARNING("Rolling shutter correction already applied")
@ -381,7 +387,6 @@ class OSFMContext:
def feature_matching(self, rerun=False):
features_dir = self.path("features")
matches_dir = self.path("matches")
if not io.dir_exists(features_dir) or rerun:
try:
@ -399,6 +404,10 @@ class OSFMContext:
else:
log.ODM_WARNING('Detect features already done: %s exists' % features_dir)
self.match_features(rerun)
def match_features(self, rerun=False):
matches_dir = self.path("matches")
if not io.dir_exists(matches_dir) or rerun:
self.run('match_features')
else:

Wyświetl plik

@ -105,8 +105,9 @@ class ODMSplitStage(types.ODM_Stage):
log.ODM_INFO("Reconstructing %s" % sp)
local_sp_octx = OSFMContext(sp)
local_sp_octx.create_tracks(self.rerun())
local_sp_octx.reconstruct(self.rerun())
local_sp_octx.reconstruct(args.rolling_shutter, self.rerun())
else:
# TODO: pass rolling shutter param here
lre = LocalRemoteExecutor(args.sm_cluster, self.rerun())
lre.set_projects([os.path.abspath(os.path.join(p, "..")) for p in submodel_paths])
lre.run_reconstruction()