DSatishchandra commited on
Commit
2e7bee0
·
verified ·
1 Parent(s): 9652938

Create kyc_processor.py

Browse files
Files changed (1) hide show
  1. modules/kyc_processor.py +9 -0
modules/kyc_processor.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import pytesseract
2
+ import cv2
3
+
4
+ def extract_text_from_id(image_path):
5
+ image = cv2.imread(image_path)
6
+ return pytesseract.image_to_string(image)
7
+
8
+ def verify_id(document_text):
9
+ return "Name" in document_text and "DOB" in document_text # simple example