Class SegmentImageSource
A set of source input(s) for image segmentation.
public record SegmentImageSource : IEquatable<SegmentImageSource>
- Inheritance
-
SegmentImageSource
- Implements
- Inherited Members
Properties
Image
The image to be segmented.
[JsonPropertyName("image")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Image? Image { get; set; }
Property Value
Prompt
A text prompt for guiding the model during image segmentation. Required for prompt mode and semantic mode, disallowed for other modes.
[JsonPropertyName("prompt")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Prompt { get; set; }
Property Value
ScribbleImage
The brush scribble to guide segmentation. Required for the interactive mode, disallowed for other modes.
[JsonPropertyName("scribbleImage")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ScribbleImage? ScribbleImage { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a SegmentImageSource object.
public static SegmentImageSource? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- SegmentImageSource
The deserialized SegmentImageSource object, or null if deserialization fails.