Class LabelDetectionConfig (2.27.0)

public final class LabelDetectionConfig extends GeneratedMessageV3 implements LabelDetectionConfigOrBuilder

Config for LABEL_DETECTION.

Protobuf type google.cloud.videointelligence.v1.LabelDetectionConfig

Static Fields

FRAME_CONFIDENCE_THRESHOLD_FIELD_NUMBER

public static final int FRAME_CONFIDENCE_THRESHOLD_FIELD_NUMBER
Field Value
TypeDescription
int

LABEL_DETECTION_MODE_FIELD_NUMBER

public static final int LABEL_DETECTION_MODE_FIELD_NUMBER
Field Value
TypeDescription
int

MODEL_FIELD_NUMBER

public static final int MODEL_FIELD_NUMBER
Field Value
TypeDescription
int

STATIONARY_CAMERA_FIELD_NUMBER

public static final int STATIONARY_CAMERA_FIELD_NUMBER
Field Value
TypeDescription
int

VIDEO_CONFIDENCE_THRESHOLD_FIELD_NUMBER

public static final int VIDEO_CONFIDENCE_THRESHOLD_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static LabelDetectionConfig getDefaultInstance()
Returns
TypeDescription
LabelDetectionConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static LabelDetectionConfig.Builder newBuilder()
Returns
TypeDescription
LabelDetectionConfig.Builder

newBuilder(LabelDetectionConfig prototype)

public static LabelDetectionConfig.Builder newBuilder(LabelDetectionConfig prototype)
Parameter
NameDescription
prototypeLabelDetectionConfig
Returns
TypeDescription
LabelDetectionConfig.Builder

parseDelimitedFrom(InputStream input)

public static LabelDetectionConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LabelDetectionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static LabelDetectionConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LabelDetectionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LabelDetectionConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LabelDetectionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LabelDetectionConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LabelDetectionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static LabelDetectionConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LabelDetectionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static LabelDetectionConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LabelDetectionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LabelDetectionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<LabelDetectionConfig> parser()
Returns
TypeDescription
Parser<LabelDetectionConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public LabelDetectionConfig getDefaultInstanceForType()
Returns
TypeDescription
LabelDetectionConfig

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;

Returns
TypeDescription
float

The frameConfidenceThreshold.

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;

Returns
TypeDescription
LabelDetectionMode

The labelDetectionMode.

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;

Returns
TypeDescription
int

The enum numeric value on the wire for labelDetectionMode.

getModel()

public String getModel()

Model to use for label detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".

string model = 3;

Returns
TypeDescription
String

The model.

getModelBytes()

public ByteString getModelBytes()

Model to use for label detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".

string model = 3;

Returns
TypeDescription
ByteString

The bytes for model.

getParserForType()

public Parser<LabelDetectionConfig> getParserForType()
Returns
TypeDescription
Parser<LabelDetectionConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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;

Returns
TypeDescription
boolean

The stationaryCamera.

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;

Returns
TypeDescription
float

The videoConfidenceThreshold.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public LabelDetectionConfig.Builder newBuilderForType()
Returns
TypeDescription
LabelDetectionConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LabelDetectionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
LabelDetectionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public LabelDetectionConfig.Builder toBuilder()
Returns
TypeDescription
LabelDetectionConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException