5 ms·
We are trying automate the entire loan application and processing. So, this involved a lot of character recognition stuff as our target group have their financi
by kumartanmay 9y ago
We are trying automate the entire loan application and processing. So, this involved a lot of character recognition stuff as our target group have their financial documents as hard copies. Helping them autofill their information would make their task easier as well as avoid human errors while typing. So, after reading a few articles, I first designed a OCR using google’s OCR library tesseract. The classifier produced good results when it came to reading standardised documents. But, as the complexity of the document grew, such as reading a cheque, it became challenging to achieve considerable accuracy. So, to avoid the complexities of training a custom classifier and deploying it on the cloud (which would require significant amount of computations) we decided to use Microsoft Azure’s Vision API. It provided us the coordinates of all the texts and all we had to do was look for texts similar to an Account number and IFSC from a cheque book. Using some regex it was easy to find closely matching strings.
Later we extended this to read bank statements, this is where even Azure failed to read everything in the image. We had tried google vision’s API earlier but the output wasn’t satisfactory. So, decided to work on making the image more readable. I came across a lot of image filters whose main motive was to convert the image to only black and white, no other colours. I tried out a lot of them, some of them were the mean, median and gaussian thresholding. The one which worked best for us was a custom designed filter using Otsu’s Thresholding principle.
- winkv 9y agois it possible to share the images that did not work for you?
- kumartanmay 9y agoWe are majorly facing challenge with cheques and bank statements with noisy background. e.g. those of HDFC bank.
- anfractuosity 9y agoOut of interest, with cheques are you facing problems with sort code etc too, if so, I was just wondering, don't they use magnetic ink for those.
- kumartanmay 9y agoNo, magnetic ink is only used at the bottom of the cheque for banking systems to identify the source of cheque.
- zebra9978 9y agois this for US banks ? I'm assuming not. >It provided us the coordinates of all the texts and all we had to do was look for texts similar to an Account number and IFSC from a cheque book. Using some regex it was easy to find closely matching strings Could you explain what you mean by this ? We are trying to read shopping receipts, but I have ZERO background in image processing... so have been trying to figure out what to do. I have been trying to use Google Vision API though. >The one which worked best for us was a custom designed filter using Otsu’s Thresholding principle. Is this where you pre-preocess the image to make it readable ? How does one do it - are these specialized tools or can I do this in python (like http://www.scipy-lectures.org/packages/scikit-image/auto_examples/plot_threshold.html http://www.scipy-lectures.org/packages/scikit-image/auto_exa...)
- abc03 9y agoFor receipts, I recommend: http://ocrsdk.com/ http://ocrsdk.com/ which is the online product of Abbyy. They also have a blog post giving you some ideas: http://blog.ocrsdk.com/top-5-pains-for-developers-in-receipt-ocr/ http://blog.ocrsdk.com/top-5-pains-for-developers-in-receipt... Has anyone successfully implemented it themselves for receipts or invoices? What was your strategy?
- deleted 9y ago[deleted]
- ocrcustomserver 9y agoI can probably help, send me an email.
- zionsrogue 9y agoAdrian here, author of the PyImageSearch blog. I'll add doing a tutorial on cheque recognition (at least the routing and account numbers) to my queue. Thanks for the great suggestion.
- piker 9y agoOne possible alternative solution is to chop the image into smaller images (with something like ImageMagick) based on each value's likely location in the document, then OCR those. You get a confidence interval with tesseract, so you can iterate over possible templates (or shrink/expand crops) until you get an [edit: aggregate] interval you're comfortable with.
- kumartanmay 9y agoThanks for the suggestion. Will try and share the results here
- kumartanmay 9y agoExcept for the size of cheque and the position of magnetic characters, none of the text on cheques is standardised in India. Hence we might stand a chance of chopping characters
- holtalanm 9y agoif you are thinking of using OCR for this, i would suggest SikiliX. It is a Tesseract-based automation tool that is written in Java, but has Jython bindings. I have used it before, and loved it.