Skip to content

Commit 1e3d133

Browse files
committed
ARIM
1 parent b649938 commit 1e3d133

File tree

7 files changed

+280
-0
lines changed

7 files changed

+280
-0
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Ristea Nicolae Catalin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Automotive Radar Interference Mitigation data sets (ARIM)
2+
3+
We propose a novel large scale database consisting of radar data samples, generated automatically while trying to replicate a realistic automotive scenario with one source of interference.
4+
5+
We provide two ways to obtain data:
6+
- directly by downloading the data from below listed links
7+
- generate the data by using the provided scripts
8+
9+
-----------------------------------------
10+
11+
![map](resources/example.jpg)
12+
13+
-----------------------------------------
14+
## Download data set
15+
16+
https://fmiunibuc-my.sharepoint.com/personal/radu_ionescu_fmi_unibuc_ro/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fradu%5Fionescu%5Ffmi%5Funibuc%5Fro%2FDocuments%2FARIM%2FARIM&originalPath=aHR0cHM6Ly9mbWl1bmlidWMtbXkuc2hhcmVwb2ludC5jb20vOmY6L2cvcGVyc29uYWwvcmFkdV9pb25lc2N1X2ZtaV91bmlidWNfcm8vRWh1SmxvaFJtRnBIc3diN3RpekdsdnNCRzFTZ3FVMTJRUW0waDZmSGgyN0I2dz9ydGltZT13MjlPQUZJNTJFZw
17+
##### You can get the data set paper from here:
18+
19+
https://arxiv.org/abs/2007.11102
20+
21+
## Generate data set
22+
#### In order to generate the ARIM data set:
23+
1. Run the matlab script arim_matlab/main.m
24+
2. Move the generated file (arim.mat) in X directory
25+
3. Run the process.py script as follows:
26+
```bash
27+
python process.py --arim_data_path path/to/X/dir --output_dataset_path path/to/save
28+
```
29+
30+
#### Information
31+
32+
After the above steps you will have in the path/to/save directory two files: **arim_train.npy** and **arim_test.npy**.
33+
Those files contains the subsets for training (which could be split also in train and evaluation, as described in our paper) and testing.
34+
35+
In order to load the data in python you should run:
36+
```python
37+
import numpy as np
38+
arim = np.load("path/to/dataset", allow_pickle=True)
39+
40+
sb_raw = arim[()]['sb'] # Data with interference
41+
sb0_raw = arim[()]['sb0'] # Data without interference
42+
amplitudes = arim[()]['amplitudes'] # Amplitude information for targets
43+
```
44+
> In order to work properly you need to have a python version older than 3.6
45+
>> We used the following versions:
46+
>> python 3.6.8,
47+
>> numpy 1.17.3
48+
49+
## Cite us
50+
51+
BibTeX:
52+
53+
@inproceedings{ristea2020fully,
54+
title={Fully convolutional neural networks for automotive radar interference mitigation},
55+
author={Ristea, Nicolae-C{\u{a}}t{\u{a}}lin and Anghel, Andrei and Ionescu, Radu Tudor},
56+
booktitle={Proceedings of VTC},
57+
year={2020}
58+
}
59+
60+
## You can send your questions or suggestions to:
61+
r.catalin196@yahoo.ro, raducu.ionescu@gmail.com
62+
63+
### Last Update:
64+
August 5, 2020
65+
66+
67+

