xref: /aosp_15_r20/external/googleapis/google/cloud/vision/v1p4beta1/web_detection.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2019 Google LLC.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15
16syntax = "proto3";
17
18package google.cloud.vision.v1p4beta1;
19
20
21option cc_enable_arenas = true;
22option go_package = "cloud.google.com/go/vision/apiv1p4beta1/visionpb;visionpb";
23option java_multiple_files = true;
24option java_outer_classname = "WebDetectionProto";
25option java_package = "com.google.cloud.vision.v1p4beta1";
26option objc_class_prefix = "GCVN";
27
28// Relevant information for the image from the Internet.
29message WebDetection {
30  // Entity deduced from similar images on the Internet.
31  message WebEntity {
32    // Opaque entity ID.
33    string entity_id = 1;
34
35    // Overall relevancy score for the entity.
36    // Not normalized and not comparable across different image queries.
37    float score = 2;
38
39    // Canonical description of the entity, in English.
40    string description = 3;
41  }
42
43  // Metadata for online images.
44  message WebImage {
45    // The result image URL.
46    string url = 1;
47
48    // (Deprecated) Overall relevancy score for the image.
49    float score = 2;
50  }
51
52  // Metadata for web pages.
53  message WebPage {
54    // The result web page URL.
55    string url = 1;
56
57    // (Deprecated) Overall relevancy score for the web page.
58    float score = 2;
59
60    // Title for the web page, may contain HTML markups.
61    string page_title = 3;
62
63    // Fully matching images on the page.
64    // Can include resized copies of the query image.
65    repeated WebImage full_matching_images = 4;
66
67    // Partial matching images on the page.
68    // Those images are similar enough to share some key-point features. For
69    // example an original image will likely have partial matching for its
70    // crops.
71    repeated WebImage partial_matching_images = 5;
72  }
73
74  // Label to provide extra metadata for the web detection.
75  message WebLabel {
76    // Label for extra metadata.
77    string label = 1;
78
79    // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
80    // For more information, see
81    // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
82    string language_code = 2;
83  }
84
85  // Deduced entities from similar images on the Internet.
86  repeated WebEntity web_entities = 1;
87
88  // Fully matching images from the Internet.
89  // Can include resized copies of the query image.
90  repeated WebImage full_matching_images = 2;
91
92  // Partial matching images from the Internet.
93  // Those images are similar enough to share some key-point features. For
94  // example an original image will likely have partial matching for its crops.
95  repeated WebImage partial_matching_images = 3;
96
97  // Web pages containing the matching images from the Internet.
98  repeated WebPage pages_with_matching_images = 4;
99
100  // The visually similar image results.
101  repeated WebImage visually_similar_images = 6;
102
103  // The service's best guess as to the topic of the request image.
104  // Inferred from similar images on the open web.
105  repeated WebLabel best_guess_labels = 8;
106}
107