Peterisfar / YOLOV3

yolov3 by pytorch
MIT License
195 stars 53 forks source link

作者您好,请问yolo_loss中,怎么计算的loss confidence的呀? #38

Open ZhongyuanW opened 3 years ago

ZhongyuanW commented 3 years ago

作者您好,您的代码写得太好了!我在阅读yolo_loss的时候有个疑问,您loss confidence 是怎么计算的呢?特别是iou_max是代表的什么含义呀? image

wangren97 commented 3 years ago

hi, first line means check the IOU between ground truth bounding boxes and predicted ones. second line means find the maximum IOU. third line means if the max IOU is smaller than the predefined threshold, then consider them as no object ones. so finally calculate the loss as object + no object. object: the objectness score should be 1. no object: the objectness score should be 0. The loss follows focal loss type instead of BCE loss.