arim_matlab/gen_signal.m

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
function [sb0, sb, label, distance_label] = gen_signal(snr,sir, interfer_coef, A1, r)
2+
3+
% Interference central frequency
4+
fc = 15e6;
5+
6+
%FMCW radar parameters
7+
Tr=25.6e-6; % Period
8+
bw=1.6e+9; % Bandwidth
9+
slope=bw/Tr; % slope(Hz/s)
10+
c0=3e+8;
11+
12+
Fs = 40e6; % sampling frequency
13+
N = Fs*Tr; % number of samples
14+
15+
t=0:1/Fs:Tr-1/Fs; %intervalul de timp(s) al semnalului transmis
16+
17+
Nfft=2^(nextpow2(2*N)); % number of FFT points
18+
19+
F = (0:1/Nfft:1-1/Nfft)*Fs; % frequency vector
20+
r_axis = c0/2/slope*F;
21+
22+
ntarget = length(A1); % number of targets
23+
t_d = 2*r/c0; % range to delay
24+
25+
%Transmitted signal
26+
st=exp(1j*pi*slope*((t-Tr/2).^2));
27+
28+
sb0 = zeros(1,N);
29+
% Received beat signal
30+
for i = 1:ntarget
31+
sb0 = sb0 + A1(i)*st.*exp(-1j*pi*slope*((t-Tr/2-t_d(i)).^2));
32+
end
33+
% Add complex Gaussian noise
34+
sb0 = sb0 + 10^(-snr/20)/sqrt(2)*A1(1)*(randn(1,N)+1j*randn(1,N))*sqrt(N);
35+
36+
% Add interference
37+
f_cw_inst = -fc + (1-interfer_coef)*slope*(t - Tr/2); % Instantaneous frequency
38+
39+
Acw = A1(1).*10^(-sir/20).*sqrt(slope*abs(1-interfer_coef))*N/Fs;
40+
cwt = Acw*st.*exp(-1j*2*pi*(fc*t + 0.5*(interfer_coef*slope)*(t - Tr/2).^2));
41+
42+
cwt(abs(f_cw_inst) > Fs/2) = 0;
43+
44+
sb = sb0 + cwt;
45+
46+
[label, distance_label] = get_label(r_axis, r, A1);
47+
48+
end
49+

arim_matlab/get_label.m

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function [lable, distance_label] = get_label(r_axis, distances, ampl)
2+
3+
lable = zeros(1, 2048);
4+
distance_label = zeros(1, 2048);
5+
6+
for i=1:1:length(distances)
7+
[min_value, min_index] = min(abs(r_axis - distances(i)));
8+
lable(min_index) = ampl(i);
9+
distance_label(min_index) = distances(i);
10+
end
11+
12+
end
13+

arim_matlab/main.m

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
%% Documentation
2+
% This matlab script is made to generate a realistic data set
3+
% for automotive radar interference, with a single source
4+
% of interference ( ARIM ).
5+
%
6+
%% Data set generator
7+
clear all;
8+
rng(707);
9+
10+
% Signals parameters limits
11+
snr_limits = [5, 40];
12+
sir_limits = -5;
13+
slope_limits = [0, 1.5];
14+
nr_samples = 50;
15+
16+
sb0_mat = zeros(1, 1024);
17+
sb_mat = zeros(1, 1024);
18+
amplitude_mat = zeros(1, 2048);
19+
distance_mat = zeros(1, 2048);
20+
info_mat = zeros(1, 4);
21+
22+
index = 1;
23+
for i=1:1:nr_samples
24+
for snr = snr_limits(1):5:snr_limits(2)
25+
for sir = sir_limits:5:snr+5
26+
for interfer_coef = slope_limits(1):0.1:slope_limits(2)
27+
28+
nr_targets = randi([1,4], 1);
29+
A = randi([1,100],1, nr_targets) / 100;
30+
A(randi([1,nr_targets])) = 1;
31+
teta = unifrnd(-pi,pi, 1, nr_targets);
32+
complexA = A.*exp(1i*teta);
33+
r = randi([2,95], 1, nr_targets);
34+
35+
[sb0, sb, label, distance_label] = gen_signal(snr, sir, interfer_coef, complexA, r);
36+
37+
sb0_mat(index, :) = sb0;
38+
sb_mat(index, :) = sb;
39+
amplitude_mat(index, :) = label;
40+
distance_mat(index, :) = distance_label;
41+
42+
% Adding information about signal
43+
info_mat(index, :) = [1, snr, sir, interfer_coef];
44+
45+
index = index + 1;
46+
end
47+
end
48+
end
49+
end
50+
51+
save('arim.mat', 'sb0_mat' , 'sb_mat', 'amplitude_mat', 'distance_mat', 'info_mat');
52+
53+
54+

