prepare_data.md
November 29, 2025 · View on GitHub
Prepare the data
Dowload the nuScenes dataset
Download the nuScenes dataset and create symbolic links.
cd ${duocc_path}
mkdir data
ln -s path/to/nuscenes ./data
Dowload the Occ3D-nuScenes dataset
For Occupancy Prediction task, download Occ3D-nuScenes from CVPR2023-3D-Occupancy-Prediction and place it in data/nuscenes/gts
Prepare pkl files
Pack the meta-information and labels of the dataset, and generate the required .pkl files.
python3 tools/create_data_duocc.py
Generate anchors by K-means
python3 tools/anchor_generator.py --ann_file ./data/nuscenes_anno_pkls/nuscenes_occ_infos_aug_train.pkl
Download pre-trained weights
Download the required backbone BEVDet serires and place it in ckpts folder.
The Overall Structure
Please make sure the structure of DuOcc is as follows:
DuOcc
├── projects/
├── tools/
├── ckpts/
│ ├── bevdet-r50-4d-depth-cbgs.pth
├── data/
│ ├── nuscenes/
│ │ ├── maps/
│ │ ├── samples/
│ │ ├── samples/
│ │ ├── sweeps/
│ │ ├── v1.0-test/
│ │ ├── v1.0-trainval/
│ │ ├── nusceness_occ_infos_train.pkl
│ │ ├── nusceness_occ_infos_val.pkl
│ ├── nuscenes_anno_pkls/
│ │ ├── nuscenes_occ_infos_aug_train.pkl
│ │ ├── nuscenes_occ_infos_aug_val.pkl
├── nuscenes_kmeans900_42m.npy
└── others
→ Back to: Training & Inference