hustvl / VAD

[ICCV 2023] VAD: Vectorized Scene Representation for Efficient Autonomous Driving

Home Page:https://arxiv.org/abs/2303.12077

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error occurs when converting NuScenes data

zuo1188 opened this issue · comments

tools/data_converter/vad_nuscenes_converter.py
line 221
shoud be fixed to this?

for dic in nusc.category:
        cat2idx[dic['name']] = dic['index']

----->
for idx,dic in enumerate(nusc.category):
        cat2idx[dic['name']] = idx

Can you provide your running command and the error information? I don't have a problem here when converting data.

command:
python tools/data_converter/vad_nuscenes_converter.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag vad_nuscenes --version v1.0 --canbus ./data
result:

Traceback (most recent call last):
  File "tools/data_converter/vad_nuscenes_converter.py", line 979, in <module>
    nuscenes_data_prep(
  File "tools/data_converter/vad_nuscenes_converter.py", line 937, in nuscenes_data_prep
    create_nuscenes_infos(
  File "tools/data_converter/vad_nuscenes_converter.py", line 106, in create_nuscenes_infos
    train_nusc_infos, val_nusc_infos = _fill_trainval_infos(
  File "tools/data_converter/vad_nuscenes_converter.py", line 222, in _fill_trainval_infos
    cat2idx[dic['name']] = dic['index']
KeyError: 'index'

Do you install nuscenes-devkit package in your python environment?
Besides, you can directly download our pre-generated nuscenes data following this README.

Do you install nuscenes-devkit package in your python environment? Besides, you can directly download our pre-generated nuscenes data following this README.
1.My pip list:
nuscenes-devkit 1.1.10
2.OK

I don't seem to have this problem in line 221, my nuscenes-devkit version is 1.1.9, You can try version 1.1.9 to see if this problem can be solved.

fixed

fixed

@zuo1188 Hi, I am having the same problem and I have devkit==1.1.9. How did you fix it at the end?

hi, the fixed way is to update nuscenes-devkit 1.1.10?

hi, the fixed way is to update nuscenes-devkit 1.1.10?

downgrade to 1.1.9