tangjiapeng / SA-ConvONet

ICCV2021 Oral SA-ConvONet: Sign-Agnostic Optimization of Convolutional Occupancy Networks
MIT License
89 stars 5 forks source link

Error running `generate_optim_largescene.py configs/pointcloud_crop/demo_matterport.yaml` #1

Open satyajitghana opened 2 years ago

satyajitghana commented 2 years ago

I've downloaded the dataset using bash scripts/download_demo_data.sh

(sa_conet) satyajit@cloud-pc:~/project/SA-ConvONet$ python3 generate_optim_largescene.py configs/pointcloud_crop/demo_matterport.yaml
/home/satyajit/project/SA-ConvONet/src/config.py:22: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  cfg_special = yaml.load(f)
/home/satyajit/project/SA-ConvONet/src/config.py:33: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  cfg = yaml.load(f)
test_split: test
https://s3.eu-central-1.amazonaws.com/avg-projects/convolutional_occupancy_networks/models/pointcloud_crop/room_grid64.pt
=> Loading checkpoint from url...
Warning: generator does not support pointcloud generation.
  0%|                                                                                                                   | 0/2 [00:00<?, ?it/s]Error occured when loading field points of model JmbYfDe2QKZ
  0%|                                                                                                                   | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "generate_optim_largescene.py", line 78, in <module>
    for it, data in enumerate(tqdm(test_loader)):
  File "/home/satyajit/.local/lib/python3.6/site-packages/tqdm/std.py", line 1171, in __iter__
    for obj in iterable:
  File "/home/satyajit/anaconda3/envs/sa_conet/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 345, in __next__
    data = self._next_data()
  File "/home/satyajit/anaconda3/envs/sa_conet/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/satyajit/anaconda3/envs/sa_conet/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
    return self.collate_fn(data)
  File "/home/satyajit/anaconda3/envs/sa_conet/lib/python3.6/site-packages/torch/utils/data/_utils/collate.py", line 81, in default_collate
    raise TypeError(default_collate_err_msg_format.format(elem_type))
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'NoneType'>
tangjiapeng commented 2 years ago

After downloading the demo data, you need to use the preprocessing script to prepare the cropped scenes for test-time optimization. And then you can run the test-time optimization.

python scripts/dataset_matterport/make_cropscene_dataset.py --in_folder $in_folder --out_folder $out_folder --do_norm

tangjiapeng commented 2 years ago

I have fixed this bug by providing a new script (scripts/dataset_matterport/make_cropscene_dataset2.py) for processing Matterport3D demo scenes. Please refer to the README.md.