This is the codebase of ml.andrasbacsai.dev where I publish a freely available Machine Learning API.
It reflects my current knowledge about it, which is not much, but honest work. 😁
- Tensorflow.js ImageClassifier
- Go to Teachablemachine and add images to different classes.
- Save the model with a shareable link and copy the link. (e.g., https://teachablemachine.withgoogle.com/models/3RcVEQiII/)
- Send a POST request to https://ml.andrasbacsai.dev/api/tensorflowjs/imageClassifier, with the following data:
{
"modelUrl": "<URL to the directory of your model files>",
"imageUrl": "<URL example image you would like to classify>"
}
- Ta-da. 🎉
The example model could differentiate between a dog, a cat, a monkey or a squirrel. You could try it to send a different picture!
Classification does not work perfectly! There are so many things to learn/tweak in this field.
curl -X POST -H "Content-type: application/json" -d '{"modelUrl":"https://teachablemachine.withgoogle.com/models/3RcVEQiII/","imageUrl":"https://www.rover.com/blog/wp-content/uploads/2018/12/dog-sneeze-1-1024x945.jpg"}' https://ml.andrasbacsai.dev/api/tensorflowjs/imageClassifier
It is hosted on a small server. You can easily overload it - please don't! 😁
- Frontend to see what's going on.
- Train model without teachablemachine.
- Who knows?!
Follow me on Twitter at @andrasbacsai to get updates or star this repository.
I'm just sharing my knowledge in a format of an API so others could learn/play/use it! I could not find any good publicly available service to try it ML things out quickly. That's why I'm publishing my work.
MIT