0

I have been working on a POC with Vision API (REST) to extract text from images. I have been fairly successful and I am able to get good responses from the REST API for certain Indian languages (Tamil, Bengali). However, when I try using images with Kannada text in them (example), Vision API responds inconsistently. It either detects the text as from Telugu or it does not detect at all. I have been testing all these images by encoding them to Base 64.

I have linked some of the images I have tried (board, bus1, bus2). Most of them are from the web. I have also tried typing Kannada text in a word document and taking a screenshot of it and saving it as an image (word_doc). For this I receive a blank payload in the response. Why is this happening?

Do I need to modify the JSON request of the API to make it work for Kannada? Could someone help me with this?

Request JSON I am using is:

{"requests":[{"image":{"content":"/9j/4AAQS..."},"features":[{"type":"TEXT_DETECTION","maxResults":10}]}]}

Thanks, Nikhil

  • Have you tried to add a language hint to your request as described here: https://cloud.google.com/vision/docs/languages ? – Arno Jul 24 '20 at 21:08
  • Thanks a lot @Arno ! It did help a lot. The text detection worked fine in these three cases ([example](https://i.stack.imgur.com/UMcp6.jpg), [board](https://i.stack.imgur.com/fRgTY.jpg) and [word_doc](https://i.stack.imgur.com/LcZ39.jpg)). However, the other two images [bus1](https://i.stack.imgur.com/rqwRi.jpg) and [bus2](https://i.stack.imgur.com/F2fm7.jpg), the results were not satisfactory. – Nikhil Venugopal Jul 28 '20 at 03:48

0 Answers0