Jsonwu commited on
Commit
5548d9e
·
verified ·
1 Parent(s): 289bee5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -83,7 +83,7 @@ def iou(boxes1, boxes2):
83
  def predict(img, conf_thresh=0.4):
84
  img_input = [img_transforms(img)]
85
  _, pred = model(img_input)
86
- pred = inter_class_nms(pred['boxes'], pred['scores'])
87
  out_img = img.copy()
88
  draw = ImageDraw.Draw(out_img)
89
  font = ImageFont.truetype("res/Tuffy_Bold.ttf", 25)
 
83
  def predict(img, conf_thresh=0.4):
84
  img_input = [img_transforms(img)]
85
  _, pred = model(img_input)
86
+ pred = [inter_class_nms(pred[0]['boxes'], pred[0]['scores'])]
87
  out_img = img.copy()
88
  draw = ImageDraw.Draw(out_img)
89
  font = ImageFont.truetype("res/Tuffy_Bold.ttf", 25)