Spaces:
Sleeping
Sleeping
testing changes
Browse files- extractor.py +9 -4
extractor.py
CHANGED
@@ -60,10 +60,15 @@ def get_card_xy(model_path, image_path):
|
|
60 |
else:
|
61 |
pass
|
62 |
|
63 |
-
x1 = int((x_center - width / 2) * image_width)
|
64 |
-
y1 = int((y_center - height / 2) * image_height)
|
65 |
-
x2 = int((x_center + width / 2) * image_width)
|
66 |
-
y2 = int((y_center + height / 2) * image_height)
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
# draw.rectangle([x1, y1, x2, y2], outline="red", width=2)
|
69 |
# text = f"Class: {class_name}, Score: {final_score:.2f}"
|
|
|
60 |
else:
|
61 |
pass
|
62 |
|
63 |
+
# x1 = int((x_center - width / 2) * image_width)
|
64 |
+
# y1 = int((y_center - height / 2) * image_height)
|
65 |
+
# x2 = int((x_center + width / 2) * image_width)
|
66 |
+
# y2 = int((y_center + height / 2) * image_height)
|
67 |
+
|
68 |
+
x1 = int((x_center - width / 2) * 640)
|
69 |
+
y1 = int((y_center - height / 2) * 640)
|
70 |
+
x2 = int((x_center + width / 2) * 640)
|
71 |
+
y2 = int((y_center + height / 2) * 640)
|
72 |
|
73 |
# draw.rectangle([x1, y1, x2, y2], outline="red", width=2)
|
74 |
# text = f"Class: {class_name}, Score: {final_score:.2f}"
|