P and R conf thresh to 0.5

This commit is contained in:
Glenn Jocher
2018-10-05 16:01:27 +02:00
parent bce94f6ade
commit 8a87521044
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -282,9 +282,9 @@ def build_targets(pred_boxes, pred_conf, pred_cls, target, anchor_wh, nA, nC, nG
pconf = torch.sigmoid(pred_conf[b, a, gj, gi]).cpu()
iou_pred = bbox_iou(tb, pred_boxes[b, a, gj, gi].cpu())
TP[b, i] = (pconf > 0.9) & (iou_pred > 0.5) & (pcls == tc)
FP[b, i] = (pconf > 0.9) & (TP[b, i] == 0) # coordinates or class are wrong
FN[b, i] = pconf <= 0.9 # confidence score is too low (set to zero)
TP[b, i] = (pconf > 0.5) & (iou_pred > 0.5) & (pcls == tc)
FP[b, i] = (pconf > 0.5) & (TP[b, i] == 0) # coordinates or class are wrong
FN[b, i] = pconf <= 0.5 # confidence score is too low (set to zero)
return tx, ty, tw, th, tconf, tcls, TP, FP, FN, TC