Comments (13)
I found this issue when I was trying to figure out how to use my teachable machine model in Node.js. I thought I would comment in case others end up here wondering how to use their model in Node.js with Tensorflow.js. I created a starting template that might be helpful to others. (FYI it is not using the teachable machine library, only its exported trained model.)
https://github.com/traumverloren/teachable-machine-image-nodejs-starter
from teachablemachine-community.
Hi @tr7zw and @steamp0rt thanks for filing the issue. We are working on the savedmodel export it should be fixed soon.
And you're right we have not implemented nodeJs support. It's good to know that you would like to use it in this environment and we'll keep it in mind for future planning.
from teachablemachine-community.
After some playing around I was able to get it running in NodeJs with teachablemachine/image by doing some workarounds with jsdom and canvas, still a "native" version would be nice.
from teachablemachine-community.
Just a note that the exporting to Tensorflow SavedModel is fixed in latest release.
from teachablemachine-community.
I tried that too, but it looks like "@teachablemachine/image" isn't made for NodeJs at all. It tries to use Canvases and the dom to work with the images. Hopefully, a Node compatible version gets released soon.
from teachablemachine-community.
how does someone make something as useful as this... without thinking "hey someone might want to use this out-of-browser"
from teachablemachine-community.
Well, I'm stuck trying to get it running inside Java. The Savemodel export is broken, and the Keras model is incompatible with deeplearning4j's Keras import. Also a bit confusing that all examples are with a webcam, not showing how to get it running in NodeJS/Java/Browser/whatever to classify normal images via upload/post/filesystem.
from teachablemachine-community.
Hi,
Just to add clarification. The model you create with Teachable Machine will work with node.js + Tensorflow.js; however our library does not support node.js.
We absolutely did consider use outside the browser which is why we implemented converters for our models to tensorflow and tflite and have even released a video showing a tflite model working offline on a small coral board.
Having the library work as attempted above would not be possible because it would require including node's 'fs
' module in the browser and other aspects such as converting an image to a tensor would be different than in browser.
We will add language to the readme to be more explicit these modules are meant for web users.
thanks
from teachablemachine-community.
Thanks for clarifying!
from teachablemachine-community.
After some playing around I was able to get it running in NodeJs with teachablemachine/image by doing some workarounds with jsdom and canvas, still a "native" version would be nice.
Could you possibly share how you achieved that? I've been trying to do the same with canvas but have had no luck.
from teachablemachine-community.
After some playing around I was able to get it running in NodeJs with teachablemachine/image by doing some workarounds with jsdom and canvas, still a "native" version would be nice.
Could you possibly share how you achieved that? I've been trying to do the same with canvas but have had no luck.
Sure. I quickly threw together a git containing everything needed here.
Just keep in mind that I'm not a Javascript/node/web developer, this setup is enough to be able to expose multiple models as REST API for other projects(languages) to use, but probably has some horrible flaws if you want to have it facing the web^^.
from teachablemachine-community.
Thanks! I got something working too after a lot of trial and error, it's along the same idea as yours. Thanks for sharing!
from teachablemachine-community.
Added your repo to this section, thanks for that!
https://github.com/googlecreativelab/teachablemachine-community/tree/master/libraries
from teachablemachine-community.
Related Issues (20)
- 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
- Substantial performance degrade in image recognition from TM web results
- [BUG]: Preview Input photo upload not working
- [BUG]: Can't start a project on iPad devices
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.