Text detection

The text in an image can be identified by using the text_detection method, as follows:

response_text = client.text_detection({'source' : {'image_uri': "gs://kish-bucket/11.jpg"},})

The output of response_text is as follows:

Note that the output of the text_detection method is the bounding box of the various text that is present in the image.

Also, note that the description of text_annotations provides the text detected in the image.

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.