Comments (9)
I had same issue
I made two classes and It can works well on website.
But when I download tensorflow.js model, the model works well.
But keras model can't distinguish class
(in my case, The keras model shows high probability only for one class)
from teachablemachine-community.
Any chance you can share an example where this is clear? Both the teachable machine project and the python code you use to validate?
We have had a suspicion that there can be some difference, but we dont have a test dataset that clearly indicates it.
from teachablemachine-community.
Hi! We have recently updated the snippet available in Teachable Machine's Export panel to resize the images exactly how they are resized in the web app. Check it out and see if your classification performance improves.
from teachablemachine-community.
I reproduced the error @HalfdanJ and @GautamBose.
I tried it with both your version and with the fixed normalization I have in Pullrequest #81
Class 2-samples (2).zip
Class 1-samples (1).zip
Teachable machine returns 49-51 Class-1 Class-2
And Keras returns [0.546911 0.45308906] - or [0.5456604 0.45433962] with the new normalization
Should I upload the model, too?
from teachablemachine-community.
Hi! I suspect that something is causing models trained on different OS's, hardware, or browsers to behave differently. For example, when I downloaded your dataset and trained my own model, Teachable Machine gave me 78-22 Class-1 Class-2 on that test image... and keras returns [0.7885991 0.21140094], with the original normalization.
This is on MacOS 10.14.16 and Chrome 80.0.3987.116
To get to the bottom of this, what OS / browser are you using?
from teachablemachine-community.
Mac OS 10.15.2 (19C57) and Chrome 80.0.3987.106 (64-bit)
from teachablemachine-community.
So I have tried training it again, and I got a result of 60-40
So the second time I got a result of 89 -11
The third time I got a 33 - 67
It makes sense that we have some randomness in the way you guys probably shuffle the image before training. ( I didn't look into the source code )
Edit: Now I did look into the source code, you shuffle it here, which causes the obvious deviations when running the same thing multiple times, It is weird that the second and third try had much smaller deviations though.
I used Colab for Keras, did you run it locally?
So I ran all of them in Colab and got this :
- 60- 40 -> [[0.831798 0.16820198]]
- 89- 11 -> [[0.906152 0.09384797]] (this ones good)
- 33 - 67 -> [[0.3598008 0.6401992]]
Colab uses : Python 3.6.9 and Ubuntu 18.04.3 LTS
from teachablemachine-community.
Is there any solution for this problem ? How can I get better result ?
from teachablemachine-community.
Having the same issue here, UI results are very accurate and in the form of x: 10%, y: 90%
but the downloaded files using the provided code snippet for tensorflow.js are very different in the form of x: 0.47, y: 0.53
for the same test images
from teachablemachine-community.
Related Issues (20)
- [FEATURE REQUEST]: Title parquet processing
- [FEATURE REQUEST]: The ability to learn using the GPU
- Image processing and Compilation info HOT 2
- Cannot use the exported model HOT 2
- [FEATURE REQUEST]: Bounding Box
- [FEATURE REQUEST]: LLM Support
- snippets/markdown/image/edgetpu/python.md Opencv example code doesn't swap color to BGR2RGB
- Teachable Machine Project Help HOT 5
- How to run when there is no network in the local browser? HOT 1
- TeachableMachine.Calculate() always returns "Value cannot be null. (Parameter 's')" using C# .NET API
- [BUG]: TeachableMachine on local machine
- Is there an API that could obtain a trained .tflite model?
- Compilation error: tensorflow/lite/version.h: No such file or directory HOT 1
- linker_script.ld:138 cannot move location counter backwards (from 200532b0 to 2003fc00)
- Unable to build docker image
- [BUG]: 'keras.md' code refers erroneously to downloaded model file
- Error when doing inference in loading my model HOT 1
- Unable to Compile Zip File for Arduino Nano
- [FEATURE REQUEST]: Ability to get timestamps of detected audio classes while recording
- Teachable machine with tensorflow.js model - jpg files for clasification instead of video stream from webcam
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teachablemachine-community.