graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
13.6k stars 1.75k forks source link

Camera model error: Colmap data #272

Open victorhuzhening opened 11 months ago

victorhuzhening commented 11 months ago

I have a question about the camera model of the data: is cameras.bin where the gaussian_splatting model reads the model from? I have a cameras.bin file that I believe specifies PINHOLE model, but I keep getting this error:

Optimizing Output folder: ./output/752b4cb7-a [03/10 04:25:09] Reading camera 1/315Traceback (most recent call last): File "/content/gaussian-splatting/train.py", line 216, in training(lp.extract(args), op.extract(args), pp.extract(args), args.test_iterations, args.save_iterations, args.checkpoint_iterations, args.start_checkpoint, args.debug_from) File "/content/gaussian-splatting/train.py", line 35, in training scene = Scene(dataset, gaussians) File "/content/gaussian-splatting/scene/init.py", line 44, in init scene_info = sceneLoadTypeCallbacks["Colmap"](args.source_path, args.images, args.eval) File "/content/gaussian-splatting/scene/dataset_readers.py", line 145, in readColmapSceneInfo cam_infos_unsorted = readColmapCameras(cam_extrinsics=cam_extrinsics, cam_intrinsics=cam_intrinsics, images_folder=os.path.join(path, reading_dir)) File "/content/gaussian-splatting/scene/dataset_readers.py", line 95, in readColmapCameras assert False, "Colmap camera model not handled: only undistorted datasets (PINHOLE or SIMPLE_PINHOLE cameras) supported!" AssertionError: Colmap camera model not handled: only undistorted datasets (PINHOLE or SIMPLE_PINHOLE cameras) supported!

I also have the files organized as shown in the README. Any clues/tips on what might be causing the problem? Should I maybe specify camera model when I generate the files from Colmap?

Appreciate the help.

Snosixtyboo commented 11 months ago

Hi,

if your model DOES specify a PINHOLE camera, the above error shouldn't be raised, so i strongly suspect that it uses something else.

HHHHH6123 commented 10 months ago

This is because there are some distortion in your images. Fortunately,Colmap has a function to solve it. Colmap->Reconstruction->Dense reconstruction->Undistortion. After those processes,3DGS can run correctly. I hope this will give some help.

brgrp commented 10 months ago

@PKU-YQH I tried you suggestion, and change the images path to the new "images" folder that were created after clicking "Undistortion". GS train.py still does not work. How did you get it to work?

jracer11 commented 9 months ago

@codegrafix Did you figure this out? I keep getting

(gaussian_splatting) C:\Users\Demon\Nerf Guassian\gaussian-splatting>python convert.py -s data/input [option_manager.cc:815] Check failed: ExistsDir(*image_path) ERROR: Invalid options provided. ERROR:root:Feature extraction failed with code 1. Exiting.

cucdengjunli commented 9 months ago

same

cucdengjunli commented 9 months ago

This is because there are some distortion in your images. Fortunately,Colmap has a function to solve it. Colmap->Reconstruction->Dense reconstruction->Undistortion. After those processes,3DGS can run correctly. I hope this will give some help.

what did you do after Undistortion

RoyAmoyal commented 7 months ago

same error here..

luojin commented 7 months ago
企业微信截图_ca4c74f5-2a68-4804-b424-e2a780f68813

@cucdengjunli @RoyAmoyal

GaussRieman commented 7 months ago

企业微信截图_ca4c74f5-2a68-4804-b424-e2a780f68813 @cucdengjunli @RoyAmoyal

this works, thx!

Sukriti-Shukla commented 1 month ago

I dont understand the solution given by @cucdengjunli @RoyAmoyal can someone please explain in detail what to do

Sukriti-Shukla commented 1 month ago

Sry, by @luojin , can someone please explain what to do exactly @GaussRieman , how did you get it resolved?