image.proto 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. // Copyright 2020 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. syntax = "proto3";
  15. package google.cloud.automl.v1beta1;
  16. import "google/api/resource.proto";
  17. import "google/cloud/automl/v1beta1/annotation_spec.proto";
  18. import "google/cloud/automl/v1beta1/classification.proto";
  19. import "google/protobuf/timestamp.proto";
  20. import "google/api/annotations.proto";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "ImageProto";
  24. option java_package = "com.google.cloud.automl.v1beta1";
  25. option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
  26. option ruby_package = "Google::Cloud::AutoML::V1beta1";
  27. // Dataset metadata that is specific to image classification.
  28. message ImageClassificationDatasetMetadata {
  29. // Required. Type of the classification problem.
  30. ClassificationType classification_type = 1;
  31. }
  32. // Dataset metadata specific to image object detection.
  33. message ImageObjectDetectionDatasetMetadata {
  34. }
  35. // Model metadata for image classification.
  36. message ImageClassificationModelMetadata {
  37. // Optional. The ID of the `base` model. If it is specified, the new model
  38. // will be created based on the `base` model. Otherwise, the new model will be
  39. // created from scratch. The `base` model must be in the same
  40. // `project` and `location` as the new model to create, and have the same
  41. // `model_type`.
  42. string base_model_id = 1;
  43. // Required. The train budget of creating this model, expressed in hours. The
  44. // actual `train_cost` will be equal or less than this value.
  45. int64 train_budget = 2;
  46. // Output only. The actual train cost of creating this model, expressed in
  47. // hours. If this model is created from a `base` model, the train cost used
  48. // to create the `base` model are not included.
  49. int64 train_cost = 3;
  50. // Output only. The reason that this create model operation stopped,
  51. // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
  52. string stop_reason = 5;
  53. // Optional. Type of the model. The available values are:
  54. // * `cloud` - Model to be used via prediction calls to AutoML API.
  55. // This is the default value.
  56. // * `mobile-low-latency-1` - A model that, in addition to providing
  57. // prediction via AutoML API, can also be exported (see
  58. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
  59. // with TensorFlow afterwards. Expected to have low latency, but
  60. // may have lower prediction quality than other models.
  61. // * `mobile-versatile-1` - A model that, in addition to providing
  62. // prediction via AutoML API, can also be exported (see
  63. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
  64. // with TensorFlow afterwards.
  65. // * `mobile-high-accuracy-1` - A model that, in addition to providing
  66. // prediction via AutoML API, can also be exported (see
  67. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
  68. // with TensorFlow afterwards. Expected to have a higher
  69. // latency, but should also have a higher prediction quality
  70. // than other models.
  71. // * `mobile-core-ml-low-latency-1` - A model that, in addition to providing
  72. // prediction via AutoML API, can also be exported (see
  73. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
  74. // ML afterwards. Expected to have low latency, but may have
  75. // lower prediction quality than other models.
  76. // * `mobile-core-ml-versatile-1` - A model that, in addition to providing
  77. // prediction via AutoML API, can also be exported (see
  78. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
  79. // ML afterwards.
  80. // * `mobile-core-ml-high-accuracy-1` - A model that, in addition to
  81. // providing prediction via AutoML API, can also be exported
  82. // (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
  83. // Core ML afterwards. Expected to have a higher latency, but
  84. // should also have a higher prediction quality than other
  85. // models.
  86. string model_type = 7;
  87. // Output only. An approximate number of online prediction QPS that can
  88. // be supported by this model per each node on which it is deployed.
  89. double node_qps = 13;
  90. // Output only. The number of nodes this model is deployed on. A node is an
  91. // abstraction of a machine resource, which can handle online prediction QPS
  92. // as given in the node_qps field.
  93. int64 node_count = 14;
  94. }
  95. // Model metadata specific to image object detection.
  96. message ImageObjectDetectionModelMetadata {
  97. // Optional. Type of the model. The available values are:
  98. // * `cloud-high-accuracy-1` - (default) A model to be used via prediction
  99. // calls to AutoML API. Expected to have a higher latency, but
  100. // should also have a higher prediction quality than other
  101. // models.
  102. // * `cloud-low-latency-1` - A model to be used via prediction
  103. // calls to AutoML API. Expected to have low latency, but may
  104. // have lower prediction quality than other models.
  105. // * `mobile-low-latency-1` - A model that, in addition to providing
  106. // prediction via AutoML API, can also be exported (see
  107. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
  108. // with TensorFlow afterwards. Expected to have low latency, but
  109. // may have lower prediction quality than other models.
  110. // * `mobile-versatile-1` - A model that, in addition to providing
  111. // prediction via AutoML API, can also be exported (see
  112. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
  113. // with TensorFlow afterwards.
  114. // * `mobile-high-accuracy-1` - A model that, in addition to providing
  115. // prediction via AutoML API, can also be exported (see
  116. // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
  117. // with TensorFlow afterwards. Expected to have a higher
  118. // latency, but should also have a higher prediction quality
  119. // than other models.
  120. string model_type = 1;
  121. // Output only. The number of nodes this model is deployed on. A node is an
  122. // abstraction of a machine resource, which can handle online prediction QPS
  123. // as given in the qps_per_node field.
  124. int64 node_count = 3;
  125. // Output only. An approximate number of online prediction QPS that can
  126. // be supported by this model per each node on which it is deployed.
  127. double node_qps = 4;
  128. // Output only. The reason that this create model operation stopped,
  129. // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
  130. string stop_reason = 5;
  131. // The train budget of creating this model, expressed in milli node
  132. // hours i.e. 1,000 value in this field means 1 node hour. The actual
  133. // `train_cost` will be equal or less than this value. If further model
  134. // training ceases to provide any improvements, it will stop without using
  135. // full budget and the stop_reason will be `MODEL_CONVERGED`.
  136. // Note, node_hour = actual_hour * number_of_nodes_invovled.
  137. // For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`,
  138. // the train budget must be between 20,000 and 900,000 milli node hours,
  139. // inclusive. The default value is 216, 000 which represents one day in
  140. // wall time.
  141. // For model type `mobile-low-latency-1`, `mobile-versatile-1`,
  142. // `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`,
  143. // `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train
  144. // budget must be between 1,000 and 100,000 milli node hours, inclusive.
  145. // The default value is 24, 000 which represents one day in wall time.
  146. int64 train_budget_milli_node_hours = 6;
  147. // Output only. The actual train cost of creating this model, expressed in
  148. // milli node hours, i.e. 1,000 value in this field means 1 node hour.
  149. // Guaranteed to not exceed the train budget.
  150. int64 train_cost_milli_node_hours = 7;
  151. }
  152. // Model deployment metadata specific to Image Classification.
  153. message ImageClassificationModelDeploymentMetadata {
  154. // Input only. The number of nodes to deploy the model on. A node is an
  155. // abstraction of a machine resource, which can handle online prediction QPS
  156. // as given in the model's
  157. //
  158. // [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps].
  159. // Must be between 1 and 100, inclusive on both ends.
  160. int64 node_count = 1;
  161. }
  162. // Model deployment metadata specific to Image Object Detection.
  163. message ImageObjectDetectionModelDeploymentMetadata {
  164. // Input only. The number of nodes to deploy the model on. A node is an
  165. // abstraction of a machine resource, which can handle online prediction QPS
  166. // as given in the model's
  167. //
  168. // [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node].
  169. // Must be between 1 and 100, inclusive on both ends.
  170. int64 node_count = 1;
  171. }