Package com.google.genai.types
Class SegmentImageSource
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SegmentImageSource
A set of source input(s) for image segmentation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for SegmentImageSource. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SegmentImageSource.Builder
builder()
Instantiates a builder for SegmentImageSource.static SegmentImageSource
Deserializes a JSON string to a SegmentImageSource object.image()
The image to be segmented.prompt()
A text prompt for guiding the model during image segmentation.abstract Optional<ScribbleImage>
The brush scribble to guide segmentation.abstract SegmentImageSource.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
SegmentImageSource
public SegmentImageSource()
-
-
Method Details
-
prompt
A text prompt for guiding the model during image segmentation. Required for prompt mode and semantic mode, disallowed for other modes. -
image
The image to be segmented. -
scribbleImage
The brush scribble to guide segmentation. Required for the interactive mode, disallowed for other modes. -
builder
Instantiates a builder for SegmentImageSource. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a SegmentImageSource object.
-