Fixed multiscale preprocess_batch (#15392)

pull/15383/head^2
Francesco Mattioli 3 months ago committed by GitHub
parent 63e26e1fc8
commit 592f421663
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/models/yolo/detect/train.py

@ -60,7 +60,7 @@ class DetectionTrainer(BaseTrainer):
if self.args.multi_scale:
imgs = batch["img"]
sz = (
random.randrange(self.args.imgsz * 0.5, self.args.imgsz * 1.5 + self.stride)
random.randrange(int(self.args.imgsz * 0.5), int(self.args.imgsz * 1.5 + self.stride))
// self.stride
* self.stride
) # size

Loading…
Cancel
Save