I am new to tensorflow, so i am little bit confuse in tensorflow there are multiple model to perform OCR like
- attention_ocr
- street
I have below document which i have to perform OCR. I tried to use pytesseract
to read image but not giving proper result.
I need below result from above image
D MANIKANDAN
DURAISAMY
16/07/1986
BNZPM2501F
Please suggest me please tensorflow modal is useful to perform above OCR. I am using below code to get data from pytesseract
def getData(coordinate, image):
(y1, y2, x1, x2, classification) = coordinate
ts = int(time.time())
height = y2-y1
width = x2-x1
crop = image[y1:y1+height, x1:x1+width]
CROP_IMAGE_URL = EXPORT_PATH +"data.jpg"
cv2.imwrite(CROP_IMAGE_URL, crop)
img = cv2.imread(CROP_IMAGE_URL)
text = pytesseract.image_to_string(img)
os.remove(CROP_IMAGE_URL)
return text
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…