Text and Boxes

Text and Boxes

Demonstrate the extraction of the text from images.

You can load your picture by selecting “CHOOSE FILE”

Various text fields will be extracted and text from the image will be transcribed and displayed in the results section.

%!s()

Request parameters

Description
Parameter’s name Parameter’s type Description
out_filters string Optional. Comma separated list of model outputs to return.
image image
curl-form
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: multipart/form-data' \
    -F "out_filters=output" \
    -F "image=image_value" \
    https://cloud.kibernetika.io/api/v0.2/workspace/kuberlab-demo/serving/basic-ocr/form-data
curl-json
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '
      {
        "image": "base64_encoded_image_contents"
      }
    '
    https://cloud.kibernetika.io/api/v0.2/workspace/kuberlab-demo/serving/basic-ocr/proxy
python
import kclient
from kclient.utils import client, request


cl = client.with_bearer_token("YOUR_USER_TOKEN")
serving_api = kclient.api.serving_api.ServingApi(cl)

data = request.make(files={
    "image": "/path/to/image_file",
})
resp = serving_api.serving_proxy(data, "kuberlab-demo", "basic-ocr")

Response format

{
  "output": [
    [
      "base64_encoded_string"
    ]
  ],
  "table_output": [
    [
      "base64_encoded_string"
    ]
  ]
}