yihua7 / SC-GS

[CVPR 2024] Code for SC-GS: Sparse-Controlled Gaussian Splatting for Editable Dynamic Scenes
https://yihua7.github.io/SC-GS-web/
MIT License
502 stars 28 forks source link

met an issue with gui #27

Open DabblerGISer opened 7 months ago

DabblerGISer commented 7 months ago

Building Learnable Gaussians for Nodes! [15/04 14:13:21] Loading trained model at iteration None [15/04 14:13:21] Reading camera 1/125Traceback (most recent call last): File "train_gui.py", line 2079, in gui = GUI(args=args, dataset=lp.extract(args), opt=op.extract(args), pipe=pp.extract(args), File "train_gui.py", line 169, in init self.scene = Scene(dataset, self.gaussians, load_iteration=-1) File "/home/yucheng/PycharmProjects/SC-GS/scene/init.py", line 45, in init scene_info = sceneLoadTypeCallbacks["Colmap"](args.source_path, args.images, args.eval) File "/home/yucheng/PycharmProjects/SC-GS/scene/dataset_readers.py", line 215, in readColmapSceneInfo cam_infos_unsorted = readColmapCameras(cam_extrinsics=cam_extrinsics, cam_intrinsics=cam_intrinsics, images_folder=os.path.join(path, reading_dir)) File "/home/yucheng/PycharmProjects/SC-GS/scene/dataset_readers.py", line 165, in readColmapCameras fid = int(image_name) / (num_frames - 1) ValueError: invalid literal for int() with base 10: 'frame_783' Exception ignored in: <function GUI.del at 0x7fb4b4995e50> Traceback (most recent call last): File "train_gui.py", line 305, in del if self.gui: AttributeError: 'GUI' object has no attribute 'gui'

Could you please give some hint about this error? Thank you! Best.

yihua7 commented 7 months ago

Hi, As mentioned in the traceback: File "/home/yucheng/PycharmProjects/SC-GS/scene/dataset_readers.py", line 165, in readColmapCameras fid = int(image_name) / (num_frames - 1). The error is encountered when converting the image name frame_783 to an integer. Maybe you can use the counter variable idx in https://github.com/yihua7/SC-GS/blob/26cd57d09598b2f5d951029808a5ac9f0ff4f626/scene/dataset_readers.py#L127 like fid = idx / (num_frames - 1) or change the conversion code to something like fid = int(image_name.split('_')[-1]) to determine the fid value, which means the timestep at the frame.