colmap / glomap

GLOMAP - Global Structured-from-Motion Revisited
BSD 3-Clause "New" or "Revised" License
1.3k stars 76 forks source link

GLOMAP is NOT parsing some of the input options #91

Open alejandrofontan opened 2 weeks ago

alejandrofontan commented 2 weeks ago

Hi,

I've been evaluating the behavior of GLOMAP when modifying some of the input parameters. I was surprised to find that, for some parameters, the performance of GLOMAP doesn't change at all, even when I input highly degraded configurations. For example:

glomap mapper \
    --database_path ${database} \
    --image_path ${rgb_path} \
    --output_path ${exp_folder_colmap} \
    --skip_view_graph_calibration 1 \
    --BundleAdjustment.optimize_intrinsics 0 \
    --BundleAdjustment.thres_loss_function 100000.0

After digging into the code, I suspect that some of these parameters are not being properly parsed. For instance, in glomap/glomap/estimators/bundle_adjustment.h:

BundleAdjusterOptions() : OptimizationBaseOptions() {
    thres_loss_function = 1.;
    loss_function = std::make_shared<ceres::HuberLoss>(thres_loss_function);
    solver_options.max_num_iterations = 200;
}

The thres_loss_function value is hard-coded there. Additionally, I suspect that even if I comment out that line, it won't work since the loss_function is set up before the thres_loss_function is parsed in exe/global_mapper.cc.

Could you help me confirm if my understanding is correct?

Thanks,