nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

Colmap preprocess data resulting in low pose matches due to global bundle adjust tolerance

Open dlazares opened this issue 1 year ago • 2 comments

Running nerfstudio v1.0.2 colmap (v3.10) preprocess data on a dataset I know gives good colmap matches. I was surprised to see less than 5% matches so I investigated deeper. It seems that multiple models are created sparse/0 and sparse/1 with the first only having a handful of the images and the second model having all of them. I thought that was strange so I re-ran the commands in run_colmap by hand. I found that running with --Mapper.ba_global_function_tolerance=1e-6 created the two models whereas running without created a single model under sparse/0. I originally ran this on colmap 3.10 but also tested it on colmap 3.9.1. image

dlazares avatar Mar 08 '24 07:03 dlazares

This happens to me a lot as well, would changing the tolerance back to default(0) in colmap_utils.py fix this?

KevinOPG avatar Mar 14 '24 15:03 KevinOPG

right now I just manully go through the colmap folder in the output to see which model is the largest and use the colmap_to_json script to make the transfrom.json.

from nerfstudio.process_data import colmap_utils
from pathlib import Path
colmap_utils.colmap_to_json(recon_dir=Path("path to the camera and image.bin"), output_dir=Path("path to sparse_pc.ply"))

KevinOPG avatar Mar 15 '24 18:03 KevinOPG

@KevinOPG that solution worked for me. Thanks!

AidanNelson avatar Jun 12 '24 14:06 AidanNelson