Track 3 - Robust Occupancy Prediction

March 28, 2024 · View on GitHub

Preparation

We implemented SurroundOcc as the baseline model for Track 3. The baseline model was trained on the official train split of the nuScenes dataset and evaluated on our robustness probing sets under different corruptions.

This codebase provides basic instructions for the reproduction of the baseline model in the RoboDrive Challenge.

:gear: Installation

Kindly refer to the INSTALL.md to set up environments and download necessary checkpoints.

:hotsprings: Datasets

We use data under the nuScenes train split as the training set and the RoboDrive robustness probing data as the evaluation sets. For training data preparation, kindly refer to DATA_PREPARE.md.

For evaluation data preparation, kindly download the dataset from the following resources:

TypePhase 1Phase 2
Google Drivelink1 or link2link1 or link2

Uncompress the downloaded dataset and organize the folder structure as follows:

.
├── ckpts
   └── surroundocc.pth
├── data
   ├── nuscenes
   ├── nuscenes_infos_val.pkl
   ├── nuscenes_occ
   ├── robodrive_infos_temporal_test.pkl
   └── robodrive-release
├── docs
├── extensions
└── projects

Next, run the following command to generate the .pkl file for the evaluation sets:

bash tools/create_data.sh

:blue_car: Hint: You can download our generated robodrive_infos_temporal_test.pkl file from this Google Drive link.

The nuscenes folder should end up looking like this:

.
├── basemap
├── can_bus
├── can_bus.zip
├── expansion
├── lidarseg
├── maps
├── nuscenes_infos_temporal_train.pkl
├── nuscenes_infos_temporal_val.pkl
├── nuScenes-panoptic-v1.0-all
├── prediction
├── robodrive_infos_temporal_test.pkl
├── robodrive-v1.0-test
├── samples
├── sweeps
├── v1.0-mini
├── v1.0-test
└── v1.0-trainval

Getting Started

The training and evaluation instructions are summarized as follows.

:rocket: Training

Kindly refer to GET_STARTED.md for the details regarding model training.

:bar_chart: Evaluation

Simply run the following command to evaluate the trained baseline model on the RoboDrive robustness probing sets.

cd SurroundOcc
bash tools/dist_test_corruption.sh

We provide the script to generate prediction files. Kindly refer to robodrive_multi_gpu_test.py.

The generated results will be saved in the folder structure as follows. Each results.pkl is a dictionary, its key is sample_idx and its value is np.ndarray.

.
├── brightness
   └── results.pkl
├── color_quant
   └── results.pkl
├── contrast
   └── results.pkl
...
├── snow
└── zoom_blur

Next, kindly merge all the .pkl files into a single pred.pkl file and zip compress it.

You can merge the results using the following command:

python ./tools/convert_submit.py

:warning: Note: The prediction file MUST be named as pred.pkl. The .zip file can be named as you like.

Finally, upload the compressed file to Track 3's evaluation server for model evaluation.

:blue_car: Hint: We provided the baseline submission file at this Google Drive link. Feel free to download and check it for reference and learn how to correctly submit the prediction files to the server.

Customized Dataset

To customize your own dataset, simply build your dataset based on NuScenesCorruptionDataset.

We mainly modified the data loading part. We only consider the subset of scenes for each corruption type, below is an example showing how to load a subset of scenes under each corruption type.

For more information, kindly refer to corruption_dataset.py.

data = mmcv.load(ann_file)
        
data_infos = data['infos']
sample_data_infos = []
for data_info in data_infos:
    if self.corruption is not None:
        if data_info['scene_token'] in self.sample_scenes_dict[self.corruption]:
            sample_data_infos.append(data_info)
        else:
            sample_data_infos.append(data_info)

Baseline Results

Phase 1

CorruptionSC IoUSSC mIoUbarrierbicyclecarconst. vehmotorcyclepedestraintraffic conetrailertrunkdrive. sufother flatsidewalkterrianmanmadevegetation
Bright0.29230.16130.20280.12090.23270.29370.00960.19230.11730.07660.00000.23560.34510.04380.19080.21450.1083
Dark0.24040.12320.10300.05080.18210.23050.05910.08430.02940.05830.12010.18460.28590.10570.15030.12470.0802
Fog0.28150.18150.27950.10670.19990.29440.05360.12040.14780.08030.16920.22280.32580.26520.18170.18760.1029
Frost0.14170.03490.00620.00410.02410.12400.00020.00370.01110.01960.00520.04380.13650.01180.02410.03140.0373
Snow0.22330.10850.12710.02980.19020.22720.04690.01490.05950.09130.02330.11100.27800.15200.11070.09350.0606
Contrast0.22170.07680.00000.00600.14570.22170.00000.02370.05110.00200.00000.17250.25340.01740.10690.05180.0650
Defocus Blur0.24840.10670.06350.00700.08710.28570.06600.03070.04940.01550.02790.15460.29010.10830.18110.09780.0994
Glass Blur0.23970.09780.06850.02220.07260.25770.00180.00790.04770.06770.03940.11710.27930.10060.17040.12570.0820
Motion Blur0.16750.10020.14480.05490.26100.20730.00920.02700.06850.05410.00000.16280.21610.12230.07910.07060.0528
Zoom Blur0.17750.05660.04410.00000.11670.08550.00850.00080.01030.00430.02650.06160.22670.04000.08710.07020.0637
Elastic Transform0.28900.16710.11730.06600.19350.28810.06010.05060.11800.09130.18380.22770.33950.20260.22080.16940.1239
Color Quant0.22820.09740.02740.01600.18950.24170.00320.01950.04810.02380.05510.14560.27250.13500.14600.04280.0849
Gaussian Noise0.24200.08750.02010.00980.06920.24200.03340.04480.02480.02180.02670.10750.27350.03440.17190.09040.0987
Impluse Noise0.22560.10000.03380.02050.15100.22090.01660.03500.03990.02660.08380.15800.23760.10080.16210.08630.0897
Shot Noise0.26040.12630.07460.02670.29820.28100.06940.05060.04000.02100.09730.11500.30190.14240.18280.07670.0988
ISO Noise0.23340.11140.07860.00760.20460.27260.08910.01690.02940.02230.02710.15190.25800.12070.16840.08650.0855
Pixelate0.30120.16770.07770.04150.31070.30570.08790.17450.04280.05180.05590.18710.33770.24750.25730.14480.1462
JPEG0.25490.12870.07810.01890.19980.24550.09320.11510.06860.05300.14650.13690.29630.14950.18140.10520.0784

Phase 2

To be updated.

References

Kindly cite the corresponding paper(s) once you use the baseline model in this track.

@inproceedings{wei2023surroundocc,
    title = {SurroundOCC: Multi-Camera 3D Occupancy Prediction for Autonomous Driving},
    author = {Wei, Yi and Zhao, Linqing and Zheng, Wenzhao and Zhu, Zheng and Zhou, Jie and Lu, Jiwen},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision},
    pages = {21729-21740},
    year = {2023}
}