Spaces:
Sleeping
Sleeping
import pytesseract | |
import cv2 | |
def extract_text_from_id(image_path): | |
image = cv2.imread(image_path) | |
return pytesseract.image_to_string(image) | |
def verify_id(document_text): | |
return "Name" in document_text and "DOB" in document_text # simple example | |