Skip to content

KeyError: 'occ_path' #33

Description

@Valerianding

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions