diff --git a/ultralytics/yolo/engine/predictor.py b/ultralytics/yolo/engine/predictor.py index 2ea7a27..0f6eb0d 100644 --- a/ultralytics/yolo/engine/predictor.py +++ b/ultralytics/yolo/engine/predictor.py @@ -230,10 +230,6 @@ class BasePredictor: self.model.warmup(imgsz=(1 if self.model.pt or self.model.triton else self.dataset.bs, 3, *self.imgsz)) self.done_warmup = True - # Checks - if self.source_type.tensor and (self.args.save or self.args.save_txt or self.args.show): - LOGGER.warning("WARNING ⚠️ 'save', 'save_txt' and 'show' arguments not enabled for torch.Tensor inference.") - self.seen, self.windows, self.batch, profilers = 0, [], None, (ops.Profile(), ops.Profile(), ops.Profile()) self.run_callbacks('on_predict_start') for batch in self.dataset: diff --git a/ultralytics/yolo/engine/results.py b/ultralytics/yolo/engine/results.py index 085752e..c347da0 100644 --- a/ultralytics/yolo/engine/results.py +++ b/ultralytics/yolo/engine/results.py @@ -199,8 +199,7 @@ class Results(SimpleClass): (numpy.ndarray): A numpy array of the annotated image. """ if img is None and isinstance(self.orig_img, torch.Tensor): - LOGGER.warning('WARNING ⚠️ Results plotting is not supported for torch.Tensor image types.') - return + img = np.ascontiguousarray(self.orig_img[0].permute(1, 2, 0).cpu().detach().numpy()) * 255 # Deprecation warn TODO: remove in 8.2 if 'show_conf' in kwargs: