Don't run lpr if no text has been found

This commit is contained in:
Josh Hawkins 2024-10-27 12:51:12 -05:00
parent 23ad9aefe0
commit ec9544842b

View File

@ -584,7 +584,7 @@ class EmbeddingMaintainer(threading.Thread):
logger.debug(f"Confidences: {confidences}")
logger.debug(f"Areas: {areas}")
if license_plates:
if len(license_plates) > 0:
for plate, confidence, text_area in zip(license_plates, confidences, areas):
avg_confidence = (
(sum(confidence) / len(confidence)) if confidence else 0