Closed jlegrand62 closed 4 years ago
ColmapRunner can be used as follow:
from romiscan.colmap import ColmapRunner
from romidata import FSDB
db = FSDB("/data/ROMI/DB")
db.connect()
dataset = db.get_scan("2018-12-17_17-05-35")
fs = dataset.get_fileset('images')
cli_args = {"feature_extractor": {"--ImageReader.single_camera": "1", "--SiftExtraction.use_gpu": "1"}, "exhaustive_matcher": {"--SiftMatching.use_gpu": "1"}, "model_aligner": {"--robust_alignment_max_error": "10"}}
bbox = fs.get_metadata("bounding_box")
if bbox is None: bbox = fs.scan.get_metadata('workspace')
if bbox is None: bbox = fs.scan.get_metadata('scanner')['workspace']
colmap = ColmapRunner(fs, "exhaustive", False, cli_args, True, "", bbox)
colmap.colmap_feature_extractor()
colmap.colmap_matcher()
colmap.colmap_mapper()
colmap.colmap_model_aligner()
# To run them all at once and get variables:
points, images, cameras, sparse_pcd, dense_pcd, bounding_box = colmap.run()
Aucun changement pour l'utilisation par luigi.
Par contre ColmapRunner
est désormais appelable manuellement depuis Python.
Can be initialized manually & not only used with the 'run' method. TODO: close log file handler & clean temporary workdir?
close #61