Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck in levenberg_marquardt_strategy.cc loop for hours #2550

Open
eyildiz-ugoe opened this issue May 2, 2024 · 1 comment
Open

Stuck in levenberg_marquardt_strategy.cc loop for hours #2550

eyildiz-ugoe opened this issue May 2, 2024 · 1 comment

Comments

@eyildiz-ugoe
Copy link

eyildiz-ugoe commented May 2, 2024

I have instructed a 3d reconstruction and it appears that it got stuck in LM strategy. My images had low number of features so I get why, but I must admit it's quite annoying that it spends hours just to fail afterwards. I see the below output only:

W0502 12:15:06.755776 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:06.829160 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:07.077844 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:07.153908 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:07.314445 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:07.474033 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:07.546308 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:07.792928 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:07.953227 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.028833 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.191509 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.351476 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.512042 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.585132 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.747380 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.907179 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:08.979694 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:09.314721 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:09.387681 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:09.548218 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:09.708550 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:09.784186 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.
W0502 12:15:10.031780 58541 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: CHOLMOD warning: Matrix not positive definite.

Is there a way to prevent this from happening? It kinda jeopardizes the whole reconstruction effort. Here is the command I use to launch the extraction:

run(colmap, f"feature_extractor --database_path '{work_dir}'/database.db --image_path '{work_dir}'/masked_images --ImageReader.single_camera 1 --ImageReader.camera_model PINHOLE --SiftExtraction.estimate_affine_shape=true --SiftExtraction.domain_size_pooling=true --SiftExtraction.use_gpu=true --SiftExtraction.gpu_index=" + str(gpu_index))

BTW it uses only 1 core of my machine while trying this. Ubuntu 22.04, GCC 10, as instructed.

Any idea what's going on?

@jytime
Copy link

jytime commented May 2, 2024

It looks the correspondences (2D matches) are noisy and cannot lead to a reasonable solution. You can check libraries like hloc about how to use better detecting and matching methods instead of sift+NN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants