kaist-avelab / K-Radar

4D Radar Object Detection for Autonomous Driving in Various Weather Conditions
309 stars 44 forks source link

AttributeError: 'AnchorHeadSingle' object has no attribute 'get_nms_pred_boxes_for_single_sample' #25

Open florianeboumene opened 9 months ago

florianeboumene commented 9 months ago

Hello, Thank you for your great work.

Since i can not have the entire Dataset because of the size, i have downloaded the dataset in google drive and i want to use it for the training. I have organized it as specify in reamed and i use the default configuration file cfg_RTNH_wide.yaml in main_train_0.py. I set the path of my Dataset and i start the training. The Dataset have been loaded without problem and the training start. but after the first epoch is finished, i have the following error: Test (Subset): 0%| | 0/500 [00:00<?, ?it/s]Traceback (most recent call last): File "main_train_0.py", line 22, in pline.train_network() File "/home/keb-fs/K-Radar/pipelines/pipeline_detection_v1_0.py", line 318, in train_network self.validate_kitti(epoch, list_conf_thr=self.list_val_conf_thr, is_subset=True) File "/home/keb-fs/K-Radar/pipelines/pipeline_detection_v1_0.py", line 467, in validate_kitti dict_out = self.network.list_modules[1].get_nms_pred_boxes_for_single_sample(dict_out, conf_thr, is_nms=True) File "/home/keb-fs/anaconda3/envs/kradar/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'AnchorHeadSingle' object has no attribute 'get_nms_pred_boxes_for_single_sample'

Looking forward to your response.

DongHeePaek commented 9 months ago

Hi @florianeboumene,

The issue occurs in the validation loop after completing one training epoch. If you wish to bypass this code during training, please set 'VAL_PER_EPOCH_SUBSET' and 'VAL_PER_EPOCH_FULL' to a larger number, such as 100.

Thank you.

florianeboumene commented 9 months ago

Hi @DongHeePaek,

I've tested it, and it's functioning properly. However, the validation is no longer being executed. I don't want to bypass the validation code since I also require it. Could you please advise on how to ensure that the evaluation code works without any issues?

Thank you in advance.