README.md 4.03 KB
Newer Older
1
# RODNet: Radar Object Detection Network
Yizhou Wang's avatar
Yizhou Wang committed
2

3
4
5
This is the official implementation of our RODNet papers 
at [WACV 2021](https://openaccess.thecvf.com/content/WACV2021/html/Wang_RODNet_Radar_Object_Detection_Using_Cross-Modal_Supervision_WACV_2021_paper.html) 
and [IEEE J-STSP 2021](https://ieeexplore.ieee.org/abstract/document/9353210). 
Yizhou Wang's avatar
Yizhou Wang committed
6

7
[[Arxiv]](https://arxiv.org/abs/2102.05150)
Yizhou Wang's avatar
Yizhou Wang committed
8
[[Dataset]](https://www.cruwdataset.org)
9
10
11
[[ROD2021 Challenge]](https://codalab.lisn.upsaclay.fr/competitions/1063)
[[Presentation]](https://youtu.be/UZbxI4o2-7g)
[[Demo]](https://youtu.be/09HaDySa29I)
Yizhou Wang's avatar
Yizhou Wang committed
12

Yizhou Wang's avatar
Yizhou Wang committed
13
14
![RODNet Overview](./assets/images/overview.jpg?raw=true)

15
Please cite our paper if this repository is helpful for your research:
Yizhou Wang's avatar
Yizhou Wang committed
16
17
```
@inproceedings{wang2021rodnet,
18
19
20
21
22
23
  author={Wang, Yizhou and Jiang, Zhongyu and Gao, Xiangyu and Hwang, Jenq-Neng and Xing, Guanbin and Liu, Hui},
  title={RODNet: Radar Object Detection Using Cross-Modal Supervision},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  month={January},
  year={2021},
  pages={504-513}
Yizhou Wang's avatar
Yizhou Wang committed
24
25
}
```
26
27
28
29
30
31
32
33
34
35
36
37
38
```
@article{wang2021rodnet,
  title={RODNet: A Real-Time Radar Object Detection Network Cross-Supervised by Camera-Radar Fused Object 3D Localization},
  author={Wang, Yizhou and Jiang, Zhongyu and Li, Yudong and Hwang, Jenq-Neng and Xing, Guanbin and Liu, Hui},
  journal={IEEE Journal of Selected Topics in Signal Processing},
  volume={15},
  number={4},
  pages={954--967},
  year={2021},
  publisher={IEEE}
}
```

Yizhou Wang's avatar
Yizhou Wang committed
39
40
## Installation

Yizhou Wang's avatar
Yizhou Wang committed
41
42
43
44
45
46
Clone RODNet code.
```commandline
cd $RODNET_ROOT
git clone https://github.com/yizhou-wang/RODNet.git
```

Yizhou Wang's avatar
Yizhou Wang committed
47
Create a conda environment for RODNet. Tested under Python 3.6, 3.7, 3.8.
48
```commandline
Yizhou Wang's avatar
Yizhou Wang committed
49
conda create -n rodnet python=3.* -y
Yizhou Wang's avatar
Yizhou Wang committed
50
51
52
53
conda activate rodnet
```

Install pytorch.
54
55
56
57
58
59
60
**Note:** If you are using Temporal Deformable Convolution (TDC), we only tested under `pytorch<=1.4` and `CUDA=10.1`. 
Without TDC, you should be able to choose the latest versions. 
If you met some issues with environment, feel free to raise an issue.
```commandline
conda install pytorch=1.4 torchvision cudatoolkit=10.1 -c pytorch  # if using TDC
# OR
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch  # if not using TDC
Yizhou Wang's avatar
Yizhou Wang committed
61
62
```

Yizhou Wang's avatar
Yizhou Wang committed
63
64
Install `cruw-devkit` package. 
Please refer to [`cruw-devit`](https://github.com/yizhou-wang/cruw-devkit) repository for detailed instructions.
65
```commandline
Yizhou Wang's avatar
Yizhou Wang committed
66
67
git clone https://github.com/yizhou-wang/cruw-devkit.git
cd cruw-devkit
68
pip install .
Yizhou Wang's avatar
Yizhou Wang committed
69
70
71
cd ..
```

Yizhou Wang's avatar
Yizhou Wang committed
72
Setup RODNet package.
73
```commandline
Yizhou Wang's avatar
Yizhou Wang committed
74
75
pip install -e .
```
76
77
**Note:** If you are not using TDC, you can rename script `setup_wo_tdc.py` as `setup.py`, and run the above command. 
This should allow you to use the latest cuda and pytorch version. 
Yizhou Wang's avatar
Yizhou Wang committed
78
79
80

## Prepare data for RODNet

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Download [ROD2021 dataset](https://www.cruwdataset.org/download#h.mxc4upuvacso). 
Follow [this script](https://github.com/yizhou-wang/RODNet/blob/master/tools/prepare_dataset/reorganize_rod2021.sh) to reorganize files as below.

```
data_root
  - sequences
  | - train
  | | - <SEQ_NAME>
  | | | - IMAGES_0
  | | | | - <FRAME_ID>.jpg
  | | | | - ***.jpg
  | | | - RADAR_RA_H
  | | |   - <FRAME_ID>_<CHIRP_ID>.npy
  | | |   - ***.npy
  | | - ***
  | | 
  | - test
  |   - <SEQ_NAME>
  |   | - RADAR_RA_H
  |   |   - <FRAME_ID>_<CHIRP_ID>.npy
  |   |   - ***.npy
  |   - ***
  | 
  - annotations
  | - train
  | | - <SEQ_NAME>.txt
  | | - ***.txt
  | - test
  |   - <SEQ_NAME>.txt
  |   - ***.txt
  - calib
```

Convert data and annotations to `.pkl` files.
115
```commandline
Yizhou Wang's avatar
Yizhou Wang committed
116
117
118
119
120
121
122
123
124
python tools/prepare_dataset/prepare_data.py \
        --config configs/<CONFIG_FILE> \
        --data_root <DATASET_ROOT> \
        --split train,test \
        --out_data_dir data/<DATA_FOLDER_NAME>
```

## Train models

125
```commandline
Yizhou Wang's avatar
Yizhou Wang committed
126
127
128
129
130
131
132
python tools/train.py --config configs/<CONFIG_FILE> \
        --data_dir data/<DATA_FOLDER_NAME> \
        --log_dir checkpoints/
```

## Inference

133
```commandline
Yizhou Wang's avatar
Yizhou Wang committed
134
135
136
137
138
python tools/test.py --config configs/<CONFIG_FILE> \
        --data_dir data/<DATA_FOLDER_NAME> \
        --checkpoint <CHECKPOINT_PATH> \
        --res_dir results/
```