wanmeihuali/taichi_3d_gaussian_splatting

Error running prepare_colmap.py

henrypearce4D opened this issue · 1 comments

Error running prepare_colmap.py, any ideas?

(3, 191076)
(3, 191076)
Traceback (most recent call last):
  File "D:\.repos\taichi_3d_gaussian_splatting\tools\prepare_colmap.py", line 275, in <module>
    'camera_intrinsics': camera['K'].tolist(),
AttributeError: 'NoneType' object has no attribute 'tolist'

Is this related to f and fx values? my colmap data is SIMPLE_PINHOLE so only has f

0 SIMPLE_PINHOLE 4112 3008 4665.1357862684463 2048.8621369116008 1539.5097867399454

I meet the same problem. there is no simple_pinhole model support in the code, so you can implement it by this:
def parse_parameters_dict(row): params = row['params'] model = row['model'] if model == 'SIMPLE_RADIAL': return {'f': params[0], 'cx': params[1], 'cy': params[2], 'k1': params[3]} elif model == 'RADIAL': return {'f': params[0], 'cx': params[1], 'cy': params[2], 'k1': params[3], 'k2': params[4]} elif model == 'PINHOLE': return {'fx': params[0], 'fy': params[1], 'cx': params[2], 'cy': params[3]} elif model == 'SIMPLE_PINHOLE': return {'fx': params[0], 'fy': params[0], 'cx': params[1], 'cy': params[2]} else: return {'params': params}