Package com.google.genai.types
Class SegmentImageConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SegmentImageConfig
Configuration for segmenting an image.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for SegmentImageConfig. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe binary color threshold to apply to the masks.static SegmentImageConfig.Builder
builder()
Instantiates a builder for SegmentImageConfig.The confidence score threshold for the detections as a decimal value.static SegmentImageConfig
Deserializes a JSON string to a SegmentImageConfig object.abstract Optional<HttpOptions>
Used to override HTTP request options.A decimal value representing how much dilation to apply to the masks.The maximum number of predictions to return up to, by top confidence score.abstract Optional<SegmentMode>
mode()
The segmentation mode to use.abstract SegmentImageConfig.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
SegmentImageConfig
public SegmentImageConfig()
-
-
Method Details
-
httpOptions
Used to override HTTP request options. -
mode
The segmentation mode to use. -
maxPredictions
The maximum number of predictions to return up to, by top confidence score. -
confidenceThreshold
The confidence score threshold for the detections as a decimal value. Only predictions with a confidence score higher than this threshold will be returned. -
maskDilation
A decimal value representing how much dilation to apply to the masks. 0 for no dilation. 1.0 means the masked area covers the whole image. -
binaryColorThreshold
The binary color threshold to apply to the masks. The threshold can be set to a decimal value between 0 and 255 non-inclusive. Set to -1 for no binary color thresholding. -
builder
Instantiates a builder for SegmentImageConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a SegmentImageConfig object.
-