ultralytics 8.0.122 Fix torch.Tensor inference (#3363)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: krzysztof.gonia <4281421+kgonia@users.noreply.github.com>
This commit is contained in:
parent
51d8cfa9c3
commit
682c9ef70f
16 changed files with 471 additions and 154 deletions
|
|
@ -198,6 +198,10 @@ class Results(SimpleClass):
|
|||
Returns:
|
||||
(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
|
||||
|
||||
# Deprecation warn TODO: remove in 8.2
|
||||
if 'show_conf' in kwargs:
|
||||
deprecation_warn('show_conf', 'conf')
|
||||
|
|
@ -305,7 +309,7 @@ class Results(SimpleClass):
|
|||
file_name (str | pathlib.Path): File name.
|
||||
"""
|
||||
if self.probs is not None:
|
||||
LOGGER.warning('Warning: Classify task do not support `save_crop`.')
|
||||
LOGGER.warning('WARNING ⚠️ Classify task do not support `save_crop`.')
|
||||
return
|
||||
if isinstance(save_dir, str):
|
||||
save_dir = Path(save_dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue