ultralytics 8.0.170 apply is_list fixes for torch.Tensor inputs (#4713)

Co-authored-by: Gezhi Zhang <765724965@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-09-04 02:22:05 +02:00 committed by GitHub
parent a1c1d6b483
commit aa9133bb88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 74 additions and 36 deletions

View file

@ -205,7 +205,7 @@ class Results(SimpleClass):
```
"""
if img is None and isinstance(self.orig_img, torch.Tensor):
img = (self.orig_img[0].detach().permute(1, 2, 0).cpu().contiguous() * 255).to(torch.uint8).numpy()
img = (self.orig_img[0].detach().permute(1, 2, 0).contiguous() * 255).to(torch.uint8).cpu().numpy()
# Deprecation warn TODO: remove in 8.2
if 'show_conf' in kwargs: