Class SegmentImageConfig
Configuration for segmenting an image.
public record SegmentImageConfig : IEquatable<SegmentImageConfig>
- Inheritance
-
SegmentImageConfig
- Implements
- Inherited Members
Properties
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.
[JsonPropertyName("binaryColorThreshold")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? BinaryColorThreshold { get; set; }
Property Value
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.
[JsonPropertyName("confidenceThreshold")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? ConfidenceThreshold { get; set; }
Property Value
HttpOptions
Used to override HTTP request options.
[JsonPropertyName("httpOptions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HttpOptions? HttpOptions { get; set; }
Property Value
Labels
User specified labels to track billing usage.
[JsonPropertyName("labels")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, string>? Labels { get; set; }
Property Value
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.
[JsonPropertyName("maskDilation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? MaskDilation { get; set; }
Property Value
MaxPredictions
The maximum number of predictions to return up to, by top confidence score.
[JsonPropertyName("maxPredictions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? MaxPredictions { get; set; }
Property Value
- int?
Mode
The segmentation mode to use.
[JsonPropertyName("mode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SegmentMode? Mode { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a SegmentImageConfig object.
public static SegmentImageConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- SegmentImageConfig
The deserialized SegmentImageConfig object, or null if deserialization fails.