wanmeihuali / taichi_3d_gaussian_splatting

An unofficial implementation of paper 3D Gaussian Splatting for Real-Time Radiance Field Rendering by taichi lang.
Apache License 2.0
648 stars 61 forks source link

Error running prepare_colmap.py #114

Open henrypearce4D opened 1 year ago

henrypearce4D commented 1 year ago

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

illuSION-crypto commented 11 months ago

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}