Closed YashRunwal closed 3 years ago
@yjh0410 Hi! I think I can plot the heatmaps. Number of heatmaps == Number of classes the model has been trained for. Right? However, I don't understand why IOU Loss is used. Could you explain it a bit?
@YashRunwal Yes, the Number of heatmaps == Number of classes. IoU loss is an common loss function for bbox regression. It doesn't matter whether you use anchor box.
@yjh0410 But in the "Objects as Points" paper, they have mentioned that by using the anchorless method, there is no need of using IOU loss. Also, in the loss_base
function, the IOU loss function has been set to zero. Can you also please take a look at this issue? I am on some sort of deadline. The functionality I want to add would improve this repo as well, I think.
There is no relation between IoU loss and anchor box. For example, Fcos, a famous anchor free detector, uses IoU loss to regress bounding box. IoU loss is just an common loss function for bbox regression. In addition, The loss_base in my project is build for my baseline model to do ablation studies which you can just ignore.
I understand. But in this model, for what purpose is the IOU loss used? From what I can understand, it is used for bounding box regression. The pred_iou
is calculated using the decode_boxes
function and the pred_iou detection head. Then the iou_pred
is calculated using the iou_score
function. In the loss then, there is the following:
gt_box_scale_weight = label[:, :, :, num_classes + 4]
gt_mask = (gt_box_scale_weight > 0.).float()
gt_iou = gt_mask.clone()
Here, we can see that there is groundtruth_iou. This is calculated using a weight
which is assigned during creating a target using gt_creator
. weight = 2.0 - (box_w / w) * (box_h / h)
.
How did you come up with this formula for weight? And what does it do exactly?
In general, IoU loss can improve the performance of a detector, so I add this loss to my model.
The formula of weight refers to YOLOv3 to balance the loss between large and small objects.
Right, so the IOU loss improves the bounding box detection performance. So this model is a hybrid between YOLOv3 and CenterNet. IOU loss is taken from YOLOv3 and the rest of the part is an improvement of CenterNet. I would perhaps try training my network without using IOU loss and check the performance. I will let you know on this thread.
Meanwhile, can you pleasee help me with this (https://github.com/yjh0410/CenterNet-plus/issues/15) issue?
@yjh0410