Object Detection & Classification

Show info about photo: objects, faces, give the title to the picture and detect pose if applicable.

Request parameters

Description
Parameter’s name Parameter’s type Description
out_filters string Optional. Comma separated list of model outputs to return.
input image image to analyze
detect_objects bool Detect objects and tag image
detect_faces bool Detect faces on image
detect_poses bool Detect poses for persons on image
build_caption bool Build caption for image
curl-form
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: multipart/form-data' \
    -F "out_filters=output" \
    -F "input=input_value" \
    -F "detect_objects=detect_objects_value" \
    -F "detect_faces=detect_faces_value" \
    -F "detect_poses=detect_poses_value" \
    -F "build_caption=build_caption_value" \
    https://cloud.kibernetika.io/api/v0.2/workspace/hpc/serving/photo-inside-picture/form-data
curl-json
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '
      {
        "build_caption": true,
        "detect_faces": true,
        "detect_objects": true,
        "detect_poses": true,
        "input": "base64_encoded_input_contents"
      }
    '
    https://cloud.kibernetika.io/api/v0.2/workspace/hpc/serving/photo-inside-picture/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(data={
    "detect_objects": true,
    "detect_faces": true,
    "detect_poses": true,
    "build_caption": true,
}, files={
    "input": "/path/to/input_file",
})
resp = serving_api.serving_proxy(data, "hpc", "photo-inside-picture")

Response format

{
  "output": "base64_encoded_image",
  "table_output": [
    {
      "type": "object",
      "name": "person",
      "prob": 0.99,
      "image": "base64_encoded_image"
    }
  ],
  "caption_output": [
    "a group of people walking down a street."
  ]
}