Skip to content

Conversation

@StonerLing
Copy link
Contributor

@StonerLing StonerLing commented Jul 17, 2025

This PR adds a random_seed parameter to RANSACOptions for deterministic results in multithreaded environments.

  • random_seed = -1 (default) preserves the original nondeterministic behavior.
  • Setting it to a fixed value makes estimation deterministic and reproducible.
  • Currently applied and tested only in TwoViewGeometry estimation.

Copy link
Contributor

@ahojnnes ahojnnes left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM apart from a few minor comments.

@StonerLing StonerLing force-pushed the feature/ransac-random-seed branch from 0391e71 to f527c0f Compare July 21, 2025 01:47
@ahojnnes ahojnnes merged commit ad9b244 into colmap:main Jul 21, 2025
14 checks passed
@StonerLing StonerLing deleted the feature/ransac-random-seed branch July 21, 2025 10:11
@ew-pallon
Copy link

Thanks for this contribution, I was just looking for this!

Do you already know when this will be available as part of an official release?

tavislocus pushed a commit to tavislocus/colmap_6dof that referenced this pull request Aug 19, 2025
…try estimation (colmap#3492)

This PR adds a `random_seed` parameter to `RANSACOptions` for
deterministic results in multithreaded environments.
- `random_seed = -1` (default) preserves the original nondeterministic
behavior.
- Setting it to a fixed value makes estimation deterministic and
reproducible.
- Currently applied and tested only in `TwoViewGeometry` estimation.

---------

Co-authored-by: StonerLing <sisyphus.stoner@outlook.com>
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.

3 participants