xref: /aosp_15_r20/external/googleapis/google/cloud/vision/v1p3beta1/web_detection.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2018 Google Inc.
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
15syntax = "proto3";
16
17package google.cloud.vision.v1p3beta1;
18
19
20option cc_enable_arenas = true;
21option go_package = "cloud.google.com/go/vision/apiv1p3beta1/visionpb;visionpb";
22option java_multiple_files = true;
23option java_outer_classname = "WebDetectionProto";
24option java_package = "com.google.cloud.vision.v1p3beta1";
25
26// Relevant information for the image from the Internet.
27message WebDetection {
28  // Entity deduced from similar images on the Internet.
29  message WebEntity {
30    // Opaque entity ID.
31    string entity_id = 1;
32
33    // Overall relevancy score for the entity.
34    // Not normalized and not comparable across different image queries.
35    float score = 2;
36
37    // Canonical description of the entity, in English.
38    string description = 3;
39  }
40
41  // Metadata for online images.
42  message WebImage {
43    // The result image URL.
44    string url = 1;
45
46    // (Deprecated) Overall relevancy score for the image.
47    float score = 2;
48  }
49
50  // Metadata for web pages.
51  message WebPage {
52    // The result web page URL.
53    string url = 1;
54
55    // (Deprecated) Overall relevancy score for the web page.
56    float score = 2;
57
58    // Title for the web page, may contain HTML markups.
59    string page_title = 3;
60
61    // Fully matching images on the page.
62    // Can include resized copies of the query image.
63    repeated WebImage full_matching_images = 4;
64
65    // Partial matching images on the page.
66    // Those images are similar enough to share some key-point features. For
67    // example an original image will likely have partial matching for its
68    // crops.
69    repeated WebImage partial_matching_images = 5;
70  }
71
72  // Label to provide extra metadata for the web detection.
73  message WebLabel {
74    // Label for extra metadata.
75    string label = 1;
76
77    // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
78    // For more information, see
79    // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
80    string language_code = 2;
81  }
82
83  // Deduced entities from similar images on the Internet.
84  repeated WebEntity web_entities = 1;
85
86  // Fully matching images from the Internet.
87  // Can include resized copies of the query image.
88  repeated WebImage full_matching_images = 2;
89
90  // Partial matching images from the Internet.
91  // Those images are similar enough to share some key-point features. For
92  // example an original image will likely have partial matching for its crops.
93  repeated WebImage partial_matching_images = 3;
94
95  // Web pages containing the matching images from the Internet.
96  repeated WebPage pages_with_matching_images = 4;
97
98  // The visually similar image results.
99  repeated WebImage visually_similar_images = 6;
100
101  // Best guess text labels for the request image.
102  repeated WebLabel best_guess_labels = 8;
103}
104