ultralytics 8.0.125 NMS speed improvements (#3463)

Co-authored-by: Compunet <117437050+dme-compunet@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-07-03 16:34:13 +02:00
committed by GitHub
parent 0e5a6b8158
commit 8a11eda4a9
6 changed files with 9 additions and 8 deletions

View File

@ -340,7 +340,7 @@ class AutoBackend(nn.Module):
elif self.coreml: # CoreML
im = im[0].cpu().numpy()
im_pil = Image.fromarray((im * 255).astype('uint8'))
# im = im.resize((192, 320), Image.ANTIALIAS)
# im = im.resize((192, 320), Image.BILINEAR)
y = self.model.predict({'image': im_pil}) # coordinates are xywh normalized
if 'confidence' in y:
box = xywh2xyxy(y['coordinates'] * [[w, h, w, h]]) # xyxy pixels