Skip to content

Otsu Image Threshold Broken in tfjs-react-native #5245

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

Open
mattsoulanille opened this issue Jun 22, 2021 · 1 comment
Open

Otsu Image Threshold Broken in tfjs-react-native #5245

mattsoulanille opened this issue Jun 22, 2021 · 1 comment

Comments

@mattsoulanille
Copy link
Member

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): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): N/A
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: Android 9.0 Samsung Galaxy S9 Plus
  • TensorFlow.js installed from (npm or script link): master branch
  • TensorFlow.js version (use command below): master branch
  • Browser version: N/A
  • Tensorflow.js Converter Version: N/A

Describe the current behavior
In the image threshold op, otsu's method returns a different (incorrect) result for webgl in tfjs-react-native than in the browser.
Describe the expected behavior
Otsu's method returns the correct result in tfjs-react-native.

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.
Run CI tests on tfjs-react-native. The bug may also appear when running the integration tests of tfjs-react-native on a local android phone.

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.

I visualized the test results and for some reason, the otsu threshold test output matches the expected output for binary. This is almost certainly a coincidence.

Logs:
https://console.cloud.google.com/cloud-build/builds/15aa4850-a102-45f4-9525-c06588d6f668;step=7?project=learnjs-174218

More details on this PR: #5217

@mattsoulanille mattsoulanille added the type:bug Something isn't working label Jun 22, 2021
@mattsoulanille
Copy link
Member Author

mattsoulanille commented Jun 22, 2021

mattsoulanille added a commit that referenced this issue Jun 23, 2021
Update react-native monorepo dependencies to 3.70, increase test timeout to 10 minutes, and disable Otsu image threshold tests (#5245).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants