Interface SegmentImageConfig

Configuration for segmenting an image.

interface SegmentImageConfig {
    abortSignal?: AbortSignal;
    binaryColorThreshold?: number;
    confidenceThreshold?: number;
    httpOptions?: HttpOptions;
    maskDilation?: number;
    maxPredictions?: number;
    mode?: SegmentMode;
}

Properties

abortSignal?: AbortSignal

Abort signal which can be used to cancel the request.

NOTE: AbortSignal is a client-only operation. Using it to cancel an operation will not cancel the request in the service. You will still be charged usage for any applicable operations.

binaryColorThreshold?: number

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.

confidenceThreshold?: number

The confidence score threshold for the detections as a decimal value. Only predictions with a confidence score higher than this threshold will be returned.

httpOptions?: HttpOptions

Used to override HTTP request options.

maskDilation?: number

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.

maxPredictions?: number

The maximum number of predictions to return up to, by top confidence score.

The segmentation mode to use.