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 Summary
Modifier and TypeMethodDescriptionbuild()clear()The confidence threshold we perform filtering on the labels from frame-level detection.What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels.Model to use for label detection.Whether the video has been shot from a stationary (i.e., non-moving) camera.The confidence threshold we perform filtering on the labels from video-level and shot-level detections.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorfloatThe confidence threshold we perform filtering on the labels from frame-level detection.What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels.intWhat labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels.getModel()Model to use for label detection.com.google.protobuf.ByteStringModel to use for label detection.booleanWhether the video has been shot from a stationary (i.e., non-moving) camera.floatThe confidence threshold we perform filtering on the labels from video-level and shot-level detections.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(LabelDetectionConfig other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setFrameConfidenceThreshold(float value) The confidence threshold we perform filtering on the labels from frame-level detection.What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels.setLabelDetectionModeValue(int value) What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels.Model to use for label detection.setModelBytes(com.google.protobuf.ByteString value) Model to use for label detection.setStationaryCamera(boolean value) Whether the video has been shot from a stationary (i.e., non-moving) camera.setVideoConfidenceThreshold(float value) The confidence threshold we perform filtering on the labels from video-level and shot-level detections.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<LabelDetectionConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LabelDetectionConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
getLabelDetectionModeValuein interfaceLabelDetectionConfigOrBuilder- Returns:
- The enum numeric value on the wire for labelDetectionMode.
-
setLabelDetectionModeValue
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
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:
getLabelDetectionModein interfaceLabelDetectionConfigOrBuilder- Returns:
- The labelDetectionMode.
-
setLabelDetectionMode
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
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:
getStationaryCamerain interfaceLabelDetectionConfigOrBuilder- Returns:
- The stationaryCamera.
-
setStationaryCamera
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
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
Model to use for label detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
string model = 3;- Specified by:
getModelin interfaceLabelDetectionConfigOrBuilder- 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:
getModelBytesin interfaceLabelDetectionConfigOrBuilder- Returns:
- The bytes for model.
-
setModel
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
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
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:
getFrameConfidenceThresholdin interfaceLabelDetectionConfigOrBuilder- Returns:
- The frameConfidenceThreshold.
-
setFrameConfidenceThreshold
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
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:
getVideoConfidenceThresholdin interfaceLabelDetectionConfigOrBuilder- Returns:
- The videoConfidenceThreshold.
-
setVideoConfidenceThreshold
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
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.
-