OccNet
OccNet copied to clipboard
KeyError: 'occ_path'
Hi Thanks for your great work. I'am tring to reproduce the result. And I am using the nuscenes mini datasets. I generate the pkl file using:
python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes --version v1.0-mini --canbus ./data
And I also downloaded provided openocc_v2. The floder is organized like this:
├── CITATION.cff
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── ckpts
│ └── r101_dcn_fcos3d_pretrain.pth
├── data
│ ├── LICENSE
│ ├── can_bus
│ ├── can_bus.zip
│ ├── download_can_bus.sh
│ ├── download_full.sh
│ ├── download_mini.sh
│ ├── nuscenes
│ └── v1.0-mini.tgz
├── docs
│ └── getting_started.md
├── figs
│ └── occupanc_1.gif
├── lib
│ └── dvr
├── projects
│ ├── __init__.py
│ ├── __pycache__
│ ├── configs
│ └── mmdet3d_plugin
├── tools
│ ├── analysis_tools
│ ├── create_data.py
│ ├── data_converter
│ ├── dist_test.sh
│ ├── dist_train.sh
│ ├── fp16
│ ├── misc
│ ├── model_converters
│ ├── slurm_train.sh
│ ├── test.py
│ └── train.py
└── utils
└── vis.py
The nuscenes folder are organized like:
├── nuscenes
│ ├── LICENSE
│ ├── download_map.sh
│ ├── download_occ.sh
│ ├── download_pkl.sh
│ ├── map-expansion.zip
│ ├── maps
│ ├── nuscenes_infos_temporal_train_mono3d.coco.json
│ ├── nuscenes_infos_temporal_val_mono3d.coco.json
│ ├── nuscenes_infos_train_occ.pkl
│ ├── nuscenes_infos_val_occ.pkl
│ ├── nuscenes_map_anns_val.json
│ ├── openocc_v2
│ ├── openocc_v2.zip
│ ├── samples
│ ├── sweeps
│ ├── v1.0-mini
│ └── v1.0-test
And I used the checkpoints provided in the BEVFormer. I ran the test using:
./tools/dist_test.sh projects/configs/bevformer/bevformer_base_occ.py ./ckpts/r101_dcn_fcos3d_pretrain.pth 1
But I got this error:
ETA:Traceback (most recent call last):
File "./tools/test.py", line 267, in <module>
main()
File "./tools/test.py", line 238, in main
outputs = custom_multi_gpu_test(model, data_loader, args.tmpdir,
File "/data/*/Experiment-Occ/OccNet/projects/mmdet3d_plugin/bevformer/apis/test.py", line 74, in custom_multi_gpu_test
for i, data in enumerate(data_loader):
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
data = self._next_data()
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise
raise self.exc_type(msg)
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/data/*/Experiment-Occ/OccNet/projects/mmdet3d_plugin/datasets/nuscenes_occ.py", line 125, in __getitem__
return self.prepare_test_data(idx)
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/mmdet3d-0.17.1-py3.8-linux-x86_64.egg/mmdet3d/datasets/custom_3d.py", line 172, in prepare_test_data
example = self.pipeline(input_dict)
File "/home/*/anaconda3/envs/occ/lib/python3.8/site-packages/mmdet/datasets/pipelines/compose.py", line 40, in __call__
data = t(data)
File "/data/*/Experiment-Occ/OccNet/projects/mmdet3d_plugin/datasets/pipelines/loading.py", line 21, in __call__
occ_labels = np.load(results['occ_path'])
KeyError: 'occ_path'
Can any one know what's the problem. Thanks a lot!
Hi @afterthat97. I notice the prepare data in OccNet branch is out of date. Since you updated the openocc_v2 I want to know how can we prepare for nuScenes mini dataset. Thank You!
Oh no, you should not generate these pkl by yourself. You should download them from the link we provide.
Oh no, you should not generate these
pklby yourself. You should download them from the link we provide.
Thanks for your kindly reply. But I'm using mini dataset. it not works, And I got the error:
FileNotFoundError: img file does not exist: ./data/nuscenes/samples/CAM_FRONT/n015-2018-07-11-11-54-16+0800__CAM_FRONT__1531281439762460.jpg
Could this means that the project only support full dataset.