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

Image based ML models trained on TeachableMachine V2 show 'NaN' prediction on Chrome and Firefox (Windows OS v 7) #112

Open
pmov opened this issue May 30, 2020 · 7 comments

Comments

@pmov
Copy link

pmov commented May 30, 2020

Image based models trained on TeachableMachine V2 do not work on Chrome and Firefox (Windows OS v 7)The predictions show "NaN" only and no numeric prediction is made and the models are trained.No error come at the time of training.What could be the problem?

@adamalbu
Copy link

I have the same problem.

@NandiniSrirambhatla
Copy link

Even I have the same problem

@irealva
Copy link
Contributor

irealva commented Nov 22, 2020

Hi, we've heard complaints about this on the Pose models as well. Would you be able to provide the specific computer model and browser you were using? We believe it is a hardware specific problem so need to know what specific models you are using.

We've heard this reported from HP Elitebook 840 G-1 using all browsers for now.

@Aendir
Copy link

Aendir commented Jan 5, 2021

Hi, I am facing this same issue, but on a different platform.
I have an Android app, which creates a Chrome Webview. From inside the webview, upon calling model.predict(), I keep getting NaN as the probability value for all classes.

When I try this from a website that holds the exact same JavaScript code as the webview, it works perfectly fine.
Additionally, when I try to use TensorflowJS to get the classification of an image using the pretrained mobileNet model, it works fine in both the website and the webview.

But if I attempt to use TensorflowJS and the tensorflow model (attribute within the Teachable Machine Model), to get the classification for a TM Image model, I keep getting "NaN".

Model being Used: https://teachablemachine.withgoogle.com/models/LDsdxzd1H/

System Info:
Device: OnePlus 6
Android 10
Gradle version: 4.0.1
Cordova version: 5.3.0-dev
Chrome: 87.0.4280.101

@Aendir
Copy link

Aendir commented Jan 6, 2021

Hello,
I was able to resolve the issue I was facing.
The problem was that when the model was being loaded, my code was treating the contents of the weights.bin file as a string (When loading from within the webview).
Once I fixed this and treated the contents of weights.bin as an arraybuffer, the prediction started working fine.

Hope this helps someone.

@uhmin99
Copy link

uhmin99 commented Jan 14, 2021

I have same problem in pose detection. NaN% problem happens even before I import the model. After I train the model and test it on Teachable machine website, it keep giving me NaN% for every value.

System Info:
Device: LG gram
Processor : Intel i7-4500U
RAM : 8GB
OS : Windows 10 Pro

If I use F12 to see the error message, it says

index.bundle.js:2214 Model disposed so nothing to render with hook
index.bundle.js:5624 Class Equestrian: 25 samples
index.bundle.js:5624 Class Wrong: 21 samples
index.bundle.js:5624 Epochs: 50
index.bundle.js:5624 Learning rate: 0.0001
index.bundle.js:5624 Batch size: 16

@adamalbu
Copy link

My computer info (microsoft exel .csv file):
computor info.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants