Handwritten Digit Recognition using R

r

#1

I am using tesseract package in R to read pre printed and handwritten text / digit on the image and then storing those values in R dataframe

Appreciate if you could guide me on the below 2 queries;

  • How do I add specific english words (text on the image) to the tesseract word list and use it in R ?
  • How do i read all the digits handwritten on the image ?

I tried the following function but it is not reading all the numbers

“”“tesseract(options = list(tessedit_char_whitelist = “01234567890”))”"""

Image has been converted to “Grayscale”

Thanks in advance


#2

Hi,

Why don’t you use Keras package. This package we can not using Generally. For Image recognition I feel you should you keras package.


#3

Thanks. Will explore Keras but any clue about tesseract ?


#4

Hi,

  1. How do I add specific english words (text on the image) to the tesseract word list and use it in R ?
    Ans: - Use Tesseract Control Parameters from below link

https://cran.r-project.org/web/packages/tesseract/vignettes/intro.html

  1. How do i read all the digits handwritten on the image ?
    Ans: May be You need to read one by one image using FOR loop

#5

thanks for the link. It helped however it is somehow not referring to my word list.

Did the configuration as per below link but not working

Now, if you pass the word bazaar as a trailing command line parameter to Tesseract, Tesseract will not bother loading the system dictionary nor the dictionary of frequent words -

tesseract raj_001.jpeg" output --user-words eng.user-words bazaar

Getting below error
Error: unexpected symbol in “text <- tesseract::ocr(“raj_001.jpeg”, conf) bazaar”

Any suggestions ?


#6

Hi

After trying out tesseract in R and Google vision APi in Python still handwritten text on the image was not recognized so I need to take your suggestion of using keras as a last option.

I have few questions, appreciate if you could help with it…

  • Do I need to train the model on MNIST database for digits first and then validate the model on the images having handwritten digits ?

  • Do i need to provide actual raw image jpegs as input to the model or pixel values ?

I want to read the text / digits from the image attached herewith. Based on your experience, do you reckon that keras would help ?

Is there a url that I can refer to ?

Thanks

RA001


#7

@vashish1

if you want to recognise this type of Image you need same image with there target variable or you need to break this image in several parts like “back strength” - > back strength(target variable), “115 kg” - > for this you need to train “115 kg” image. So you need to train Images according to your image and your traget variable.

I attached link I hope it will help you for understanding in Image recognition.
In this tutorial model recognising number plate image. So first they train so many number plate images and then they test with new number plate image.

https://hackernoon.com/latest-deep-learning-ocr-with-keras-and-supervisely-in-15-minutes-34aecd630ed8

I hope it will help you.


#8

Thanks Prem. Sure, looking at the provided link.