Update loss.py

exp-b
Laughing-q 3 months ago
parent 83c967e1d6
commit 3d81d9bba5
  1. 2
      ultralytics/utils/loss.py

@ -221,7 +221,7 @@ class v8DetectionLoss:
dfl_conf = (dfl_conf.amax(-1).mean(-1) + dfl_conf.amax(-1).amin(-1)) / 2 dfl_conf = (dfl_conf.amax(-1).mean(-1) + dfl_conf.amax(-1).amin(-1)) / 2
_, target_bboxes, target_scores, fg_mask, _ = self.assigner( _, target_bboxes, target_scores, fg_mask, _ = self.assigner(
pred_scores.detach().sigmoid() * 0.7 + dfl_conf.unsqueeze(-1) * 0.3, pred_scores.detach().sigmoid() * 0.8 + dfl_conf.unsqueeze(-1) * 0.2,
# pred_scores.detach().sigmoid(), # pred_scores.detach().sigmoid(),
(pred_bboxes.detach() * stride_tensor).type(gt_bboxes.dtype), (pred_bboxes.detach() * stride_tensor).type(gt_bboxes.dtype),
anchor_points * stride_tensor, anchor_points * stride_tensor,

Loading…
Cancel
Save