Class LabelDetectionConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
com.google.cloud.videointelligence.v1.LabelDetectionConfig.Builder
All Implemented Interfaces:
LabelDetectionConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
LabelDetectionConfig

public static final class LabelDetectionConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder> implements LabelDetectionConfigOrBuilder
 Config for LABEL_DETECTION.
 
Protobuf type google.cloud.videointelligence.v1.LabelDetectionConfig
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
    • getDefaultInstanceForType

      public LabelDetectionConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public LabelDetectionConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public LabelDetectionConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public LabelDetectionConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LabelDetectionConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
    • mergeFrom

      public LabelDetectionConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LabelDetectionConfig.Builder>
      Throws:
      IOException
    • getLabelDetectionModeValue

      public int getLabelDetectionModeValue()
       What labels should be detected with LABEL_DETECTION, in addition to
       video-level labels or segment-level labels.
       If unspecified, defaults to `SHOT_MODE`.
       
      .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1;
      Specified by:
      getLabelDetectionModeValue in interface LabelDetectionConfigOrBuilder
      Returns:
      The enum numeric value on the wire for labelDetectionMode.
    • setLabelDetectionModeValue

      public LabelDetectionConfig.Builder setLabelDetectionModeValue(int value)
       What labels should be detected with LABEL_DETECTION, in addition to
       video-level labels or segment-level labels.
       If unspecified, defaults to `SHOT_MODE`.
       
      .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1;
      Parameters:
      value - The enum numeric value on the wire for labelDetectionMode to set.
      Returns:
      This builder for chaining.
    • getLabelDetectionMode

      public LabelDetectionMode getLabelDetectionMode()
       What labels should be detected with LABEL_DETECTION, in addition to
       video-level labels or segment-level labels.
       If unspecified, defaults to `SHOT_MODE`.
       
      .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1;
      Specified by:
      getLabelDetectionMode in interface LabelDetectionConfigOrBuilder
      Returns:
      The labelDetectionMode.
    • setLabelDetectionMode

      public LabelDetectionConfig.Builder setLabelDetectionMode(LabelDetectionMode value)
       What labels should be detected with LABEL_DETECTION, in addition to
       video-level labels or segment-level labels.
       If unspecified, defaults to `SHOT_MODE`.
       
      .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1;
      Parameters:
      value - The labelDetectionMode to set.
      Returns:
      This builder for chaining.
    • clearLabelDetectionMode

      public LabelDetectionConfig.Builder clearLabelDetectionMode()
       What labels should be detected with LABEL_DETECTION, in addition to
       video-level labels or segment-level labels.
       If unspecified, defaults to `SHOT_MODE`.
       
      .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1;
      Returns:
      This builder for chaining.
    • getStationaryCamera

      public boolean getStationaryCamera()
       Whether the video has been shot from a stationary (i.e., non-moving)
       camera. When set to true, might improve detection accuracy for moving
       objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.
       
      bool stationary_camera = 2;
      Specified by:
      getStationaryCamera in interface LabelDetectionConfigOrBuilder
      Returns:
      The stationaryCamera.
    • setStationaryCamera

      public LabelDetectionConfig.Builder setStationaryCamera(boolean value)
       Whether the video has been shot from a stationary (i.e., non-moving)
       camera. When set to true, might improve detection accuracy for moving
       objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.
       
      bool stationary_camera = 2;
      Parameters:
      value - The stationaryCamera to set.
      Returns:
      This builder for chaining.
    • clearStationaryCamera

      public LabelDetectionConfig.Builder clearStationaryCamera()
       Whether the video has been shot from a stationary (i.e., non-moving)
       camera. When set to true, might improve detection accuracy for moving
       objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.
       
      bool stationary_camera = 2;
      Returns:
      This builder for chaining.
    • getModel

      public String getModel()
       Model to use for label detection.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest".
       
      string model = 3;
      Specified by:
      getModel in interface LabelDetectionConfigOrBuilder
      Returns:
      The model.
    • getModelBytes

      public com.google.protobuf.ByteString getModelBytes()
       Model to use for label detection.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest".
       
      string model = 3;
      Specified by:
      getModelBytes in interface LabelDetectionConfigOrBuilder
      Returns:
      The bytes for model.
    • setModel

      public LabelDetectionConfig.Builder setModel(String value)
       Model to use for label detection.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest".
       
      string model = 3;
      Parameters:
      value - The model to set.
      Returns:
      This builder for chaining.
    • clearModel

      public LabelDetectionConfig.Builder clearModel()
       Model to use for label detection.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest".
       
      string model = 3;
      Returns:
      This builder for chaining.
    • setModelBytes

      public LabelDetectionConfig.Builder setModelBytes(com.google.protobuf.ByteString value)
       Model to use for label detection.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest".
       
      string model = 3;
      Parameters:
      value - The bytes for model to set.
      Returns:
      This builder for chaining.
    • getFrameConfidenceThreshold

      public float getFrameConfidenceThreshold()
       The confidence threshold we perform filtering on the labels from
       frame-level detection. If not set, it is set to 0.4 by default. The valid
       range for this threshold is [0.1, 0.9]. Any value set outside of this
       range will be clipped.
       Note: For best results, follow the default threshold. We will update
       the default threshold everytime when we release a new model.
       
      float frame_confidence_threshold = 4;
      Specified by:
      getFrameConfidenceThreshold in interface LabelDetectionConfigOrBuilder
      Returns:
      The frameConfidenceThreshold.
    • setFrameConfidenceThreshold

      public LabelDetectionConfig.Builder setFrameConfidenceThreshold(float value)
       The confidence threshold we perform filtering on the labels from
       frame-level detection. If not set, it is set to 0.4 by default. The valid
       range for this threshold is [0.1, 0.9]. Any value set outside of this
       range will be clipped.
       Note: For best results, follow the default threshold. We will update
       the default threshold everytime when we release a new model.
       
      float frame_confidence_threshold = 4;
      Parameters:
      value - The frameConfidenceThreshold to set.
      Returns:
      This builder for chaining.
    • clearFrameConfidenceThreshold

      public LabelDetectionConfig.Builder clearFrameConfidenceThreshold()
       The confidence threshold we perform filtering on the labels from
       frame-level detection. If not set, it is set to 0.4 by default. The valid
       range for this threshold is [0.1, 0.9]. Any value set outside of this
       range will be clipped.
       Note: For best results, follow the default threshold. We will update
       the default threshold everytime when we release a new model.
       
      float frame_confidence_threshold = 4;
      Returns:
      This builder for chaining.
    • getVideoConfidenceThreshold

      public float getVideoConfidenceThreshold()
       The confidence threshold we perform filtering on the labels from
       video-level and shot-level detections. If not set, it's set to 0.3 by
       default. The valid range for this threshold is [0.1, 0.9]. Any value set
       outside of this range will be clipped.
       Note: For best results, follow the default threshold. We will update
       the default threshold everytime when we release a new model.
       
      float video_confidence_threshold = 5;
      Specified by:
      getVideoConfidenceThreshold in interface LabelDetectionConfigOrBuilder
      Returns:
      The videoConfidenceThreshold.
    • setVideoConfidenceThreshold

      public LabelDetectionConfig.Builder setVideoConfidenceThreshold(float value)
       The confidence threshold we perform filtering on the labels from
       video-level and shot-level detections. If not set, it's set to 0.3 by
       default. The valid range for this threshold is [0.1, 0.9]. Any value set
       outside of this range will be clipped.
       Note: For best results, follow the default threshold. We will update
       the default threshold everytime when we release a new model.
       
      float video_confidence_threshold = 5;
      Parameters:
      value - The videoConfidenceThreshold to set.
      Returns:
      This builder for chaining.
    • clearVideoConfidenceThreshold

      public LabelDetectionConfig.Builder clearVideoConfidenceThreshold()
       The confidence threshold we perform filtering on the labels from
       video-level and shot-level detections. If not set, it's set to 0.3 by
       default. The valid range for this threshold is [0.1, 0.9]. Any value set
       outside of this range will be clipped.
       Note: For best results, follow the default threshold. We will update
       the default threshold everytime when we release a new model.
       
      float video_confidence_threshold = 5;
      Returns:
      This builder for chaining.