COCO8 and COCO8-seg Pytest and CI updates (#307)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: RangiLyu <lyuchqi@gmail.com>
This commit is contained in:
Glenn Jocher
2023-01-13 14:34:51 +01:00
committed by GitHub
parent 2bc36d97ce
commit 70427579b8
13 changed files with 254 additions and 59 deletions

View File

@ -47,6 +47,7 @@ class BboxLoss(nn.Module):
@staticmethod
def _df_loss(pred_dist, target):
# Return sum of left and right DFL losses
# Distribution Focal Loss (DFL) proposed in Generalized Focal Loss https://ieeexplore.ieee.org/document/9792391
tl = target.long() # target left
tr = tl + 1 # target right
wl = tr - target # weight left