diff --git a/ultralytics/nn/tasks.py b/ultralytics/nn/tasks.py index fdcec302f..07a040d90 100644 --- a/ultralytics/nn/tasks.py +++ b/ultralytics/nn/tasks.py @@ -341,11 +341,8 @@ class DetectionModel(BaseModel): def _predict_augment(self, x): """Perform augmentations on input image x and return augmented inference and train outputs.""" - if getattr(self, "end2end", False): - LOGGER.warning( - "WARNING ⚠️ End2End model does not support 'augment=True' prediction. " - "Reverting to single-scale prediction." - ) + if getattr(self, "end2end", False) or self.__class__.__name__ != "DetectionModel": + LOGGER.warning("WARNING ⚠️ Model does not support 'augment=True', reverting to single-scale prediction.") return self._predict_once(x) img_size = x.shape[-2:] # height, width s = [1, 0.83, 0.67] # scales