Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,8 @@ def image_predict(image):
|
|
89 |
res = check_acc(box)
|
90 |
annotated_frame = results[0].plot()
|
91 |
if len(res) >0:
|
92 |
-
|
|
|
93 |
send_email(res)
|
94 |
return (res, annotated_frame)
|
95 |
|
@@ -119,7 +120,8 @@ def extract_frames(video):
|
|
119 |
annotated_frame = results[0].plot()
|
120 |
|
121 |
if len(res) >0:
|
122 |
-
|
|
|
123 |
send_email(res)
|
124 |
return (res, annotated_frame)
|
125 |
|
|
|
89 |
res = check_acc(box)
|
90 |
annotated_frame = results[0].plot()
|
91 |
if len(res) >0:
|
92 |
+
annotated_frame_bgr = cv2.cvtColor(annotated_frame, cv2.COLOR_RGB2BGR)
|
93 |
+
cv2.imwrite("./result/res.png", annotated_frame_bgr)
|
94 |
send_email(res)
|
95 |
return (res, annotated_frame)
|
96 |
|
|
|
120 |
annotated_frame = results[0].plot()
|
121 |
|
122 |
if len(res) >0:
|
123 |
+
annotated_frame_bgr = cv2.cvtColor(annotated_frame, cv2.COLOR_RGB2BGR)
|
124 |
+
cv2.imwrite("./result/res.png", annotated_frame_bgr)
|
125 |
send_email(res)
|
126 |
return (res, annotated_frame)
|
127 |
|