Performs text detection + text recorgnition using OpenCV, Python, and Tesseract
OCR utilizees an LSTM, a type of RNN
- Use OpenCV EAST text detector to find text in an image -> gives bounding box coordinates
- Extract each of these Region of Interests (ROI) and pass into Tessearct deep learning recognition algorithm
- Output gives us OCR results
- Draw results on output
Tesseract binary needs flags:
-l: language of input text-oem: OCR Engine Mode, controls algorithm usedpsm: Page Segmentation Mode
pip install opencv-python numpy pytesseract imutils
source ocr_env/bin/activate
python text_recognition.py --east frozen_east_text_detection.pb --image images/image1.png
Adding --padding 0.25 increases the bounding box; larger number means bigger bounding box