Class MaskReferenceConfig
Configuration for a Mask reference image.
public record MaskReferenceConfig : IEquatable<MaskReferenceConfig>
- Inheritance
-
MaskReferenceConfig
- Implements
- Inherited Members
Properties
MaskDilation
Dilation percentage of the mask provided. Float between 0 and 1.
[JsonPropertyName("maskDilation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? MaskDilation { get; set; }
Property Value
MaskMode
Prompts the model to generate a mask instead of you needing to provide one (unless MASK_MODE_USER_PROVIDED is used).
[JsonPropertyName("maskMode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public MaskReferenceMode? MaskMode { get; set; }
Property Value
SegmentationClasses
A list of up to 5 class ids to use for semantic segmentation. Automatically creates an image mask based on specific objects.
[JsonPropertyName("segmentationClasses")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<int>? SegmentationClasses { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a MaskReferenceConfig object.
public static MaskReferenceConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- MaskReferenceConfig
The deserialized MaskReferenceConfig object, or null if deserialization fails.