Skip to main content
Version: Next

Function: usePoseEstimation()

usePoseEstimation<C>(props): PoseEstimationType<PoseEstimationKeypoints<C["modelName"]>>

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

React hook for managing a Pose Estimation model instance.

Type Parameters

C

C extends PoseEstimationModelSources

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

Parameters

props

PoseEstimationProps<C>

Configuration object containing model config and optional preventLoad flag.

Returns

PoseEstimationType<PoseEstimationKeypoints<C["modelName"]>>

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