Russian language OCR built with U-Net models and CRNN (plus additional Faster-RCNN for russian passport recognition task).
Use by running pipeline_general.py (for general text recognition purposes)
or pipeline_passport.py (for Russian Federation passport recognition)
Recognition model that is presented here were trained on these fonts (cyrillic): Arial, Courier New, OCR B.
General system pipeline:
- U-Net trained to segment lines of text from image (pic. 1).
- U-Net trained to segment words from lines of text (pic. 2).
- CRNN trained to recognize words (fonts, on which it was trained are located in ./data_generator/fonts/).
pic. 1 (Mask of lines in the image)
pic. 2 (Mask of words in line)
pic. 3 (Recognition of words by CRNN)
You should re-train CRNN with fonts that it will be recognizing in your task (add your fonts to data_generator/fonts/ and proceed to Russian_OCR_part_1.ipynb).
Faster-RCNN were added to detect area of image with First name, Last name and Patronymic (pic. 4).
pic. 4 (Passport recognition)
Then General pipeline is used to recognize this as regular image.