Package com.google.genai.types
Class MaskReferenceConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.MaskReferenceConfig
Configuration for a Mask reference image.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for MaskReferenceConfig. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MaskReferenceConfig.Builder
builder()
Instantiates a builder for MaskReferenceConfig.static MaskReferenceConfig
Deserializes a JSON string to a MaskReferenceConfig object.Dilation percentage of the mask provided.abstract Optional<MaskReferenceMode>
maskMode()
Prompts the model to generate a mask instead of you needing to provide one (unless MASK_MODE_USER_PROVIDED is used).A list of up to 5 class ids to use for semantic segmentation.abstract MaskReferenceConfig.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
MaskReferenceConfig
public MaskReferenceConfig()
-
-
Method Details
-
maskMode
Prompts the model to generate a mask instead of you needing to provide one (unless MASK_MODE_USER_PROVIDED is used). -
segmentationClasses
A list of up to 5 class ids to use for semantic segmentation. Automatically creates an image mask based on specific objects. -
maskDilation
Dilation percentage of the mask provided. Float between 0 and 1. -
builder
Instantiates a builder for MaskReferenceConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a MaskReferenceConfig object.
-