nakamura196 commited on
Commit
b805255
1 Parent(s): 339fae8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,7 @@ model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt', source="l
21
 
22
  def yolo(im, size=1024):
23
  g = (size / max(im.size)) # gain
24
- im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
25
 
26
  results = model(im) # inference
27
  results.render() # updates results.imgs with boxes and labels
 
21
 
22
  def yolo(im, size=1024):
23
  g = (size / max(im.size)) # gain
24
+ im = im.resize((int(x * g) for x in im.size), Image.BICUBIC) # resize
25
 
26
  results = model(im) # inference
27
  results.render() # updates results.imgs with boxes and labels