diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 839ac6216c..6ca4f42393 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.3.34" +__version__ = "8.3.35" import os diff --git a/ultralytics/engine/predictor.py b/ultralytics/engine/predictor.py index fbe593e065..c28e1895d0 100644 --- a/ultralytics/engine/predictor.py +++ b/ultralytics/engine/predictor.py @@ -153,7 +153,11 @@ class BasePredictor: (list): A list of transformed images. """ same_shapes = len({x.shape for x in im}) == 1 - letterbox = LetterBox(self.imgsz, auto=same_shapes and self.model.pt, stride=self.model.stride) + letterbox = LetterBox( + self.imgsz, + auto=same_shapes and (self.model.pt or getattr(self.model, "dynamic", False)), + stride=self.model.stride, + ) return [letterbox(image=x) for x in im] def postprocess(self, preds, img, orig_imgs):