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

prepare_InstantNGP_with_mesh.py error #104

Closed henrypearce4D closed 1 year ago

henrypearce4D commented 1 year ago

error running the script with my dataset, have I used the flags correctly?;

(taichi_3d_gaussian_splatting) D:\.repos\taichi_3d_gaussian_splatting>python tools/prepare_InstantNGP_with_mesh.py  --transforms_train "D:\.repos\taichi_3d_gaussian_splatting_data\data\ed\ingp\transforms.json"     --mesh_path "D:\.repos\taichi_3d_gaussian_splatting_data\data\ed\ingp\mesh.ply"   --mesh_sample_points 100000     --image_path_prefix image    --output_path D:\.repos\taichi_3d_gaussian_splatting_data\data\ed\output
Traceback (most recent call last):
  File "D:\.repos\taichi_3d_gaussian_splatting\tools\prepare_InstantNGP_with_mesh.py", line 54, in <module>
    data_list = convert_json(input_json, args.image_path_prefix)
  File "D:\.repos\taichi_3d_gaussian_splatting\tools\prepare_InstantNGP_with_mesh.py", line 13, in convert_json
    [input_json["fl_x"], 0, input_json["cx"]],
KeyError: 'fl_x'

my transforms file attached transforms.zip

wanmeihuali commented 1 year ago

Sorry for the late reply. It's a busy week... It seems the reason is some slightly difference in NGP json format. I've try to fix it in this PR: https://github.com/wanmeihuali/taichi_3d_gaussian_splatting/pull/110 The PR is now merged, can you try the lastest code?

henrypearce4D commented 1 year ago

Hi, I did make a convertor in the end to re-structure the file before running the tool, but I just tested the transforms I supplied you after pulling the updates and that both go through fine now.