Class SegmentImageConfig
-
- All Implemented Interfaces:
public abstract class SegmentImageConfig extends JsonSerializable
Configuration for segmenting an image.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSegmentImageConfig.BuilderBuilder for SegmentImageConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description SegmentImageConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpOptions>httpOptions()Used to override HTTP request options. abstract Optional<SegmentMode>mode()The segmentation mode to use. abstract Optional<Integer>maxPredictions()The maximum number of predictions to return up to, by top confidence score. abstract Optional<Float>confidenceThreshold()The confidence score threshold for the detections as a decimal value. abstract Optional<Float>maskDilation()A decimal value representing how much dilation to apply to the masks. abstract Optional<Float>binaryColorThreshold()The binary color threshold to apply to the masks. abstract Optional<Map<String, String>>labels()User specified labels to track billing usage. static SegmentImageConfig.Builderbuilder()Instantiates a builder for SegmentImageConfig. abstract SegmentImageConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static SegmentImageConfigfromJson(String jsonString)Deserializes a JSON string to a SegmentImageConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
httpOptions
abstract Optional<HttpOptions> httpOptions()
Used to override HTTP request options.
-
mode
abstract Optional<SegmentMode> mode()
The segmentation mode to use.
-
maxPredictions
abstract Optional<Integer> maxPredictions()
The maximum number of predictions to return up to, by top confidence score.
-
confidenceThreshold
abstract Optional<Float> 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
abstract Optional<Float> 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
abstract Optional<Float> 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.
-
labels
abstract Optional<Map<String, String>> labels()
User specified labels to track billing usage.
-
builder
static SegmentImageConfig.Builder builder()
Instantiates a builder for SegmentImageConfig.
-
toBuilder
abstract SegmentImageConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static SegmentImageConfig fromJson(String jsonString)
Deserializes a JSON string to a SegmentImageConfig object.
-
-
-
-