Fix PIL.ANTIALIAS deprecation (#11801)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2023-07-03 01:48:43 +02:00
1 parent 0004c745da
commit d19439afeb
1 file changed
+1 -1
+1 -1
View File
@@ -541,7 +541,7 @@ class DetectMultiBackend(nn.Module):
elif self.coreml: # CoreML
im = im.cpu().numpy()
im = Image.fromarray((im[0] * 255).astype('uint8'))
# im = im.resize((192, 320), Image.ANTIALIAS)
# im = im.resize((192, 320), Image.BILINEAR)
y = self.model.predict({'image': im}) # coordinates are xywh normalized
if 'confidence' in y:
box = xywh2xyxy(y['coordinates'] * [[w, h, w, h]]) # xyxy pixels