szymanowiczs / splatter-image

Official implementation of `Splatter Image: Ultra-Fast Single-View 3D Reconstruction' CVPR 2024
https://szymanowiczs.github.io/splatter-image
BSD 3-Clause "New" or "Revised" License
795 stars 54 forks source link

Couldn't run the code #10

Closed yuchenlichuck closed 7 months ago

yuchenlichuck commented 7 months ago

Here is what I run after train_network.py +dataset=[cars] I try to run only shapenet dataset, but failed, could you give me some advise? Thank you

/home/dubaiprince/miniconda3/envs/gaussian_splatting/bin/python /home/dubaiprince/Projects/splatter-image/train_network.py +dataset=[cars] 
/home/dubaiprince/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: /home/dubaiprince/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torchvision/image.so: undefined symbol: _ZN2at4_ops19empty_memory_format4callEN3c108ArrayRefIlEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEENS5_INS2_12MemoryFormatEEE
  warn(f"Failed to load image Python extension: {e}")
wandb: Currently logged in as: liyc. Use `wandb login --relogin` to force relogin
wandb: wandb version 0.16.1 is available!  To upgrade, please run:
wandb:  $ pip install wandb --upgrade
wandb: Tracking run with wandb version 0.15.10
wandb: Run data is saved locally in /home/dubaiprince/Projects/splatter-image/experiments_out/2024-01-09/12-30-03/wandb/run-20240109_123004-qnzcmbqp
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run earthy-thunder-11
wandb: ⭐️ View project at https://wandb.ai/liyc/gs_pred
wandb: 🚀 View run at https://wandb.ai/liyc/gs_pred/runs/qnzcmbqp
Setting up [LPIPS] perceptual loss: trunk [vgg], v[0.1], spatial [off] [09/01 12:30:09]
/home/dubaiprince/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be removed in 0.15, "
/home/dubaiprince/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=VGG16_Weights.IMAGENET1K_V1`. You can also use `weights=VGG16_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
Loading model from: /home/dubaiprince/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/lpips/weights/v0.1/vgg.pth [09/01 12:30:10]
Error executing job with overrides: ['+dataset=[cars]']
Traceback (most recent call last):
  File "/home/dubaiprince/Projects/splatter-image/train_network.py", line 131, in main
    shuffle=True)
  File "/home/dubaiprince/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 344, in __init__
    sampler = RandomSampler(dataset, generator=generator)  # type: ignore[arg-type]
  File "/home/dubaiprince/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 108, in __init__
    "value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
mengxuyiGit commented 7 months ago

same problem here. Seems that the data format expected by dataloader is different from that of original SRN dataset. This happens to CO3D dataset too. Could the authors provide a processed dataset?

13253318778 commented 7 months ago

same problem here. I relly don't know how to solve the problem,so I would like to seek help from everyone and the author. Thank you very much in advance! error

Liangym1225 commented 7 months ago

The file path is wrong. You need to modify line22 in /scene/srn.py to self.base_path = os.path.join(SHAPENET_DATASET_ROOT, "srn_{}/{}_{}".format(cfg.data.category, cfg.data.category, dataset_name))

13253318778 commented 7 months ago

The file path is wrong. You need to modify line22 in /scene/srn.py to self.base_path = os.path.join(SHAPENET_DATASET_ROOT, "srn_{}/{}_{}".format(cfg.data.category, cfg.data.category, dataset_name))

Thank you very much for your help! I made the changes as you suggested, but the error still persists.

Liangym1225 commented 7 months ago

@13253318778 Maybe your SHAPENET_DATASET_ROOT is not correct. srn_{cars,chairs} should be placed in SHAPENET_DATASET_ROOT.

13253318778 commented 7 months ago

@13253318778 Maybe your SHAPENET_DATASET_ROOT is not correct. srn_{cars,chairs} should be placed in SHAPENET_DATASET_ROOT.

I sincerely thanks for your help, but I need to bother you again. Can you please take a look at my dataset path? Is this what you mean? My dataset path in the code is like this: SHAPENET_DATASET_ROOT = r"G:\dataset\NMR_Dataset" 1704866362767

1704866395855

Liangym1225 commented 7 months ago

The path looks good but you should download src_*.zip. #9 will be helpful.

13253318778 commented 7 months ago

路径看起来不错,但您应该下载 .#9 会有所帮助。src_*.zip

I am truly, deeply grateful for your help. The best wishes to you.

yuchenlichuck commented 7 months ago

yes I fix it the srn_{cars,chairs} should be placed in SHAPENET_DATASET_ROOT.

yangeer commented 7 months ago

The path looks good but you should download src_*.zip. #9 will be helpful. image

Thank you very much for your help, can you also help me to take a look at my dataset path?

yuchenlichuck commented 7 months ago

change it you will get it

szymanowiczs commented 7 months ago

@yangeer maybe you can print what self.intrins finds? Make sure to download the srn_*.zip file. I also updated readme - hopefully it'll help.

Li-colonel commented 7 months ago

I think the issue is caused by a repeated line here

yangeer commented 7 months ago

Thank you very much for your help, I Ifinally solved the problem,I realized that the files in my google cloud drive were empty

yuedajiong commented 5 months ago

say thanks to me, I can fix this bug: :-)

  1. SHAPENET_DATASET_ROOT='/root/superi/splatter/data/SRN/'

    absulate path, not relative path, for glob. PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  2. self.base_path = os.path.join(SHAPENET_DATASETROOT, "srn{}/{}_{}".format(cfg.data.category, cfg.data.category,

    cfg.data.category,

                                                                          dataset_name))

    comment one-line: #cfg.data.category,

of course, you can: print('hi, here:', self.base_path, self.intrins)

have fun.