Skip to content

andrasbacsai/machine-learning-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Machine Learning API

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. 😁

Currently available

  • Tensorflow.js ImageClassifier

How to use it?

  1. Go to Teachablemachine and add images to different classes.
  2. Save the model with a shareable link and copy the link. (e.g., https://teachablemachine.withgoogle.com/models/3RcVEQiII/)
  3. 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>"
}
  1. Ta-da. 🎉

Example

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! 😁

Roadmap

  • 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.

Why?

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.

License

MIT