Skip to content

Document Image Recognition:

Algorithm Name: recog_document_text Old Name: detect_document_text

This algorithm could be helpful to transfer a screenshot/photo of a document into text.

Input: an image file

Output: the text found in the input image

import Aiii
c = Aiii.Client("YOUR_API_KEY")

algo = c.algo('algo://adamleo/recog_document_text')
with open("LOCAL_PATH_TO_IMAGE", "rb") as img:
    response = algo.pipe(img.read())

Or use local file path directly:

import Aiii
c = Aiii.Client("YOUR_API_KEY")

algo = c.algo('algo://adamleo/recog_document_text')
response = algo.pipe("LOCAL_PATH_TO_IMAGE")

For cloud storage users, please specify the file path in the cloud:

import Aiii
c = Aiii.Client("YOUR_API_KEY")

algo = c.algo('algo://adamleo/recog_document_text')
response = algo.pipe("data://CLOUD_PATH_TO_IMAGE")