Fix PIL.ANTIALIAS deprecation (#11801)
This commit is contained in:
1 parent
0004c745da
commit
d19439afeb
1 file changed
+1
-1
+1
-1
@@ -541,7 +541,7 @@ class DetectMultiBackend(nn.Module):
|
|||||||
elif self.coreml: # CoreML
|
elif self.coreml: # CoreML
|
||||||
im = im.cpu().numpy()
|
im = im.cpu().numpy()
|
||||||
im = Image.fromarray((im[0] * 255).astype('uint8'))
|
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
|
y = self.model.predict({'image': im}) # coordinates are xywh normalized
|
||||||
if 'confidence' in y:
|
if 'confidence' in y:
|
||||||
box = xywh2xyxy(y['coordinates'] * [[w, h, w, h]]) # xyxy pixels
|
box = xywh2xyxy(y['coordinates'] * [[w, h, w, h]]) # xyxy pixels
|
||||||
|
|||||||
Reference in new issue
Block a user