Spaces:
Runtime error
Runtime error
ASL app
Browse files
app.py
CHANGED
|
@@ -12,17 +12,9 @@ def show_preds_image(image_path):
|
|
| 12 |
print(image_path)
|
| 13 |
image = cv2.imread(image_path)
|
| 14 |
outputs = model.predict(source=image_path)
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
results = outputs[0]#.cpu().numpy()
|
| 19 |
-
#for i, det in enumerate(results.boxes.xyxy):
|
| 20 |
-
cls = 'test'#TargetMapper[results.boxes.cls[0]]
|
| 21 |
-
print(results.boxes)
|
| 22 |
-
print(results[0].boxes)
|
| 23 |
det = results.boxes.xyxy[0]
|
| 24 |
-
#print(det)
|
| 25 |
-
#print(cls)
|
| 26 |
cv2.rectangle(
|
| 27 |
image,
|
| 28 |
(int(det[0]), int(det[1])),
|
|
|
|
| 12 |
print(image_path)
|
| 13 |
image = cv2.imread(image_path)
|
| 14 |
outputs = model.predict(source=image_path)
|
| 15 |
+
results = outputs[0]
|
| 16 |
+
cls = TargetMapper[results.boxes.cls.numpy()[0]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
det = results.boxes.xyxy[0]
|
|
|
|
|
|
|
| 18 |
cv2.rectangle(
|
| 19 |
image,
|
| 20 |
(int(det[0]), int(det[1])),
|