Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.25 KB

File metadata and controls

29 lines (15 loc) · 1.25 KB

Function: useObjectDetection()

useObjectDetection<C>(props): ObjectDetectionType<ObjectDetectionLabels<C["modelName"]>>

Defined in: hooks/computer_vision/useObjectDetection.ts:21

React hook for managing an Object Detection model instance.

Type Parameters

C

C extends ObjectDetectionModelSources

A ObjectDetectionModelSources config specifying which built-in model to load.

Parameters

props

ObjectDetectionProps<C>

Configuration object containing model config and optional preventLoad flag.

Returns

ObjectDetectionType<ObjectDetectionLabels<C["modelName"]>>

An object with model state (error, isReady, isGenerating, downloadProgress) and typed forward and runOnFrame functions.