DeepSense Forum

Notifications
Clear all

[Solved] Question About Radar-Aided Beam Prediction


avn
 avn
Active Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi DeepSense Team...

Thank you for your greatwork.

I am interested to run radar-aided-beam-prediction-repo. I see that there are functions called train_loop(), test_loop(), and eval_loop() inside network_functions.py. How to call these functions? I am still don't have idea what I should put in this paramaters: criterion and optimizer.

I see in the paper the authors using lookup table mapping as the baseline algorithm, however I can't find the baseline code in the repository. Could you show me where the code is?

Thank you

This topic was modified 1 year ago by avn

Quote
udemirhan
Member Admin
Joined: 3 years ago
Posts: 4
 

Hi @avn,

You can use the classical definitions for the loss function (criterion) and optimizer. In this paper, we used Adam optimizer with cross-entropy loss, which can be defined as follows

criterion = torch.nn.CrossEntropyLoss() # Mean for training
optimizer = torch.optim.Adam(net.parameters(), lr=1e-3, weight_decay=1e-4)


Note that the variable "net" is the neural network object. For the baseline, we have added the script named baseline.py to the repository to generate the lookup table solution results.

Thanks,

Umut


avn liked
ReplyQuote
avn
 avn
Active Member
Joined: 1 year ago
Posts: 8
Topic starter  

Hi DeepSense Team,

I have questions related with radar data preprocessing. 

1. Range Angle Map

Below is the range_angle_map() function that I copied from tutorial page

def range_angle_map(data, fft_size = 64):
    data = np.fft.fft(data, axis = 1) # Range FFT
    data -= np.mean(data, 2, keepdims=True)
    data = np.fft.fft(data, fft_size, axis = 0) # Angle FFT
    data = np.fft.fftshift(data, axes=0)
    data = np.abs(data).sum(axis = 2) # Sum over velocity
    return data.T

 

Below is the range_angle_map_single() function that I copied from github repo

def range_angle_map_single(data, fft_size = 64):
    data = np.fft.fft(data, axis=1) # Range FFT
    data -= np.mean(data, axis=2, keepdims=True)
    data = np.fft.fft(data, n=fft_size, axis=0) # Angle FFT
    data = np.abs(data).sum(axis=2) # Sum over velocity
    return data

 

  • There is no code for shifting the FFT result in the repo. Is it actually no need to perform fftshift while training the model?
  • Why there is sum() over velocity after performing FFT? And why not another math operator such as mean()?

 

2. Range Velocity Map

Below is the range_velocity_map() function that I copied from tutorial page

def range_velocity_map(data):
    data = np.fft.fft(data, axis=1) # Range FFT
    # data -= np.mean(data, 2, keepdims=True)
    data = np.fft.fft(data, axis=2) # Velocity FFT
    data = np.fft.fftshift(data, axes=2)
    data = np.abs(data).sum(axis = 0) # Sum over antennas
    data = np.log(1+data)
    return data

Below is the range_velocity_map() function that I copied from github repo

def range_velocity_map_single(data):
    data = np.fft.fft(data, axis=1) # Range FFT
    data = np.fft.fft(data, axis=2) # Velocity FFT
    data = np.abs(data).sum(axis=0) # Sum over antennas
    return data

 

  • Besides there is no fftshift() function in repo, there is no np.log(1+data) line in the repo. Could you explain why this is different?
  • Why there is sum() over antennas after performing FFT? And why not another math operator such as mean()?

 

3. I see that the FFT result in the tutorial is converted into their related unit (velocity FFT -> km/hour, angle FFT -> angle, range FFT -> meter). However, there is no unit conversion in the repo. Is it actually no need to perform unit conversion before feed them into a deep learning model?

Thank you

 


ReplyQuote
udemirhan
Member Admin
Joined: 3 years ago
Posts: 4
 
Hi @avn,
  • The fftshift function swaps the left half and right half of the data through the given axis. Machine learning can easily learn this change as the data is the same with a change in the order.
  • You can use mean(), the difference would be multiplication by a constant (dimension size). For example, if have an n-d array with 256 dimensional 1-st axis, then, we have x.sum(axis=1) = 256*x.mean(axis=1). The multiplication by a constant does not change the information itself, only scales it. Further, from ML perspective, you can use different operators to generate a different set of features (this would essentially be feature engineering for ML), which may or may not improve your machine learning performance.
  • log(1+x) is a strictly increasing function of x, which converts the results to a log scale. We have observed that it provides a better visualization, therefore, it is included in the tutorial.
  • For your last question, the conversion is only applied for the visualization and the corresponding values (axis ticks) are not fed into the neural network model. The range-angle/range-velocity maps are images (of HxW pixels) and the values corresponding to the pixels (distance, angle, or Doppler velocity) are irrelevant to what the model learns, as it is constant for a specific map type (e.g., range-angle map).
Regards,
Umut

ReplyQuote
avn
 avn
Active Member
Joined: 1 year ago
Posts: 8
Topic starter  

Thank you @udemirhan for your helpful explanation....


ReplyQuote

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved