Tensorflow model for OCR

后端 未结 2 1283
暗喜
暗喜 2021-01-30 07:25

I am new in Tensorflow and I am trying to build model which will be able to perform OCR on my images. I have to read 9 characters (fixed in all images), numbers and letters. My

相关标签:
2条回答
  • 2021-01-30 08:01

    There are a couple of ways to deal with this (the following list is not exhaustive).

    1) The first one is word classification directly from your image. If your vocabulary of 9 characters is limited you can train a word specific classifier. You can then convolve this classifier with your image and select the word with the highest probability.

    2) The second option is to train a character classifier, find all characters in your image, and find the most likely line that has the 9 character you are looking for.

    3) The third option is to train a text detector, find all possible text boxes. Then read all text boxes with a sequence-based model, and select the most likely solution that follows your constraints. A simple sequence-based model is introduced in the following paper: http://ai.stanford.edu/~ang/papers/ICPR12-TextRecognitionConvNeuralNets.pdf. Other sequence-based models could be based on HMMs, Connectionist Temporal Classification, Attention based models, etc.

    4) The fourth option are attention-based models that work end-to-end to first find the text and then output the characters one-by-one.

    Note that this list is not exhaustive, there can be many different ways to solve this problem. Other options can even use third party solutions like Abbyy or Tesseract to help solve your problem.

    0 讨论(0)
  • 2021-01-30 08:13

    I'd recommend to train an end-to-end OCR model with attention. You can try the Attention OCR which we used to transcribe street names https://github.com/tensorflow/models/tree/master/research/attention_ocr

    My guess it should work pretty well for your case. Refer to the answer https://stackoverflow.com/a/44461910 for instructions on how to prepare the data for it.

    0 讨论(0)
提交回复
热议问题