useSemanticSegmentation<
C>(props):SemanticSegmentationType<SegmentationLabels<ModelNameOf<C>>>
Defined in: hooks/computer_vision/useSemanticSegmentation.ts:27
React hook for managing a Semantic Segmentation model instance.
C extends SemanticSegmentationModelSources
A SemanticSegmentationModelSources config specifying which built-in model to load.
Configuration object containing model config and optional preventLoad flag.
SemanticSegmentationType<SegmentationLabels<ModelNameOf<C>>>
An object with model state (error, isReady, isGenerating, downloadProgress) and a typed forward function.
const { isReady, forward } = useSemanticSegmentation({
model: { modelName: 'deeplab-v3-resnet50', modelSource: DEEPLAB_V3_RESNET50 },
});