Spaces:
Build error
Build error
napatswift
commited on
Commit
•
f10784f
1
Parent(s):
7b83b49
Fix rectangle color
Browse files
main.py
CHANGED
@@ -18,10 +18,11 @@ def get_rec(points):
|
|
18 |
|
19 |
def predict(image_input):
|
20 |
draw_img = image_input.copy()
|
|
|
21 |
output = ocr.readtext(image_input)
|
22 |
for polygon in output['det_polygons']:
|
23 |
p0, p1 = get_rec([int(i) for i in polygon])
|
24 |
-
draw_img = cv2.rectangle(draw_img, p0, p1, (255,
|
25 |
return draw_img
|
26 |
|
27 |
def run():
|
|
|
18 |
|
19 |
def predict(image_input):
|
20 |
draw_img = image_input.copy()
|
21 |
+
print(image_input.shape)
|
22 |
output = ocr.readtext(image_input)
|
23 |
for polygon in output['det_polygons']:
|
24 |
p0, p1 = get_rec([int(i) for i in polygon])
|
25 |
+
draw_img = cv2.rectangle(draw_img, p0, p1, (255,0,0), 2)
|
26 |
return draw_img
|
27 |
|
28 |
def run():
|