Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -888,12 +888,12 @@ def predict_with_paper(image, paper_size, offset,offset_unit, finger_clearance=F
|
|
888 |
cv2.drawContours(shrunked_img_contours, contours, -1, (0, 255, 0), thickness=2)
|
889 |
cv2.drawContours(outlines, contours, -1, 0, thickness=2)
|
890 |
|
891 |
-
# Draw paper bounds on annotated image
|
892 |
-
cv2.drawContours(shrunked_img_contours, [paper_contour], -1, (255, 0, 0), thickness=3)
|
893 |
|
894 |
-
# Add paper size text
|
895 |
-
paper_text = f"Paper: {paper_size}"
|
896 |
-
cv2.putText(shrunked_img_contours, paper_text, (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 2)
|
897 |
|
898 |
cleanup_models()
|
899 |
|
|
|
888 |
cv2.drawContours(shrunked_img_contours, contours, -1, (0, 255, 0), thickness=2)
|
889 |
cv2.drawContours(outlines, contours, -1, 0, thickness=2)
|
890 |
|
891 |
+
# # Draw paper bounds on annotated image
|
892 |
+
# cv2.drawContours(shrunked_img_contours, [paper_contour], -1, (255, 0, 0), thickness=3)
|
893 |
|
894 |
+
# # Add paper size text
|
895 |
+
# paper_text = f"Paper: {paper_size}"
|
896 |
+
# cv2.putText(shrunked_img_contours, paper_text, (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 2)
|
897 |
|
898 |
cleanup_models()
|
899 |
|