gsplat icon indicating copy to clipboard operation
gsplat copied to clipboard

Unable to train .ply data created using colmap with fisheye

Open BelugaIsCute opened this issue 2 months ago • 0 comments

I used colmap to convert a fisheye image into point cloud data (fused.ply), and when I tried to load it into simpletrainer.py, it didn't run. (training was successful with the .ply created with pinhole.)

I did in colmap: colmap automatic_reconstructor \ --workspace_path path\to\workspace\ --image_path path\to\images\ --camera_model SIMPLE_RADIAL_FISHEYE

in gsplat: python examples\simple_trainer.py mcmc --data_dir path\to\data --data_factor 1 --result_dir path\to\results --with_ut --with_eval3d --camera_model fisheye --save-ply

error display:

File "C:\Users\beluga\anaconda3\envs\gsplat\lib\site-packages\pycolmap\camera.py", line 65, in GetNumParams
  raise Exception('Camera type not supported')
Exception: Camera type not supported

In camera.py in pycolmap, which is installed as a requiments of gsplat, all fisheyes except OPENCV_FISHEYE are commented out. camera.py:

class Camera:
@staticmethod
def GetNumParams(type_):
    if type_ == 0 or type_ == 'SIMPLE_PINHOLE':
        return 3
    if type_ == 1 or type_ == 'PINHOLE':
        return 4
    if type_ == 2 or type_ == 'SIMPLE_RADIAL':
        return 4
    if type_ == 3 or type_ == 'RADIAL':
        return 5
    if type_ == 4 or type_ == 'OPENCV':
        return 8
    if type_ == 5 or type_ == 'OPENCV_FISHEYE':
       return 8
    #if type_ == 6 or type_ == 'FULL_OPENCV':
    #    return 12
    #if type_ == 7 or type_ == 'FOV':
    #    return 5
    #if type_ == 8 or type_ == 'SIMPLE_RADIAL_FISHEYE':
    #    return 4
    #if type_ == 9 or type_ == 'RADIAL_FISHEYE':
    #    return 5
   
    #if type_ == 10 or type_ == 'THIN_PRISM_FISHEYE':
    #    return 12
    
    # TODO: not supporting other camera types, currently
    raise Exception('Camera type not supported')

As an amateur, I thought that the requirements of the old pycolmap and the regular colmap might be in conflict, but what do you think?

BelugaIsCute avatar Oct 08 '25 04:10 BelugaIsCute