The config
file is a mmcv
style configuration file. Please first prepare the nuScenes datasets and specify the data path carefully in config
. Then specify the corruptions
parameters using the below format, our nuScenes-C dataset use the following severity:
corruptions = [dict(type='CameraCrash', easy=2, mid=4, hard=5),
dict(type='FrameLost', easy=2, mid=4, hard=5),
dict(type='MotionBlur', easy=2, mid=4, hard=5),
dict(type='ColorQuant', easy=1, mid=2, hard=3),
dict(type='Brightness', easy=2, mid=4, hard=5),
dict(type='LowLight', easy=2, mid=3, hard=4),
dict(type='Fog', easy=2, mid=4, hard=5),
dict(type='Snow', easy=1, mid=2, hard=3)
]
Support corruption types include MotionBlur
, Fog
, Snow
, ColorQuant
, Brightness
, LowLight
, CameraCrash
, FrameLost
. By default, all the corruptions include three different levels (e.g., easy
, mid
, and hard
). The number should between 1 and 5.
The corruption generation relies on third-party packages, install by running:
pip install imagecorruptions
All the corruption types are defined at corruptions.py
. You can follow the script to define additional corruption types.
To generate data, run the following command:
cd corruptions
bash tools/generate_dataset.sh <CONFIG>
This might take several days, you can generate different corruption types parallelly to accelerate.