image.proto 9.8 KB

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