process.py

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import argparse
2+
import numpy as np
3+
import scipy.io
4+
import random
5+
import os
6+
7+
random.seed(707)
8+
np.random.seed(707)
9+
10+
NO_TEST_EXAMPLES = 8000
11+
12+
13+
def split_dataset(dataset_path):
14+
dataset = scipy.io.loadmat(dataset_path)
15+
16+
indexes = np.arange(0, len(dataset['sb0_mat']), 1)
17+
np.random.shuffle(indexes)
18+
19+
# Preparing information about signals
20+
informations = dataset['info_mat']
21+
info_mat = []
22+
for i in range(0, len(informations)):
23+
info_mat.append({'nr_interferences': informations[i][0],
24+
'snr': informations[i][1:1+int(informations[i][0])],
25+
'sir': informations[i][1+int(informations[i][0]):1 + 2*int(informations[i][0])],
26+
'interference_slope': informations[i][1 + 2*int(informations[i][0]):]})
27+
info_mat = np.array(info_mat)
28+
29+
sb0_mat_test = dataset['sb0_mat'][indexes[:NO_TEST_EXAMPLES]]
30+
sb0_mat_train = dataset['sb0_mat'][indexes[NO_TEST_EXAMPLES:]]
31+
32+
sb_mat_test = dataset['sb_mat'][indexes[:NO_TEST_EXAMPLES]]
33+
sb_mat_train = dataset['sb_mat'][indexes[NO_TEST_EXAMPLES:]]
34+
35+
amplitude_mat_test = dataset['amplitude_mat'][indexes[:NO_TEST_EXAMPLES]]
36+
amplitude_mat_train = dataset['amplitude_mat'][indexes[NO_TEST_EXAMPLES:]]
37+
38+
distance_mat_test = dataset['distance_mat'][indexes[:NO_TEST_EXAMPLES]]
39+
distance_mat_train = dataset['distance_mat'][indexes[NO_TEST_EXAMPLES:]]
40+
41+
info_mat_test = info_mat[indexes[:NO_TEST_EXAMPLES]]
42+
info_mat_train = info_mat[indexes[NO_TEST_EXAMPLES:]]
43+
44+
dataset_train = {'sb0': sb0_mat_train,
45+
'sb': sb_mat_train,
46+
'amplitudes': amplitude_mat_train,
47+
'distances': distance_mat_train,
48+
'info_mat': info_mat_train}
49+
50+
dataset_test = {'sb0': sb0_mat_test,
51+
'sb': sb_mat_test,
52+
'amplitudes': amplitude_mat_test,
53+
'distances': distance_mat_test,
54+
'info_mat': info_mat_test}
55+
56+
return dataset_train, dataset_test
57+
58+
59+
def build_radar_dataset(arim_path, save_path):
60+
arim_train, arim_test = split_dataset(arim_path)
61+
62+
np.save(os.path.join(save_path, 'arim_train.npy'), arim_train)
63+
np.save(os.path.join(save_path, 'arim_test.npy'), arim_test)
64+
65+
66+
if __name__ == '__main__':
67+
parser = argparse.ArgumentParser(description='ARIM Data Set')
68+
parser.add_argument('--arim_data_path', '-m', metavar='[path]', type=str,
69+
default='./',
70+
help="Path to the directory with matlab data sets.")
71+
parser.add_argument('--output_data_path', '-o', type=str,
72+
default='./',
73+
help='The output directory where the processed data will be saved')
74+
75+
args, _ = parser.parse_known_args()
76+
build_radar_dataset(args.arim_data_path, args.output_dataset_path)

resources/example.jpg

294 KB
Loading

0 commit comments

Comments
 (0)