HandPoseDetectionWorkerManager.init: (config: HandPoseDetectionConfig | null) => Promise<void>
(property) HandPoseDetectionWorkerManager.predict: (params: HandPoseDetectionOperationParams, targetCanvas: HTMLCanvasElement) => Promise<Hand[] | null>
export const BackendTypes = {
WebGL: "WebGL",
wasm: "wasm",
cpu: "cpu",
} as const;
export const ModelTypes = {
mediapipe: "mediapipe",
tfjs: "tfjs",
tflite: "tflite",
} as const;
export const ModelTypes2 = {
full: "full",
lite: "lite",
old: "old",
} as const;
export interface HandPoseDetectionConfig {
browserType: BrowserTypes;
processOnLocal: boolean;
backendType: BackendTypes;
wasmPaths: { [key: string]: string };
pageUrl: string;
maxHands: number;
iouThreshold: number;
scoreThreshold: number;
modelType: ModelTypes;
modelType2: ModelTypes2;
wasmBase64: string;
wasmSimdBase64: string;
palmModelTFLite: { [key: string]: string };
landmarkModelTFLite: { [key: string]: string };
useSimd: boolean;
maxProcessWidth: number
maxProcessHeight: number
}
export interface HandPoseDetectionOperationParams {
processWidth: number;
processHeight: number;
annotateBox: boolean;
movingAverageWindow: number;
}
$ npx create-react-app demo --template typescript
$ cd demo/
$ npm install
$ npm install @dannadori/hand-pose-detection-worker-js
not needed
In this time, the name is "srcImage.jpg"
TBD
$ npm run start