Forum

Author Topic: Camera undistortion on GPU for 3D Gaussian splatting  (Read 3301 times)

nsv

  • Newbie
  • *
  • Posts: 1
    • View Profile
Camera undistortion on GPU for 3D Gaussian splatting
« on: October 06, 2025, 11:58:54 PM »
I train a lot of 3D Gaussian Splatting models, and I really enjoy using Metashape for the camera alignment step. The new flow you added works perfectly!
Code: [Select]
File -> Export -> Export Cameras -> Colmap
However it takes a few hours to undistort 10k images because it's running on CPU.

I played with this script before:
https://github.com/agisoft-llc/metashape-scripts/blob/742390273f2fd107523a6367cd4d8471bf9d0c62/src/export_for_gaussian_splatting.py

and I can see that the slowest part is the warp operation:
Code: [Select]
img = cam.image().warp(calib0, T, calib1, T1)everything else is fast.

1. It would be amazing if you could help implementing the warp operation on GPU!

2. Alternatively, could you please hint how the warp is implemented so I could implement the GPU version (with batching) myself? I guess it uses Brown-Conrady model.

Thank you so much for your help!