face.proto 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. import "google/api/annotations.proto";
  18. import "google/cloud/vision/v1p4beta1/geometry.proto";
  19. option cc_enable_arenas = true;
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "CelebrityProto";
  23. option java_package = "com.google.cloud.vision.v1p4beta1";
  24. option objc_class_prefix = "GCVN";
  25. // Parameters for a celebrity recognition request.
  26. message FaceRecognitionParams {
  27. // The resource names for one or more
  28. // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
  29. // set is preloaded and can be specified as "builtin/default". If this is
  30. // specified, the algorithm will try to match the faces detected in the input
  31. // image to the Celebrities in the CelebritySets.
  32. repeated string celebrity_set = 1;
  33. }
  34. // A Celebrity is a group of Faces with an identity.
  35. message Celebrity {
  36. // The resource name of the preloaded Celebrity. Has the format
  37. // `builtin/{mid}`.
  38. string name = 1;
  39. // The Celebrity's display name.
  40. string display_name = 2;
  41. // The Celebrity's description.
  42. string description = 3;
  43. }
  44. // Information about a face's identity.
  45. message FaceRecognitionResult {
  46. // The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
  47. // matched to.
  48. Celebrity celebrity = 1;
  49. // Recognition confidence. Range [0, 1].
  50. float confidence = 2;
  51. }