Skip to content

Commit

Permalink
Update loss.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mkang315 authored May 14, 2024
1 parent 0829160 commit 1bd43fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def __call__(self, p, targets): # predictions, targets
pxy = pxy.sigmoid() * 2 - 0.5
pwh = (pwh.sigmoid() * 2) ** 2 * anchors[i]
pbox = torch.cat((pxy, pwh), 1) # predicted box
iou = bbox_iou(pbox, tbox[i], ESIoU=True).squeeze() # iou(prediction, target)
iou = bbox_iou(pbox, tbox[i], EIoU=True).squeeze() # iou(prediction, target)
lbox += (1.0 - iou).mean() # iou loss

# Objectness
Expand Down

0 comments on commit 1bd43fe

Please sign in to comment.