Upload 3 files
Browse files
src/license_plate_detector_ocr/inference/image_video_processor.py
CHANGED
@@ -33,7 +33,7 @@ def process_image(model_path, image_path, output_path=None):
|
|
33 |
|
34 |
# Draw bounding box and OCR text on the image
|
35 |
cv2.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
36 |
-
label = f"{plate_text} ({confidence:.2f})"
|
37 |
cv2.putText(image, label, (x1, y1 - 10),
|
38 |
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)
|
39 |
|
@@ -108,7 +108,7 @@ def process_video(model_path, video_path, output_path=None):
|
|
108 |
|
109 |
# Draw bounding box and OCR text on the frame
|
110 |
cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
111 |
-
label = f"{plate_text} ({confidence:.2f})"
|
112 |
cv2.putText(frame, label, (x1, y1 - 10),
|
113 |
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)
|
114 |
|
|
|
33 |
|
34 |
# Draw bounding box and OCR text on the image
|
35 |
cv2.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
36 |
+
label = plate_text # f"{plate_text} ({confidence:.2f})"
|
37 |
cv2.putText(image, label, (x1, y1 - 10),
|
38 |
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)
|
39 |
|
|
|
108 |
|
109 |
# Draw bounding box and OCR text on the frame
|
110 |
cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
111 |
+
label = plate_text # f"{plate_text} ({confidence:.2f})"
|
112 |
cv2.putText(frame, label, (x1, y1 - 10),
|
113 |
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)
|
114 |
|