How to run a TensorFlow model on Arduino ?

Hello !
I am a beginner, and this is my first big project on Arduino. I would like to use Teachable Machine to detect when a pull-up is done, and I trained it to. It's working, and I got a Zip-file with 2 JSON files in.
But I want to use the code on an Arduino, and I don't know how to use the JSON files in my Arduino program.
Thanks for your help : )

What is Teachable Machine?

You say it's working, what does it do?

You want to use the code in Arduino? What should the Arduino do? If this other thing is working already, then what is the Arduino's role in the thing?

You say you have JSON files. But what about code? Do you have code that reads those files and does something with them? Is that Arduino code?

What does this mean?

Sorry, I wasn't clear enough. Teachable Machine is an IA made by Google, which can learn to recognize movements for example. My idea was to train the IA to recognize when a pull up is done. Next, I wanted to download the code and to store it on an Arduino Board. Then, I would have written a code which use the datas provided by the AI to count how many pull-ups I do in a day.
But the file I get by downloading the AI is in JSON, and I was wondering if I could use that with my Arduino board.

It's when you tract your body up while hanging on a bar.

Using what sensors or source of information?

This process could go faster if you provided actually useful details and sensible questions.

1 Like

The IA uses a camera to recognize movement.
I think the easiest way for you to understand is to try Teachable Machine by yourself. You can train it to recognize a movement in literally five minutes, and then you will see what I am talking about with the code, and maybe you will find another solution

You might ask the robot how to design, code and test a sketch for a teachable machine.

1 Like

It's always good to give a link so that people know exactly what you're talking about.

I guess you mean this:

* AI ?

Did you see this in the FAQ:
https://teachablemachine.withgoogle.com/faq#Tools-and-Resources

Yes I saw the FAQ but I don't really understand how to use the AI with my Arduino.
And sorry for the mistakes, I'm French so sometimes I say IA instead of AI :sweat_smile:

I think the model they build is for tensorflow. Some Arduino's have access to tensor flow light, I don't know if that would be enough for it.

Ok thank you, I will have enough time to try some stuff this week-end, and I will come back here if it still doesn't work : )
Have a nice day and thanks for your quick answers

Yes, that is what the FAQ says:

image

So @xarlixe's question really becomes, "how to run a TensorFlow model on Arduino".

Hi! I followed this tutorial with some help from chatGPT and my Arduino now reacts to different plant spicies exactly as I wanted:)

I hope that helps and if you need any more help, don't hesitate to send me a message:)

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.