On this page, we summarize the necessary steps for replicating the experimental results in our paper. We have made our replication package publicly available on GitHub repository, as a reference for future research.
The Structure of the Repository is as follows:
AI-MSF-Benchmark
|-system
|-corruption
|-utils
|-tools
The directory systems/ stores seven AI-enabled MSF-based perception systems. It has seven sub-directories, each storing one MSF-based systems introduced in Benchmark.
The directory corruptions/ contains fourteen corruption patterns introduced in Corruption Pattern. The sub-directory operator/ contains the design detail of corruptions. sub-directory simulation/ provides a uniform style of batch data processing code. We provide a script main.py to generate the synthetic dataset.
We implement all the MSF systems with PyTorch 1.8.0 and Python 3.7.11. All experiments are conducted on a server with an Intel i7-10700K CPU (3.80 GHz), 48 GB RAM, and an NVIDIA GeForce RTX 3070 GPU (8 GB VRAM).
Run the following command to install the dependencies
cd Corruption
pip install -r requirements.txt
If you need to synthesize rain and fog, you need to install the following dependencies
To synthesize realistic images of rain and fog, you need to install the dependencies in this repository. [link]
optional : git clone the repository and move to AI-MSF-Benchmark/corruption/3rd_parts/camera/
Install dependencies
generate depth maps
download particles simulation files
construct datasets to the required format.
corruption/3rd_parts/camera/data/source/kitti/data_object/training/image_2/file0001.png # Source images (color, 8 bits)
corruption/3rd_parts/camera/data/source/kitti/data_object/training/image_2/depth/file0001.png # Depth images (16 bits, with depth_in_meter = depth/256.)
corruption/3rd_parts/camera/data/source/particles/kitti/data_object/rain/10mm/*.xml # Particles simulation files (here, 10mm/hr rain)
To synthesize realistic point clouds of rain and fog, you need to install the dependencies in this repository. [link]
optional: git clone the repository and move to AI-MSF-Benchmark/corruption/3rd_parts/lidar/
Install dependencies
In order to reproduce our experiments, we need to carefully configure the environment for each system.
EPNet
Install the necessary environment required by EPNET.
Clone the PointRCNN repository.
git clone https://github.com/happinesslz/EPNet.git
Install the dependent python libraries like easydict,tqdm, tensorboardX etc.
Build and install the pointnet2_lib, iou3d, roipool3d libraries by executing the following command:
sh build_and_install.sh
Use synthetic corruption datasets to construct datasets in the EPNet required format.
EPNet
├── data
│ ├── KITTI
│ │ ├── ImageSets
│ │ ├── object
│ │ │ ├──training
│ │ │ ├──calib & velodyne & label_2 & image_2 & (optional: planes)
│ │ │ ├──testing
│ │ │ ├──calib & velodyne & image_2
├── lib
├── pointnet2_lib
├── tools
Run EPNet and evaluate the performance.
FConv
Install the necessary environment required by FConv.
Clone the repository and install dependencies
git clone https://github.com/zhixinwang/frustum-convnet.git
You may need to install extra packages, like pybind11, opencv, yaml, tensorflow(optional).
If you want to use tensorboard to visualize the training status, you should install tensorflow (CPU version is enough). Otherwise, you should set the config 'USE_TFBOARD: False' in cfgs/*.yaml.
Compile extension
cd ops bash
clean.sh
bash make.sh
Train the 2D detector in the KITTI dataset, and then infer the detection results in the synthetic image, and move them to the directory FConv/kitti/rgb_detections.
Use synthetic corruption datasets to construct datasets in the FConv required format.
data/kitti
├── testing
│ ├── calib
│ ├── image_2
│ └── velodyne
└── training
├── calib
├── image_2
├── label_2
└── velodyne
Run FConv and evaluate the performance.
CLOCs
Install the necessary environment required by CLOCs. Note that we should be careful to install the correct version of spconv.
pip install shapely fire pybind11 tensorboardX protobuf scikit-image numba pillow
export PYTHONPATH=$PYTHONPATH:'/dir/to/your/CLOCs/'
Train the 2D detector in the KITTI dataset, and then infer the detection results in the synthetic image.
Use synthetic corruption datasets to construct datasets in the CLOCs required format. Then modify the CLOCs config file carefully.
└── KITTI_DATASET_ROOT
├── training <-- 7481 train data
| ├── image_2 <-- for visualization
| ├── calib
| ├── label_2
| ├── velodyne
| └── velodyne_reduced <-- empty directory
└── testing <-- 7518 test data
| ├── image_2 <-- for visualization
| ├── calib
| ├── velodyne
| └── velodyne_reduced <-- empty directory
└── kitti_dbinfos_train.pkl
├── kitti_infos_train.pkl
├── kitti_infos_test.pkl
├── kitti_infos_val.pkl
└── kitti_infos_trainval.pkl
As CLOCs mentioned, you could follow the SECOND-1.5 instructions to create kitti infos, reduced point cloud and groundtruth-database infos. Note that you need to perform this step every time you construct corruption datasets.
Run CLOCs and evaluate the performance.
JMODT
Install the necessary environment required by JMODT.
pip install -r requirements.txt
python setup.py develop
Build and install the required CUDA modules via PyTorch and the CUDA toolkit:
python setup.py develop
Use synthetic corruption datasets to construct datasets in the JMODT required format.
JMODT
├── data
├── KITTI
├── tracking
│ ├──training
│ │ ├──calib & velodyne & label_02 & image_02
│ ├──testing
│ ├──calib & velodyne & image_02
├── tracking_object
├──ImageSets
│ ├──small_val.txt & test.txt & train.txt & val.txt
├──training
│ ├──calib & velodyne & label_2 & image_2 & sample2frame.txt & seq2sample.txt
├──testing
├──calib & velodyne & image_2 & sample2frame.txt & seq2sample.txt
use the following command to reformat the ground truth to KITTI's object detection format.
python tools/kitti_converter.py --data_root ${DATA_ROOT}
Run JMODT and evaluate the performance.
DFMOT
Install the necessary environment required by DFMOT.
git clone https://github.com/wangxiyang2022/DeepFusionMOT
cd your_path/DeepFusionMOT
pip install -r requirements.txt
Train a 2D detector and a 3D detector in the KITTI dataset, and then infer the detection results in the synthetic image and point cloud. Then move them to the directory DeepFusionMOT/datasets/kitti/2D_rrc_Car_train and DeepFusionMOT/datasets/kitti/3D_pointrcnn_train respectively.
Use synthetic corruption datasets to construct datasets in the DFMOT required format.
DeepFusionMOT
├── datasets
├── kitti
├── train
│ ├──calib_train
│ ├──image_02_train
├── test
├──calib_test
├──image_02_test
Run DFMOT and evaluate the performance.
TWISE
Install the necessary environment required by TWISE.
Use synthetic corruption datasets to construct datasets in the TWISE required format.
Data
|__depth_selection
Run TWISE and evaluate the performance.
MDANet
Install the necessary environment required by MDANet.
install mmcv 1.0.5 (You can install mmcv from this repo)
clone this repository
git clone https://github.com/USTC-Keyanjie/MDANet_ICRA2021.git && cd MDANet_ICRA2021
Use synthetic corruption datasets to construct datasets in the MDANet required format.
/path/to/KITTI/Depth/dataset
├── data_depth_annotated
│ ├── train
│ └── val
├── data_depth_velodyne
│ ├── train
│ └── val
└── depth_selection
├── test_depth_completion_anonymous
├── test_depth_prediction_anonymous
└── val_selection_cropped
Run MDANet and evaluate the performance.
Synthesize corrupted data for KITTI object detection dataset.
The corruption patterns we offer can be used separately. Applying corruption operators to a clean dataset (e.g. KITTI) can synthesize realistic corrupted dataset. Note that corruption patterns used in this study can also generalize to other datasets, such as Waymo, NuScenes.
Run the following command to synthesize corruption image:
python -m corruption.main simulate_image --input_dir "input path" --output_dir "output path" --corruption {corruption} --sev {severity level}
Similarly, we also provide commands for synthesizing other types of corruption data
python -m simulate_image/simulate_lidar/simulate_calib/simulate_weather/simulate_delay params1 ... prams2 ...
Here are some examples:
Add brightness with a severity level of 3 to the image.
python -m corruption.main simulate_image \
--input_dir "./corruption/example/input_dir/image" \
--output_dir "./corruption/example/output_dir/image/" \
--corruption "brightness" --sev 3
Add Gaussian noise with a severity level of 5 to the point cloud.
python -m corruption.main simulate_lidar \
--input_dir "./corruption/example/input_dir/velodyne" \
--output_dir "./corruption/example/output_dir/velodyne/" \
--corruption "gaussian_noise" --sev 5
Add 2 degree rotation to x rotation axis to simulate spatial misalignment between the camera and LiDAR.
python -m corruption.main simulate_calib \
--input_dir "./corruption/example/input_dir/calib" \
--output_dir "./corruption/example/output_dir/calib/" \
--corruption "rotation_x" --sev 3
Add 0.1 second (i.e. 1frame) delay on camera.
python -m corruption.main simulate_delay \
--input_dir "./corruption/example/input_dir/sequence" \
--output_dir "./corruption/example/output_dir/delay_image/" \
--corruption "delay" --sev 1
Add rain with 10 mm/h rainfall to images and point clouds. (Note that you need to correctly configure third-party dependencies in "Corruption Patterns Dependency" section)
python -m corruption.main simulate_weather \
--input_dir_c "./corruption/example/input_dir/image" \
--output_dir_c "./corruption/example/output_dir/rain/image/" \
--input_dir_l "./corruption/example/input_dir/velodyne" \
--output_dir_l "./corruption/example/output_dir/rain/velodyne/" \
--calibdir "./corruption/example/input_dir/calib" \
--depthdir "./corruption/example/input_dir/depth" \
--corruption "rain" --sev 1
from corruption/corruption_configs.py to get all the corruption.
In order to reproduce our experiments(RQ1, RQ2, RQ3), you should
Install the dependencies according to the requirements of each system,
Place the specified synthetic data set in the corresponding directory
Evaluate the system performance.
In order to reproduce RQ4, for CLOCs-Rb, run tools/aggerate_bounding_box.py to aggregate high confidence and unique results from an individual branch to the fusion results. For FConv, you should
Generate the 2D front view images of rgb images.
Train a 2D detector on 2D front view images.
Copy Second from AI-MSF-benchmark/system/CLOCs/second to AI-MSF-benchmark/ops/second.
Run tools/aggerate_bounding_box.py to aggregate guidance from different branches.