valeoai / RADIal

[CVPR 2022] RADIAl: Raw High-Definition Radar for Multi-Task Learning
180 stars 57 forks source link

the integrity of the data “ready to use” #53

Open Lime2333 opened 1 year ago

Lime2333 commented 1 year ago

Hi, thank you very much for the great research about RADIal. I have some questions about how to use the "ready to use" RADIal dataset:

I wonder whether there is something wrong with my process, or whether the file is missing ,Because when I decompress, I will be prompted that the file is missing.

yanglijay commented 1 year ago

Actually I encountered the same problem as yours. I added the following code to /FFTRadNet/dataset/dataset.py and the problem is temporarily solved. This is used to remove the radar_FFT labels that are not exist.

def __remove_nonexist_file__(self):
    labels = self.labels[:, 0]
    nonexist_file_ = []
    for i in range(labels.__len__()):
        curr_file = os.path.join(self.root_dir, 'radar_FFT',"fft_{:06d}.npy".format(labels[i]))
        search_result = os.path.isfile(curr_file)
        if (search_result == False):
            nonexist_file_.append(labels[i])
    self.nonexist_file = np.array(nonexist_file_)
    for item in self.nonexist_file:
        index = np.where(self.labels[:,0] == item)
        self.labels = np.delete(self.labels, index, axis=0)
    return self.labels

Also remebler to use this code at the beginning of the dataset.py file as follows:

def __init__(self, root_dir,statistics=None,encoder=None,difficult=False):

    self.root_dir = root_dir
    self.statistics = statistics
    self.encoder = encoder

    self.labels = pd.read_csv(os.path.join(root_dir,'labels.csv')).to_numpy()
    self.labels = self.__remove_nonexist_file__()
Lime2333 commented 1 year ago

Thank you for your solution. I'll give it a try. And I hope it won't affect the performance too much.

yyxr75 commented 11 months ago

Have you guys figured out how to produce RA heatmap from radar_FFT.npy s?