Serialnumberdetectiontool __exclusive__ [ Verified ]

candidates = [] for roi in rois: cropped = enhanced[roi[1]:roi[1]+roi[3], roi[0]:roi[0]+roi[2]] text = pytesseract.image_to_string(cropped, config='--psm 7 -c tessedit_char_whitelist=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-') if re.search(serial_regex, text): candidates.append((text.strip(), confidence_score))