diff options
author | iddqd <iddqd@yandex-team.com> | 2024-06-11 10:12:13 +0300 |
---|---|---|
committer | iddqd <iddqd@yandex-team.com> | 2024-06-11 10:22:43 +0300 |
commit | 07f57e35443ab7f09471caf2dbf1afbcced4d9f7 (patch) | |
tree | a4a7b66ead62e83fa988a2ec2ce6576311c1f4b1 /contrib/libs/yandex-cloud-api-protos/yandex/cloud/ai/ocr/v1/ocr_service.proto | |
parent | 6db3b8ca95e44179e48306a58656fb1f9317d9c3 (diff) | |
download | ydb-07f57e35443ab7f09471caf2dbf1afbcced4d9f7.tar.gz |
add contrib/python/yandexcloud to import
03b7d3cad2237366b55b393e18d4dc5eb222798c
Diffstat (limited to 'contrib/libs/yandex-cloud-api-protos/yandex/cloud/ai/ocr/v1/ocr_service.proto')
-rw-r--r-- | contrib/libs/yandex-cloud-api-protos/yandex/cloud/ai/ocr/v1/ocr_service.proto | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/ai/ocr/v1/ocr_service.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/ai/ocr/v1/ocr_service.proto new file mode 100644 index 0000000000..4cb3f1ccc9 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/ai/ocr/v1/ocr_service.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +package yandex.cloud.ai.ocr.v1; + +import "yandex/cloud/ai/ocr/v1/ocr.proto"; +import "google/api/annotations.proto"; +import "yandex/cloud/validation.proto"; +import "yandex/cloud/api/operation.proto"; +import "yandex/cloud/operation/operation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/ai/ocr/v1;ocr"; +option java_package = "yandex.cloud.api.ai.ocr.v1"; + + +message RecognizeTextRequest { + oneof source { + // Bytes with data + bytes content = 1; + } + + // Specifications of the ([MIME type](https://en.wikipedia.org/wiki/Media_type)). Each specification contains the file to analyze and features to use for analysis. Restrictions: + //* Supported file formats: `JPEG`, `PNG`, `PDF`. + //* Maximum file size: 20 MB. + //* Image size should not exceed 20M pixels (length x width). + //* The number of pages in a PDF file should not exceed 200 (each page counts as 1 request). + string mime_type = 2; + + // List of the languages to recognize text. + // Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `ru`). + repeated string language_codes = 3; + + // Model to use for text detection. + string model = 4 [(length) = "<=50"]; +} + +message RecognizeTextResponse { + // Recognized text blocks in this page or text from entities. + TextAnnotation text_annotation = 1; + // Page number in PDF file. + int64 page = 2; +} + +// A set of methods for the Vision OCR service. +service TextRecognitionService { + + // To send the image for text recognition. + rpc Recognize (RecognizeTextRequest) returns (stream RecognizeTextResponse) { + option (google.api.http) = { post: "/ocr/v1/recognizeText" body: "*" }; + } +} + +message GetRecognitionRequest { + // Operation ID of async recognition request. + string operation_id = 1 [(required) = true, (length) = "<=50"]; +} + +// A set of methods for managing operations for asynchronous API requests. +service TextRecognitionAsyncService { + + // To send the image for asynchronous text recognition. + rpc Recognize (RecognizeTextRequest) returns (operation.Operation) { + option (yandex.cloud.api.operation) = { + response: "google.protobuf.Empty" + }; + option (google.api.http) = { post: "/ocr/v1/recognizeTextAsync" body: "*" }; + } + + // To get recognition results. + rpc GetRecognition(GetRecognitionRequest) returns (stream RecognizeTextResponse) { + option (google.api.http) = { get: "/ocr/v1/getRecognition"}; + } +} |