[tfjs-models] memory access out of bounds error in pose-detection demo
See original GitHub issuePlease make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): Yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
- TensorFlow.js installed from (npm or script link): https://unpkg.com/@tensorflow/tfjs-core@latest/dist/tf-core.js
- TensorFlow.js version (use command below): 3.7.0
- Browser version: 91.0.4472.114
- Tensorflow.js Converter Version:
Describe the current behavior Met RuntimeError: memory access out of bounds when use wasm backend in posenet model.
Describe the expected behavior Should not met Error
Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/CodePen/any notebook.
- Add wasm backend to poseNet model.
diff --git a/pose-detection/demos/live_video/src/params.js b/pose-detection/demos/live_video/src/params.js
index 3ddf62e..66cdb98 100644
--- a/pose-detection/demos/live_video/src/params.js
+++ b/pose-detection/demos/live_video/src/params.js
@@ -80,7 +80,7 @@ export const BACKEND_FLAGS_MAP = {
};
export const MODEL_BACKEND_MAP = {
- [posedetection.SupportedModels.PoseNet]: ['tfjs-webgl'],
+ [posedetection.SupportedModels.PoseNet]: ['tfjs-webgl', 'tfjs-wasm'],
[posedetection.SupportedModels.MoveNet]: ['tfjs-webgl', 'tfjs-wasm'],
[posedetection.SupportedModels.BlazePose]:
isiOS() ? ['tfjs-webgl'] : ['mediapipe-gpu', 'tfjs-webgl']
yarn watch
- Visit http://localhost:1234/?model=posenet
- select “tfjs-wasm”
Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Right, WASM is not supported, it’s either too slow to run or throws memory access out of bounds error.
Are you satisfied with the resolution of your issue? Yes No