1
- // Copyright 2020 Google LLC
1
+ // Copyright 2022 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -46,8 +46,7 @@ service ImageAnnotator {
46
46
"https://www.googleapis.com/auth/cloud-vision" ;
47
47
48
48
// Run image detection and annotation for a batch of images.
49
- rpc BatchAnnotateImages (BatchAnnotateImagesRequest )
50
- returns (BatchAnnotateImagesResponse ) {
49
+ rpc BatchAnnotateImages (BatchAnnotateImagesRequest ) returns (BatchAnnotateImagesResponse ) {
51
50
option (google.api.http ) = {
52
51
post : "/v1/images:annotate"
53
52
body : "*"
@@ -70,8 +69,7 @@ service ImageAnnotator {
70
69
// AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
71
70
// file provided and perform detection and annotation for each image
72
71
// extracted.
73
- rpc BatchAnnotateFiles (BatchAnnotateFilesRequest )
74
- returns (BatchAnnotateFilesResponse ) {
72
+ rpc BatchAnnotateFiles (BatchAnnotateFilesRequest ) returns (BatchAnnotateFilesResponse ) {
75
73
option (google.api.http ) = {
76
74
post : "/v1/files:annotate"
77
75
body : "*"
@@ -96,8 +94,7 @@ service ImageAnnotator {
96
94
//
97
95
// This service will write image annotation outputs to json files in customer
98
96
// GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
99
- rpc AsyncBatchAnnotateImages (AsyncBatchAnnotateImagesRequest )
100
- returns (google .longrunning .Operation ) {
97
+ rpc AsyncBatchAnnotateImages (AsyncBatchAnnotateImagesRequest ) returns (google .longrunning .Operation ) {
101
98
option (google.api.http ) = {
102
99
post : "/v1/images:asyncBatchAnnotate"
103
100
body : "*"
@@ -123,8 +120,7 @@ service ImageAnnotator {
123
120
// `google.longrunning.Operations` interface.
124
121
// `Operation.metadata` contains `OperationMetadata` (metadata).
125
122
// `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
126
- rpc AsyncBatchAnnotateFiles (AsyncBatchAnnotateFilesRequest )
127
- returns (google .longrunning .Operation ) {
123
+ rpc AsyncBatchAnnotateFiles (AsyncBatchAnnotateFilesRequest ) returns (google .longrunning .Operation ) {
128
124
option (google.api.http ) = {
129
125
post : "/v1/files:asyncBatchAnnotate"
130
126
body : "*"
@@ -145,6 +141,28 @@ service ImageAnnotator {
145
141
}
146
142
}
147
143
144
+ // A bucketized representation of likelihood, which is intended to give clients
145
+ // highly stable results across model upgrades.
146
+ enum Likelihood {
147
+ // Unknown likelihood.
148
+ UNKNOWN = 0 ;
149
+
150
+ // It is very unlikely.
151
+ VERY_UNLIKELY = 1 ;
152
+
153
+ // It is unlikely.
154
+ UNLIKELY = 2 ;
155
+
156
+ // It is possible.
157
+ POSSIBLE = 3 ;
158
+
159
+ // It is likely.
160
+ LIKELY = 4 ;
161
+
162
+ // It is very likely.
163
+ VERY_LIKELY = 5 ;
164
+ }
165
+
148
166
// The type of Google Cloud Vision API detection to perform, and the maximum
149
167
// number of results to return for that type. Multiple `Feature` objects can
150
168
// be specified in the `features` list.
@@ -255,28 +273,6 @@ message Image {
255
273
ImageSource source = 2 ;
256
274
}
257
275
258
- // A bucketized representation of likelihood, which is intended to give clients
259
- // highly stable results across model upgrades.
260
- enum Likelihood {
261
- // Unknown likelihood.
262
- UNKNOWN = 0 ;
263
-
264
- // It is very unlikely.
265
- VERY_UNLIKELY = 1 ;
266
-
267
- // It is unlikely.
268
- UNLIKELY = 2 ;
269
-
270
- // It is possible.
271
- POSSIBLE = 3 ;
272
-
273
- // It is likely.
274
- LIKELY = 4 ;
275
-
276
- // It is very likely.
277
- VERY_LIKELY = 5 ;
278
- }
279
-
280
276
// A face annotation object contains the results of face detection.
281
277
message FaceAnnotation {
282
278
// A face-specific landmark (for example, a face feature).
@@ -577,30 +573,6 @@ message SafeSearchAnnotation {
577
573
// covered nudity, lewd or provocative poses, or close-ups of sensitive
578
574
// body areas.
579
575
Likelihood racy = 9 ;
580
-
581
- // Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
582
- // very confident.
583
- float adult_confidence = 16 [deprecated = true ];
584
-
585
- // Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
586
- // very confident.
587
- float spoof_confidence = 18 [deprecated = true ];
588
-
589
- // Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
590
- // very confident.
591
- float medical_confidence = 20 [deprecated = true ];
592
-
593
- // Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
594
- // very confident.
595
- float violence_confidence = 22 [deprecated = true ];
596
-
597
- // Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
598
- // confident.
599
- float racy_confidence = 24 [deprecated = true ];
600
-
601
- // Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
602
- // confident.
603
- float nsfw_confidence = 26 [deprecated = true ];
604
576
}
605
577
606
578
// Rectangle determined by min and max `LatLng` pairs.
@@ -791,8 +763,7 @@ message AnnotateImageResponse {
791
763
// Multiple image annotation requests are batched into a single service call.
792
764
message BatchAnnotateImagesRequest {
793
765
// Required. Individual image annotation requests for this batch.
794
- repeated AnnotateImageRequest requests = 1
795
- [(google.api.field_behavior ) = REQUIRED ];
766
+ repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior ) = REQUIRED ];
796
767
797
768
// Optional. Target project and location to make a call.
798
769
//
@@ -863,10 +834,9 @@ message AnnotateFileResponse {
863
834
864
835
// A list of requests to annotate files using the BatchAnnotateFiles API.
865
836
message BatchAnnotateFilesRequest {
866
- // Required. The list of file annotation requests. Right now we support only
867
- // one AnnotateFileRequest in BatchAnnotateFilesRequest.
868
- repeated AnnotateFileRequest requests = 1
869
- [(google.api.field_behavior ) = REQUIRED ];
837
+ // Required. The list of file annotation requests. Right now we support only one
838
+ // AnnotateFileRequest in BatchAnnotateFilesRequest.
839
+ repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior ) = REQUIRED ];
870
840
871
841
// Optional. Target project and location to make a call.
872
842
//
@@ -914,8 +884,7 @@ message AsyncAnnotateFileResponse {
914
884
// Request for async image annotation for a list of images.
915
885
message AsyncBatchAnnotateImagesRequest {
916
886
// Required. Individual image annotation requests for this batch.
917
- repeated AnnotateImageRequest requests = 1
918
- [(google.api.field_behavior ) = REQUIRED ];
887
+ repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior ) = REQUIRED ];
919
888
920
889
// Required. The desired output location and metadata (e.g. format).
921
890
OutputConfig output_config = 2 [(google.api.field_behavior ) = REQUIRED ];
@@ -945,8 +914,7 @@ message AsyncBatchAnnotateImagesResponse {
945
914
// call.
946
915
message AsyncBatchAnnotateFilesRequest {
947
916
// Required. Individual async file annotation requests for this batch.
948
- repeated AsyncAnnotateFileRequest requests = 1
949
- [(google.api.field_behavior ) = REQUIRED ];
917
+ repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior ) = REQUIRED ];
950
918
951
919
// Optional. Target project and location to make a call.
952
920
//
0 commit comments