Skip to content

Fix LBD multiscale descriptor NPZ serialization - #169

Merged
B1ueber2y merged 3 commits into
cvg:mainfrom
Javgilavi:javier/fix-lbd-npz-object-array
Sep 30, 2026
Merged

B1ueber2y merged 3 commits into
cvg:mainfrom
Javgilavi:javier/fix-lbd-npz-object-array

Conversation

@Javgilavi

Copy link
Copy Markdown
Contributor

LBD extraction currently returns multiscale line tuples as a nested Python list. When save_descinfo() passes that list to np.savez, NumPy tries to make a homogeneous array and raises ValueError for the ragged (scale, line) entries. This prevented descriptor caching during a LIMAP line-map run.

Store the multiscale lines in a one-dimensional object array before returning the descriptor info. The list passed to pytlbd.lbd_multiscale_pyr is unchanged, and the saved array still gives the nested list expected by LBDMatcher after .tolist().

The new CI-marked test exercises extraction, NPZ save/load, and the nested line values. It fails at np.savez before the fix and passes with the fix on NumPy 1.26.4. Ruff lint and format checks pass. I used an isolated Python-module test harness locally because my available compiled LIMAP binary is from v1.0.0 and is incompatible with current main; the full upstream build is left to CI.

Prepared with OpenAI Codex.

Store ragged multiscale line tuples in a one-dimensional object array before saving NPZ descriptors. Add a roundtrip regression test for the extractor cache.

Prepared with OpenAI Codex.

@B1ueber2y B1ueber2y left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@B1ueber2y
B1ueber2y enabled auto-merge (squash) September 30, 2026 06:45
@B1ueber2y
B1ueber2y disabled auto-merge September 30, 2026 06:47
@B1ueber2y
B1ueber2y enabled auto-merge (squash) September 30, 2026 06:52
@B1ueber2y
B1ueber2y merged commit 8033773 into cvg:main Sep 30, 2026
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants