Fix _predict_augment and add warning (#16056)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
d0dd2b9313
commit
b00f4afefa
1 changed files with 2 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue