web_detection.proto 3.4 KB

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