Skip submodels with no reconstruction

pull/753/head
Pau Gargallo 2017-05-17 11:36:18 +02:00 zatwierdzone przez Dakota Benjamin
rodzic 8eb4041cc1
commit a08dd96e82
3 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -1,5 +1,9 @@
#!/usr/bin/env bash
RUNPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/../..
export PYTHONPATH=$RUNPATH/SuperBuild/install/lib/python2.7/dist-packages:$RUNPATH/SuperBuild/src/opensfm:$PYTHONPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNPATH/SuperBuild/install/lib
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

Wyświetl plik

@ -36,6 +36,12 @@ class DenseReconstructor:
unaligned = os.path.join(opensfm_submodel_path, 'reconstruction.unaligned.json')
aligned = os.path.join(opensfm_submodel_path, 'reconstruction.aligned.json')
main = os.path.join(opensfm_submodel_path, 'reconstruction.json')
if not os.path.isfile(aligned):
logger.warning("No SfM reconstruction for submodel {}."
" Skipping submodel.".format(submodel_path))
return
if not os.path.isfile(unaligned):
os.rename(main, unaligned)
if not os.path.islink(main):

Wyświetl plik

@ -22,4 +22,4 @@ if __name__ == "__main__":
command = os.path.join(context.opensfm_path, 'bin', 'opensfm')
path = os.path.join(args.dataset, 'opensfm')
run_command([command, 'create_submodels', path, '--size', '20', '--dist', '20'])
run_command([command, 'create_submodels', path])