mvsnerf icon indicating copy to clipboard operation
mvsnerf copied to clipboard

Runtime error

Open morsingher opened this issue 2 years ago • 4 comments

Hi, thanks for releasing your work. I got a weird runtime error when trying to re-train on the Blender dataset. I used the following command:

 python train_mvs_nerf_pl.py --expname mvsnerf_lego_test --num_epochs 6 --use_viewdirs --dataset_name blender --datadir ./data/lego/

Here is the error:

Found ckpts []
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
Traceback (most recent call last):
  File "/localhome/c-morsingher/mvsnerf/train_mvs_nerf_pl.py", line 320, in <module>
    trainer.fit(system)
  File "/localhome/c-morsingher/anaconda3/envs/mvsnerf/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 458, in fit
    self._run(model)
  File "/localhome/c-morsingher/anaconda3/envs/mvsnerf/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 704, in _run
    self.data_connector.prepare_data(model)
  File "/localhome/c-morsingher/anaconda3/envs/mvsnerf/lib/python3.9/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 57, in prepare_data
    model.prepare_data()
  File "/localhome/c-morsingher/mvsnerf/train_mvs_nerf_pl.py", line 80, in prepare_data
    self.train_dataset = dataset(root_dir=train_dir, split='train', max_len=-1 , downSample=args.imgScale_train)
TypeError: __init__() got an unexpected keyword argument 'root_dir'

Any idea on what's happening here? Thank you in advance.

morsingher avatar Dec 21 '21 10:12 morsingher

@morsingher Sorry to bother you, but I met this error as well. So have you fixed it ?

463f avatar Jan 05 '22 04:01 463f

@morsingher Sorry to bother you, but I met this error as well. So have you fixed it ?

这是因为下载来的原项目里,在train文件中,dataset(root_dir=train_dir, split='train', max_len=-1 , downSample=args.imgScale_train)对应的是训练dtu数据集的keyword ,而你在command里设置的却是训练‘blender’数据集。因此,你应该将command里的--dataset_name设为‘dtu’。或者如果你想训练blender数据集的话,那你应该在train文件中,将dataset(...)的keyword设置的与blender数据集对应(具体的keyword设置参考blender.py)

54HaoHao-hue avatar Jul 07 '22 06:07 54HaoHao-hue

@morsingher Sorry to bother you, but I met this error as well. So have you fixed it ?

这是因为下载来的原项目里,在train文件中,dataset(root_dir=train_dir, split='train', max_len=-1 , downSample=args.imgScale_train)对应的是训练dtu数据集的keyword ,而你在command里设置的却是训练‘blender’数据集。因此,你应该将command里的--dataset_name设为‘dtu’。或者如果你想训练blender数据集的话,那你应该在train文件中,将dataset(...)的keyword设置的与blender数据集对应(具体的keyword设置参考blender.py)

是改成这样吗,但也运行不对 #blender self.train_dataset = dataset(args, split='train', load_ref=False) self.val_dataset = dataset(args, split='val', load_ref=False)

R-QinQ avatar Feb 22 '23 07:02 R-QinQ

@morsingher Sorry to bother you, but I met this error as well. So have you fixed it ?

这是因为下载来的原项目里,在train文件中,dataset(root_dir=train_dir, split='train', max_len=-1 , downSample=args.imgScale_train)对应的是训练dtu数据集的keyword ,而你在command里设置的却是训练‘blender’数据集。因此,你应该将command里的--dataset_name设为‘dtu’。或者如果你想训练blender数据集的话,那你应该在train文件中,将dataset(...)的keyword设置的与blender数据集对应(具体的keyword设置参考blender.py)

是改成这样吗,但也运行不对 #blender self.train_dataset = dataset(args, split='train', load_ref=False) self.val_dataset = dataset(args, split='val', load_ref=False)

你好请问你解决了这个问题吗,我也遇到了同样的问题

Shichao123123 avatar May 13 '23 12:05 Shichao123123