From 6fde9aef6790cb76bdb8aa6c053f53e617600558 Mon Sep 17 00:00:00 2001 From: Pau Gargallo Date: Tue, 16 May 2017 15:51:10 +0200 Subject: [PATCH] Mark matching as done --- scripts/metadataset/run_reconstructions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/metadataset/run_reconstructions.py b/scripts/metadataset/run_reconstructions.py index ab334399..4df11b2b 100644 --- a/scripts/metadataset/run_reconstructions.py +++ b/scripts/metadataset/run_reconstructions.py @@ -36,6 +36,8 @@ class Reconstructor: run_command([self.command, 'detect_features', submodel_path]) run_command([self.command, 'match_features', submodel_path]) + self._set_matching_done(submodel_path) + run_command([self.command, 'create_tracks', submodel_path]) run_command([self.command, 'reconstruct', submodel_path]) @@ -43,6 +45,12 @@ class Reconstructor: logger.info("Submodel {} reconstructed".format(submodel_path)) logger.info("=======================================================") + def _set_matching_done(self, submodel_path): + """Tell ODM's opensfm not to rerun matching.""" + matching_done_file = os.path.join(submodel_path, 'matching_done.txt') + with open(matching_done_file, 'w') as fout: + fout.write("Matching done!\n") + if __name__ == "__main__": parser = argparse.ArgumentParser(description='Reconstruct all submodels')