Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Vision OCR
  • Getting started
  • Access management
  • Pricing policy
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Request format
  • Service response
  • Image requirements

Face detection

Written by
Yandex Cloud
Updated at September 24, 2024
  • Request format
  • Service response
  • Image requirements

Warning

The Vision OCR features listed below are legacy features discontinued on May 14, 2024.

This section describes how the Yandex Vision OCR face detection feature works.

This feature allows you to detect human faces in an image. For example, you can use it to tag people in a photo or find all photos with portraits.

Note

This feature cannot recognize faces. You will not be able to use it to find similar faces or identify a person.

Request formatRequest format

In the feature type, specify FACE_DETECTION:

{
  "folderId": "b1gvmob95yys********",
  "analyze_specs": [{
    "content": "iVBORw0KGgo...",
    "features": [{
      "type": "FACE_DETECTION"
    }]
  }]
}

Service responseService response

Yandex Vision OCR searches for human faces in the image and marks them with rectangles. In the response, it returns the coordinates of the rectangles for all detected faces:

image

If two faces are adjacent, the rectangles may intersect.

The coordinates of a rectangle are calculated from the top-left corner and specified counterclockwise:

1←4
↓ ↑
2→3

Sample response with the coordinates of the detected face:

{
  "results": [{
    "results": [{
      "faceDetection": {
        "faces": [{
          "boundingBox": {
            "vertices": [{
              "x": "410",
              "y": "404"
            },
            {
              "x": "410",
              "y": "467"
            },
            {
              "x": "559",
              "y": "467"
            },
            {
              "x": "559",
              "y": "404"
            }]
          }
        }]
      }
    }]
  }]
}

Image requirementsImage requirements

An image in a request must meet the following requirements:

  • The supported file formats are JPEG, PNG, and PDF. Specify the MIME type of the file in the mime_type property. The default value is image.
  • The maximum file size is 1 MB.
  • The image size should not exceed 20 MP (height × width).

What's nextWhat's next

  • Try detecting faces in an image
  • Learn how to handle errors

Was the article helpful?

© 2025 Direct Cursus Technology L.L.C.