web_detection.proto 3.3 KB

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