Spaces:
Sleeping
Sleeping
stphtan94117
commited on
Commit
·
6dd03df
1
Parent(s):
a7faf38
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def yolo(im):
|
|
32 |
results = model(im, size=1280) # inference
|
33 |
results.render() # updates results.imgs with boxes and labels
|
34 |
|
35 |
-
df = results.pandas().xyxy[0].sort_values('xmin')[
|
36 |
res = json.loads(df)
|
37 |
|
38 |
return [Image.fromarray(results.ims[0]), res]
|
|
|
32 |
results = model(im, size=1280) # inference
|
33 |
results.render() # updates results.imgs with boxes and labels
|
34 |
|
35 |
+
df = results.pandas().xyxy[0].sort_values('xmin')['name'].tolist() # 可以把[['name']]刪除即可顯示全部
|
36 |
res = json.loads(df)
|
37 |
|
38 |
return [Image.fromarray(results.ims[0]), res]
|