Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tfjs-models] memory access out of bounds error in pose-detection demo #5248

Closed
haoyunfeix opened this issue Jun 24, 2021 · 5 comments
Closed
Assignees
Labels
stat:awaiting response type:bug Something isn't working

Comments

@haoyunfeix
Copy link
Contributor

Please 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.

  1. 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']
  1. yarn watch
  2. Visit http://localhost:1234/?model=posenet
  3. 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.

@haoyunfeix haoyunfeix added the type:bug Something isn't working label Jun 24, 2021
@rthadur
Copy link
Contributor

rthadur commented Jun 24, 2021

In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thanks!

@haoyunfeix
Copy link
Contributor Author

Reproduce code is here: tensorflow/tfjs-models#756

@rthadur
Copy link
Contributor

rthadur commented Jun 24, 2021

Wasm is not supported in posenet , @lina128 can you please confirm if this is supported ?

@lina128
Copy link
Collaborator

lina128 commented Jun 24, 2021

Right, WASM is not supported, it's either too slow to run or throws memory access out of bounds error.

@rthadur rthadur closed this as completed Jul 1, 2021
@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants