Class: Google::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1AnnotationSpec
- Inherits:
-
Object
- Object
- Google::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1AnnotationSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/datalabeling_v1beta1/classes.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb
Overview
Container of information related to one possible annotation that can be used
in a labeling task. For example, an image classification task where images are
labeled as dog
or cat
must reference an AnnotationSpec for dog
and an
AnnotationSpec for cat
.
Instance Attribute Summary collapse
-
#description ⇒ String
Optional.
-
#display_name ⇒ String
Required.
-
#index ⇒ Fixnum
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDatalabelingV1beta1AnnotationSpec
constructor
A new instance of GoogleCloudDatalabelingV1beta1AnnotationSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDatalabelingV1beta1AnnotationSpec
Returns a new instance of GoogleCloudDatalabelingV1beta1AnnotationSpec.
994 995 996 |
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 994 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
Optional. User-provided description of the annotation specification. The
description can be up to 10,000 characters long.
Corresponds to the JSON property description
977 978 979 |
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 977 def description @description end |
#display_name ⇒ String
Required. The display name of the AnnotationSpec. Maximum of 64 characters.
Corresponds to the JSON property displayName
982 983 984 |
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 982 def display_name @display_name end |
#index ⇒ Fixnum
Output only. This is the integer index of the AnnotationSpec. The index for
the whole AnnotationSpecSet is sequential starting from 0. For example, an
AnnotationSpecSet with classes dog
and cat
, might contain one
AnnotationSpec with display_name: "dog", index: 0
and one AnnotationSpec
with display_name: "cat", index: 1
. This is especially useful for model
training as it encodes the string labels into numeric values.
Corresponds to the JSON property index
992 993 994 |
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 992 def index @index end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
999 1000 1001 1002 1003 |
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 999 def update!(**args) @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @index = args[:index] if args.key?(:index) end |