The following code is used perform text binarization on the given scenes and later apply text recognition to recognize the text in the image.
- scene_text_binarization.py - Takes image as input and return text binarized images.
- utils.py - Contains the necessary utility functions used in
scene_text_binarization.py
- code.ipynb - The following is being used to showcase the output images after appying binarization on the images.
- frozen_east_text_detection.pb - Pre-trained model used for text-detection.
- Optical Character Recognition.ipynb - After getting the text-binarized images, easy-ocr is being applied on the images to recognize the text. The file applies easy-ocr on the image and plots the output after text recognition.
- Place the image in
input_images
folder - run
python scene_text_binarization.py
- Output images will be saved in
output_images/<image_name>
- The results can also be reviewed by running the cells of the
code.ipynb
andOptical Character Recgognition.ipynb
.
Input Image:
After binarization: