ZhangAoCanada / RADDet

Range-Azimuth-Doppler Based Radar Object Detection
MIT License
168 stars 39 forks source link

question about function of 'encodeToLabels' in batch_data_generator.py #12

Closed xuzekai1997 closed 2 years ago

xuzekai1997 commented 2 years ago

question

hi, I have a question about transfering gt instances to yolo head data. I thought variable 'iou_mask' is 0 or 1,so I can't understand the shape of gt_labels.(because it should be [16,16,4,6,13]). Hope for your reply.Thank you.

ZhangAoCanada commented 2 years ago

Yes, the variable iou_mask is a binary mask for sure, and the shape of gt_labels is [16, 16, 4, 6, 13] here.

The iou_mask here means: for the current gt box, search the target anchor box(s) if its(their) iou is larger than the threshold (0.3 here). So, the size of iou_mask is related to the number of anchors, and thus it can be directly put into gt_labels for indexing.

The reference of the yolo head part is from YOLO-tf which is the official tensorflow version of YOLOv4. You can view the official implementation for further understanding if you are insterested.

Let me know if there is anything else.