@mediapipe/tasks-vision 0.1.0-alpha-12 → 0.1.0-alpha-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/package.json +1 -1
- package/vision_bundle.js +1 -1
- package/wasm/vision_wasm_internal.js +739 -774
- package/wasm/vision_wasm_internal.wasm +0 -0
- package/wasm/vision_wasm_nosimd_internal.js +736 -771
- package/wasm/vision_wasm_nosimd_internal.wasm +0 -0
- package/vision.d.ts +0 -1768
package/README.md
CHANGED
|
@@ -160,3 +160,20 @@ const detections = objectDetector.detect(image);
|
|
|
160
160
|
|
|
161
161
|
For more information, refer to the [Object Detector](https://developers.google.com/mediapipe/solutions/vision/object_detector/web_js) documentation.
|
|
162
162
|
|
|
163
|
+
|
|
164
|
+
## Pose Landmark Detection
|
|
165
|
+
|
|
166
|
+
The MediaPipe Pose Landmarker task lets you detect the landmarks of body poses
|
|
167
|
+
in an image. You can use this Task to localize key points of a pose and render
|
|
168
|
+
visual effects over the body.
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
const vision = await FilesetResolver.forVisionTasks(
|
|
172
|
+
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm"
|
|
173
|
+
);
|
|
174
|
+
const poseLandmarker = await PoseLandmarker.createFromModelPath(vision,
|
|
175
|
+
"model.task"
|
|
176
|
+
);
|
|
177
|
+
const image = document.getElementById("image") as HTMLImageElement;
|
|
178
|
+
const landmarks = poseLandmarker.detect(image);
|
|
179
|
+
```
|