Fix labels padding for Letterbox with `center=False` (#17728)

pull/17722/head^2
Mohammed Yasin 14 hours ago committed by GitHub
parent 426879d80d
commit 29361e46d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/data/augment.py

@ -1591,7 +1591,7 @@ class LetterBox:
labels["ratio_pad"] = (labels["ratio_pad"], (left, top)) # for evaluation
if len(labels):
labels = self._update_labels(labels, ratio, dw, dh)
labels = self._update_labels(labels, ratio, left, top)
labels["img"] = img
labels["resized_shape"] = new_shape
return labels

Loading…
Cancel
Save