Skip to content

Commit

Permalink
Fix camera pickling from the latest update. Restore parallelization f…
Browse files Browse the repository at this point in the history
…or fitnmerge (#105)
  • Loading branch information
B1ueber2y authored Nov 29, 2024
1 parent 6b5a6f0 commit 09e4fca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
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

0 comments on commit 09e4fca

Please sign in to comment.