This is the official implementation of DAROD paper (2022 IEEE Intelligent Vehicle Symposium).
Colin Decourt, Rufin VanRullen, Thomas Oberlin, Dider Salle
Please cite this paper as follows:
@INPROCEEDINGS{9827281,
author={Decourt, Colin and VanRullen, Rufin and Salle, Didier and Oberlin, Thomas},
booktitle={2022 IEEE Intelligent Vehicles Symposium (IV)},
title={DAROD: A Deep Automotive Radar Object Detector on Range-Doppler maps},
year={2022},
volume={},
number={},
pages={112-118},
doi={10.1109/IV51971.2022.9827281}}
In this repository we provide an adaption of the Faster R-CNN architecture for object detection on range-Doppler (RD)
maps.
We provide training and evaluation scripts for Carrada and RADDet datasets.
This project requires tensorflow 2.4.1 and tensorflow-datasets 4.4.0 with CUDA 11.2. Clone the project:
git clone ...
cd darod
Create conda environment
conda create -n darod python=3.7 tensorflow-gpu=2.4.1 scikit-learn scikit-image matplotlib numpy scipy tqdm tabulate imageio
Install missing packages
pip3 install tensorflow-datasets==4.4.0 tensorflow-addons==0.13.0
For efficiency, we use tensorflow datasets to load and process data. Before training the model, create tensorflow datasets for Carrada and RADDet.
Update path to Carrada dataset in datasets/carrada_builder/carrada.py
(l 87):
def _split_generators(self, dl_manager: tfds.download.DownloadManager):
"""Returns SplitGenerators."""
# TODO(carrada): Downloads the data and defines the splits
path = "<path_to_carrada>"
# TODO(carrada): Returns the Dict[split names, Iterator[Key, Example]]
return {
'train': self._generate_examples(path, 'train'),
'test': self._generate_examples(path, 'test'),
'val': self._generate_examples(path, 'val'),
}
To create tf-records file for Carrada, use the following commands:
cd datasets/carrada_builder/
tfds build carrada --data_dir <path_to_tensorflow_datasets>
cd ..
Update path to RADDet dataset in datasets/raddet_builder/raddet.py
(l 61):
def _split_generators(self, dl_manager: tfds.download.DownloadManager):
"""Returns SplitGenerators."""
# TODO(carrada): Downloads the data and defines the splits
train_path = "<path_to_raddet>/train/"
test_path = "<path_to_raddet>/test/"
# TODO(carrada): Returns the Dict[split names, Iterator[Key, Example]]
return {
'train': self._generate_examples(train_path, 'train'),
'test': self._generate_examples(test_path, 'test'),
}
Build the dataset:
cd raddet_builder/
tfds build raddet
cd ../../
Once the datasets are generated, update configuration files for Carrada and RADDet. Open config_carrada.json and config_raddet.json and change the following lines:
"dataset_version": "1.0.0", # 1.0.0 by defaults
"tfds_path": "<path_to_tfds_folder>", # <path_to_datasets>/tensorflow_datasets/
python train.py --config ./config/config_carrada.json --backup-dir ./logs/ --exp darod_carrada
python train.py --config ./config/config_raddet.json --backup-dir ./logs/ --exp darod_carrada
We provide DAROD pretrained weights. You can use them to evaluate the model.
We store the results in a .json file such that:
"class_id": { # metrics for class class_id
"AP": [
[email protected],
[email protected],
[email protected],
[email protected],
],
"precision": [
[email protected],
[email protected],
[email protected],
[email protected],
],
"recall": [
[email protected],
[email protected],
[email protected],
[email protected],
],
"F1": [
[email protected],
[email protected],
[email protected],
[email protected],
],
...
"mean": { # mean of metrics over all classes
"AP": [
[email protected],
[email protected],
[email protected],
[email protected],
],
"precision": [
[email protected],
[email protected],
[email protected],
[email protected],
],
"recall": [
[email protected],
[email protected],
[email protected],
[email protected],
],
"F1": [
[email protected],
[email protected],
[email protected],
[email protected],
],
}
Supposing, logs are in ./logs/darod_carrada
:
python eval.py --path ./logs/darod_carrada
Supposing, logs are in ./logs/darod_raddet
:
python eval.py --path ./logs/darod_raddet
This implementation repository is based on the following Faster R-CNN implementation: https://github.com/FurkanOM/tf-faster-rcnn. Thanks to the authors for the work.