Type Alias: InstanceSegmentationConfig<T>
InstanceSegmentationConfig<
T> =object& {availableInputSizes: readonlynumber[];defaultInputSize:number; } | {availableInputSizes?:undefined;defaultInputSize?:undefined; }
Defined in: types/instanceSegmentation.ts:86
Configuration for an instance segmentation model.
Type Declaration
defaultConfidenceThreshold?
optionaldefaultConfidenceThreshold:number
defaultIouThreshold?
optionaldefaultIouThreshold:number
labelMap
labelMap:
T
postprocessorConfig?
optionalpostprocessorConfig:object
postprocessorConfig.applyNMS?
optionalapplyNMS:boolean
preprocessorConfig?
optionalpreprocessorConfig:object
preprocessorConfig.normMean?
optionalnormMean:Triple<number>
preprocessorConfig.normStd?
optionalnormStd: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.