123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967 |
- syntax = "proto3";
- package google.cloud.vision.v1p4beta1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/cloud/vision/v1p4beta1/face.proto";
- import "google/cloud/vision/v1p4beta1/geometry.proto";
- import "google/cloud/vision/v1p4beta1/product_search.proto";
- import "google/cloud/vision/v1p4beta1/text_annotation.proto";
- import "google/cloud/vision/v1p4beta1/web_detection.proto";
- import "google/longrunning/operations.proto";
- import "google/protobuf/timestamp.proto";
- import "google/rpc/status.proto";
- import "google/type/color.proto";
- import "google/type/latlng.proto";
- option cc_enable_arenas = true;
- option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
- option java_multiple_files = true;
- option java_outer_classname = "ImageAnnotatorProto";
- option java_package = "com.google.cloud.vision.v1p4beta1";
- option objc_class_prefix = "GCVN";
- service ImageAnnotator {
- option (google.api.default_host) = "vision.googleapis.com";
- option (google.api.oauth_scopes) =
- "https://www.googleapis.com/auth/cloud-platform,"
- "https://www.googleapis.com/auth/cloud-vision";
-
- rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
- returns (BatchAnnotateImagesResponse) {
- option (google.api.http) = {
- post: "/v1p4beta1/images:annotate"
- body: "*"
- };
- option (google.api.method_signature) = "requests";
- }
-
-
-
-
-
-
-
- rpc BatchAnnotateFiles(BatchAnnotateFilesRequest)
- returns (BatchAnnotateFilesResponse) {
- option (google.api.http) = {
- post: "/v1p4beta1/files:annotate"
- body: "*"
- };
- option (google.api.method_signature) = "requests";
- }
-
-
-
-
-
-
-
-
-
- rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest)
- returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1p4beta1/images:asyncBatchAnnotate"
- body: "*"
- };
- option (google.api.method_signature) = "requests,output_config";
- option (google.longrunning.operation_info) = {
- response_type: "AsyncBatchAnnotateImagesResponse"
- metadata_type: "OperationMetadata"
- };
- }
-
-
-
-
-
-
- rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
- returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1p4beta1/files:asyncBatchAnnotate"
- body: "*"
- };
- option (google.api.method_signature) = "requests";
- option (google.longrunning.operation_info) = {
- response_type: "AsyncBatchAnnotateFilesResponse"
- metadata_type: "OperationMetadata"
- };
- }
- }
- message Feature {
-
- enum Type {
-
- TYPE_UNSPECIFIED = 0;
-
- FACE_DETECTION = 1;
-
- LANDMARK_DETECTION = 2;
-
- LOGO_DETECTION = 3;
-
- LABEL_DETECTION = 4;
-
-
-
- TEXT_DETECTION = 5;
-
-
- DOCUMENT_TEXT_DETECTION = 11;
-
-
- SAFE_SEARCH_DETECTION = 6;
-
-
- IMAGE_PROPERTIES = 7;
-
- CROP_HINTS = 9;
-
- WEB_DETECTION = 10;
-
- PRODUCT_SEARCH = 12;
-
- OBJECT_LOCALIZATION = 19;
- }
-
- Type type = 1;
-
-
- int32 max_results = 2;
-
-
-
-
- string model = 3;
- }
- message ImageSource {
-
-
-
-
-
-
- string gcs_image_uri = 1;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- string image_uri = 2;
- }
- message Image {
-
-
-
- bytes content = 1;
-
-
-
- ImageSource source = 2;
- }
- enum Likelihood {
-
- UNKNOWN = 0;
-
- VERY_UNLIKELY = 1;
-
- UNLIKELY = 2;
-
- POSSIBLE = 3;
-
- LIKELY = 4;
-
- VERY_LIKELY = 5;
- }
- message FaceAnnotation {
-
- message Landmark {
-
-
-
-
- enum Type {
-
- UNKNOWN_LANDMARK = 0;
-
- LEFT_EYE = 1;
-
- RIGHT_EYE = 2;
-
- LEFT_OF_LEFT_EYEBROW = 3;
-
- RIGHT_OF_LEFT_EYEBROW = 4;
-
- LEFT_OF_RIGHT_EYEBROW = 5;
-
- RIGHT_OF_RIGHT_EYEBROW = 6;
-
- MIDPOINT_BETWEEN_EYES = 7;
-
- NOSE_TIP = 8;
-
- UPPER_LIP = 9;
-
- LOWER_LIP = 10;
-
- MOUTH_LEFT = 11;
-
- MOUTH_RIGHT = 12;
-
- MOUTH_CENTER = 13;
-
- NOSE_BOTTOM_RIGHT = 14;
-
- NOSE_BOTTOM_LEFT = 15;
-
- NOSE_BOTTOM_CENTER = 16;
-
- LEFT_EYE_TOP_BOUNDARY = 17;
-
- LEFT_EYE_RIGHT_CORNER = 18;
-
- LEFT_EYE_BOTTOM_BOUNDARY = 19;
-
- LEFT_EYE_LEFT_CORNER = 20;
-
- RIGHT_EYE_TOP_BOUNDARY = 21;
-
- RIGHT_EYE_RIGHT_CORNER = 22;
-
- RIGHT_EYE_BOTTOM_BOUNDARY = 23;
-
- RIGHT_EYE_LEFT_CORNER = 24;
-
- LEFT_EYEBROW_UPPER_MIDPOINT = 25;
-
- RIGHT_EYEBROW_UPPER_MIDPOINT = 26;
-
- LEFT_EAR_TRAGION = 27;
-
- RIGHT_EAR_TRAGION = 28;
-
- LEFT_EYE_PUPIL = 29;
-
- RIGHT_EYE_PUPIL = 30;
-
- FOREHEAD_GLABELLA = 31;
-
- CHIN_GNATHION = 32;
-
- CHIN_LEFT_GONION = 33;
-
- CHIN_RIGHT_GONION = 34;
- }
-
- Type type = 3;
-
- Position position = 4;
- }
-
-
-
-
-
-
-
- BoundingPoly bounding_poly = 1;
-
-
-
-
-
-
- BoundingPoly fd_bounding_poly = 2;
-
- repeated Landmark landmarks = 3;
-
-
-
- float roll_angle = 4;
-
-
-
- float pan_angle = 5;
-
-
- float tilt_angle = 6;
-
- float detection_confidence = 7;
-
- float landmarking_confidence = 8;
-
- Likelihood joy_likelihood = 9;
-
- Likelihood sorrow_likelihood = 10;
-
- Likelihood anger_likelihood = 11;
-
- Likelihood surprise_likelihood = 12;
-
- Likelihood under_exposed_likelihood = 13;
-
- Likelihood blurred_likelihood = 14;
-
- Likelihood headwear_likelihood = 15;
-
-
-
-
-
- repeated FaceRecognitionResult recognition_result = 16;
- }
- message LocationInfo {
-
- google.type.LatLng lat_lng = 1;
- }
- message Property {
-
- string name = 1;
-
- string value = 2;
-
- uint64 uint64_value = 3;
- }
- message EntityAnnotation {
-
-
-
- string mid = 1;
-
-
- string locale = 2;
-
- string description = 3;
-
- float score = 4;
-
-
-
-
-
- float confidence = 5 [deprecated = true];
-
-
-
-
-
- float topicality = 6;
-
-
- BoundingPoly bounding_poly = 7;
-
-
-
-
-
- repeated LocationInfo locations = 8;
-
-
- repeated Property properties = 9;
- }
- message LocalizedObjectAnnotation {
-
- string mid = 1;
-
-
-
- string language_code = 2;
-
- string name = 3;
-
- float score = 4;
-
- BoundingPoly bounding_poly = 5;
- }
- message SafeSearchAnnotation {
-
-
-
- Likelihood adult = 1;
-
-
-
- Likelihood spoof = 2;
-
- Likelihood medical = 3;
-
- Likelihood violence = 4;
-
-
-
-
- Likelihood racy = 9;
- }
- message LatLongRect {
-
- google.type.LatLng min_lat_lng = 1;
-
- google.type.LatLng max_lat_lng = 2;
- }
- message ColorInfo {
-
- google.type.Color color = 1;
-
- float score = 2;
-
-
- float pixel_fraction = 3;
- }
- message DominantColorsAnnotation {
-
- repeated ColorInfo colors = 1;
- }
- message ImageProperties {
-
- DominantColorsAnnotation dominant_colors = 1;
- }
- message CropHint {
-
-
- BoundingPoly bounding_poly = 1;
-
- float confidence = 2;
-
-
- float importance_fraction = 3;
- }
- message CropHintsAnnotation {
-
- repeated CropHint crop_hints = 1;
- }
- message CropHintsParams {
-
-
-
-
-
-
- repeated float aspect_ratios = 1;
- }
- message WebDetectionParams {
-
- bool include_geo_results = 2;
- }
- message TextDetectionParams {
-
-
-
- bool enable_text_detection_confidence_score = 9;
-
- repeated string advanced_ocr_options = 11;
- }
- message ImageContext {
-
- LatLongRect lat_long_rect = 1;
-
-
-
-
-
-
-
-
- repeated string language_hints = 2;
-
- CropHintsParams crop_hints_params = 4;
-
- FaceRecognitionParams face_recognition_params = 10;
-
- ProductSearchParams product_search_params = 5;
-
- WebDetectionParams web_detection_params = 6;
-
- TextDetectionParams text_detection_params = 12;
- }
- message AnnotateImageRequest {
-
- Image image = 1;
-
- repeated Feature features = 2;
-
- ImageContext image_context = 3;
- }
- message ImageAnnotationContext {
-
- string uri = 1;
-
-
- int32 page_number = 2;
- }
- message AnnotateImageResponse {
-
- repeated FaceAnnotation face_annotations = 1;
-
- repeated EntityAnnotation landmark_annotations = 2;
-
- repeated EntityAnnotation logo_annotations = 3;
-
- repeated EntityAnnotation label_annotations = 4;
-
-
- repeated LocalizedObjectAnnotation localized_object_annotations = 22;
-
- repeated EntityAnnotation text_annotations = 5;
-
-
-
-
- TextAnnotation full_text_annotation = 12;
-
- SafeSearchAnnotation safe_search_annotation = 6;
-
- ImageProperties image_properties_annotation = 8;
-
- CropHintsAnnotation crop_hints_annotation = 11;
-
- WebDetection web_detection = 13;
-
- ProductSearchResults product_search_results = 14;
-
-
-
- google.rpc.Status error = 9;
-
-
- ImageAnnotationContext context = 21;
- }
- message BatchAnnotateImagesRequest {
-
- repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
- }
- message BatchAnnotateImagesResponse {
-
- repeated AnnotateImageResponse responses = 1;
- }
- message AnnotateFileRequest {
-
- InputConfig input_config = 1;
-
- repeated Feature features = 2;
-
- ImageContext image_context = 3;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- repeated int32 pages = 4;
- }
- message AnnotateFileResponse {
-
- InputConfig input_config = 1;
-
-
- repeated AnnotateImageResponse responses = 2;
-
- int32 total_pages = 3;
-
-
- google.rpc.Status error = 4;
- }
- message BatchAnnotateFilesRequest {
-
-
- repeated AnnotateFileRequest requests = 1
- [(google.api.field_behavior) = REQUIRED];
- }
- message BatchAnnotateFilesResponse {
-
-
- repeated AnnotateFileResponse responses = 1;
- }
- message AsyncAnnotateFileRequest {
-
- InputConfig input_config = 1;
-
- repeated Feature features = 2;
-
- ImageContext image_context = 3;
-
- OutputConfig output_config = 4;
- }
- message AsyncAnnotateFileResponse {
-
- OutputConfig output_config = 1;
- }
- message AsyncBatchAnnotateImagesRequest {
-
- repeated AnnotateImageRequest requests = 1
- [(google.api.field_behavior) = REQUIRED];
-
- OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
- }
- message AsyncBatchAnnotateImagesResponse {
-
- OutputConfig output_config = 1;
- }
- message AsyncBatchAnnotateFilesRequest {
-
- repeated AsyncAnnotateFileRequest requests = 1
- [(google.api.field_behavior) = REQUIRED];
- }
- message AsyncBatchAnnotateFilesResponse {
-
-
- repeated AsyncAnnotateFileResponse responses = 1;
- }
- message InputConfig {
-
- GcsSource gcs_source = 1;
-
-
-
-
-
-
- bytes content = 3;
-
-
- string mime_type = 2;
- }
- message OutputConfig {
-
- GcsDestination gcs_destination = 1;
-
-
-
-
-
-
-
-
-
-
-
- int32 batch_size = 2;
- }
- message GcsSource {
-
-
- string uri = 1;
- }
- message GcsDestination {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- string uri = 1;
- }
- message OperationMetadata {
-
- enum State {
-
- STATE_UNSPECIFIED = 0;
-
- CREATED = 1;
-
- RUNNING = 2;
-
- DONE = 3;
-
- CANCELLED = 4;
- }
-
- State state = 1;
-
- google.protobuf.Timestamp create_time = 5;
-
- google.protobuf.Timestamp update_time = 6;
- }
|