Skip to main content
Version: 0.10.0-legacy

Type Alias: InstanceSegmentationConfig<T>

InstanceSegmentationConfig<T> = object & { availableInputSizes: readonly number[]; defaultInputSize: number; } | { availableInputSizes?: undefined; defaultInputSize?: undefined; }

Defined in: types/instanceSegmentation.ts:86

Configuration for an instance segmentation model.

Type Declaration​

defaultConfidenceThreshold?​

optional defaultConfidenceThreshold: number

defaultIouThreshold?​

optional defaultIouThreshold: number

labelMap​

labelMap: T

postprocessorConfig?​

optional postprocessorConfig: object

postprocessorConfig.applyNMS?​

optional applyNMS: boolean

preprocessorConfig?​

optional preprocessorConfig: object

preprocessorConfig.normMean?​

optional normMean: Triple<number>

preprocessorConfig.normStd?​

optional normStd: Triple<number>

Type Parameters​

T​

T extends LabelEnum

The label map type for the model, must conform to LabelEnum.

Remarks​

The availableInputSizes and defaultInputSize fields are mutually inclusive:

  • Either both must be provided (for models with multiple input sizes), or
  • Both must be omitted (for models with a single input size).

This discriminated union ensures type safety and prevents partial configuration.