samkit-jain / Handwriting-Recognition

Software to recognize handwriting
Apache License 2.0
63 stars 24 forks source link

Reading the characters in the image file with my own handwriting #18

Open ozlem-atiz opened 2 years ago

ozlem-atiz commented 2 years ago

Hi, I'm using pytesseract to recognize the characters in the jpeg file for a scanned file. But for manually entered text, pytesseract is very bad. How can I use your code for my image file? @samkit-jain

samkit-jain commented 2 years ago

Hi @ozlem-atiz This repo is not designed for recognising continuous handwritten text (feel free to raise a PR that adds support for it). If your text is not continuous or if you are able to crop each character individually from the image as at https://github.com/samkit-jain/Handwriting-Recognition/blob/master/Screenshots/label_5.png, then you can run the model on those. The method https://github.com/samkit-jain/Handwriting-Recognition/blob/785cf3e6ebdbc1d633689fca8ad75f37e6aa2077/Python/drawer.py#L36-L62 is responsible for cropping the character bounding boxes from an image. https://github.com/samkit-jain/Handwriting-Recognition/blob/785cf3e6ebdbc1d633689fca8ad75f37e6aa2077/Python/drawer.py#L99-L125 then converts them to the required EMNIST format and then you can pass in that to the model and get the prediction. Of course, you would have to make some changes and adjust or use the code accordingly.