Skip to content

Conversation

@ahojnnes
Copy link
Contributor

  • Adds multi-threading support for pano re-rendering.
  • Exposes different tiling mechanisms as CLI options.
  • Fixes an issue related to swapping of x/y coordinates. This wasn't an issue before with identical width/height of the re-rendered pano images but otherwise led to incorrect width/height in the output images.

@ahojnnes ahojnnes requested review from B1ueber2y and sarlinpe July 21, 2025 13:45
Copy link
Member

@sarlinpe sarlinpe left a comment

Choose a reason for hiding this comment

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

Thank you! I did not make the rendering multi-threaded because cv2.remap is already multi-threaded and saturates all cores on my machine. Additionally, Python multi-threading only helps with I/O because of the GIL. Does this update really make a difference?

@ahojnnes
Copy link
Contributor Author

Thank you! I did not make the rendering multi-threaded because cv2.remap is already multi-threaded and saturates all cores on my machine. Additionally, Python multi-threading only helps with I/O because of the GIL. Does this update really make a difference?

The speedup on my machine is significant (~0.5 x #threads), because of:

  • cv2.remap is not multi-threaded on my machine
  • I/O alone takes ~30% of runtime
  • most numpy and opencv functions release the gil

@ahojnnes ahojnnes enabled auto-merge (squash) July 30, 2025 09:37
@ahojnnes ahojnnes merged commit 3c6c49c into main Jul 30, 2025
14 checks passed
@ahojnnes ahojnnes deleted the user/jsch/pano-sfm-improvements branch July 30, 2025 10:27
tavislocus pushed a commit to tavislocus/colmap_6dof that referenced this pull request Aug 19, 2025
* Adds multi-threading support for pano re-rendering.
* Exposes different tiling mechanisms as CLI options.
* Fixes an issue related to swapping of x/y coordinates. This wasn't an
issue before with identical width/height of the re-rendered pano images
but otherwise led to incorrect width/height in the output images.
@yunhua-deng
Copy link

"Adds multi-threading support for pano re-rendering." It seems like the multi-threading does not work in Windows, and max_workers must be 1, otherwise the processing will stuck silently.

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.

4 participants