Spaces:
Running
Running
Update app.py
Browse files
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)
|