Skip to content

Cherry-pick changes for 4.0.2 release#4259

Merged
ahojnnes merged 4 commits into
release/4.0from
user/jsch/release-4.0.2
Mar 18, 2026
Merged

Cherry-pick changes for 4.0.2 release#4259
ahojnnes merged 4 commits into
release/4.0from
user/jsch/release-4.0.2

Conversation

@ahojnnes

Copy link
Copy Markdown
Contributor

No description provided.

B1ueber2y and others added 4 commits March 18, 2026 10:23
## Summary

Looks like the python bindings don't pass through the `RequiresRGB()`
option from the extraction options. This causes an exception when trying
to use the ALIKED feature extractor.

```
E20260318 00:15:30.424098 938475 aliked.cc:166] Check failed: bitmap.IsRGB()
terminate called after throwing an instance of 'std::invalid_argument'
```


## Reproducing

Using colmap built from source with `-DONNX_ENABLED=ON`, this will fail


```python
from argparse import ArgumentParser
from pathlib import Path

import pycolmap


def main():
    parser = ArgumentParser()
    parser.add_argument("image_path")
    parser.add_argument("--database-path", default="database.db")
    args = parser.parse_args()

    image_path = Path(args.image_path)
    image_dir = image_path if image_path.is_dir() else image_path.parent
    image_names = [] if image_path.is_dir() else [image_path.name]

    pycolmap.extract_features(
        database_path=args.database_path,
        image_path=str(image_dir),
        image_names=image_names,
        extraction_options=pycolmap.FeatureExtractionOptions(
            type=pycolmap.FeatureExtractorType.ALIKED_N16ROT,
        ),
    )


if __name__ == "__main__":
    main()
```

however running it from the cli will succeed

```
./bin/colmap feature_extractor --database_path database.db --image_path ./imgs  --FeatureExtraction.type ALIKED_N16ROT
```

## AI Disclaimer

FWIW Codex found this bug and suggested the fix.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Johannes Schönberger <jsch@demuc.de>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request prepares for the COLMAP 4.0.2 release by updating version numbers across the project and incorporating several critical bug fixes. The changes primarily focus on improving the robustness of ALIKED feature extraction, both in the core library and its Python bindings, and ensuring correct state management for mesh simplification options.

Highlights

  • Version Update: The project version has been updated to 4.0.2 across CMake, documentation, and Python package configurations.
  • ALIKED Keypoint Filtering Fix: Implemented a fix for ALIKED keypoint score filtering, ensuring that keypoints below a specified minimum score are correctly excluded during extraction.
  • Mesh Simplification Reset: Addressed an issue where mesh simplification options were not being reset properly in the option manager.
  • PyCOLMAP ALIKED Extraction Fix: Corrected ALIKED feature extraction within pycolmap by ensuring the image reader properly handles RGB requirements.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the project to version 4.0.2, incorporating several bug fixes. Key changes include the implementation of ALIKED keypoint score filtering, ensuring correct image reading for ALIKED feature extraction in pycolmap, and addressing a missing reset option for mesh simplification. The test suite for ALIKED feature extraction has also been enhanced to provide more robust verification of the min_score parameter. All modifications align with the stated objectives of the release and appear to be correctly implemented.

@ahojnnes ahojnnes enabled auto-merge (squash) March 18, 2026 09:43
@ahojnnes ahojnnes merged commit d927f7e into release/4.0 Mar 18, 2026
14 checks passed
@ahojnnes ahojnnes deleted the user/jsch/release-4.0.2 branch March 18, 2026 10:29
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.

5 participants