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

Fix camera pickling from the latest update. Restore parallelization for fitnmerge #105

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfgs/fitnmerge/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fitting:
var2d: -1.0 # depends on the detector
ransac_th: 0.75
min_percentage_inliers: 0.9
n_jobs: 1
n_jobs: 4

##############################
# merging config
Expand Down
8 changes: 3 additions & 5 deletions limap/base/camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,12 @@ double Camera::uncertainty(double depth, double var2d) const {
Camera::Camera(py::dict dict) {
// model id
int model_id_loaded;
ASSIGN_PYDICT_ITEM(dict, model_id_loaded, int);
ASSIGN_PYDICT_ITEM_TKEY(dict, model_id, model_id_loaded, int);
model_id = static_cast<colmap::CameraModelId>(model_id_loaded);

// params
std::vector<double> params_loaded;
ASSIGN_PYDICT_ITEM(dict, params_loaded, std::vector<double>);
THROW_CHECK_EQ(params_loaded.size(), params.size());
params = params_loaded;
ASSIGN_PYDICT_ITEM(dict, params, std::vector<double>);
THROW_CHECK(VerifyParams());

// other fields
ASSIGN_PYDICT_ITEM(dict, camera_id, int);
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ ruff==0.6.7
clang-format==19.1.0

./third-party/pytlsd
./third-party/Hierarchical-Localization
./third-party/DeepLSD
./third-party/GlueStick
-e ./third-party/Hierarchical-Localization