Tiny Machine Learning on the Edge with TensorFlow Lite Running on SAMD51

okay welcome to a machine-learning monday might not even be Monday but so he's a good time for some it's a good way to train your machines yeah doesn't know if it's Monday what is it Monday the Monday's Monday all right so this is probably the first of many yeah videos that we're doing around this new thing machine learning which is a little complicated but it probably doesn't need to be so in your words lady ADA what is machine learning machine learning is the process by which you feed a computer a ton of data and it does some calculations on the data to try to figure out what the patterns are and then it can recognize new data whether it's in that set or not for example you feed it the classic examples you feed it lots of photos of dogs and you feed it lots of photos of cats and then as you show a new photo it'll be able to tell you is it more like the cats or is it more like the dogs does it know what a cat or dog is all it knows is is it like these sets of photos or these sets of photos why is it that most of the demos I've seen don't really work machine learning is really hard I mean we're still we're still learning as humans how to teach machines to learn stuff so it's very new it's very exciting because historically you know we would have heuristics where we would you know we would decide okay look for whether as pointy ears are not that it's a cat or look for a fence whiskers or if it has you know a fluffy tail and and that's how you would determine if something as a cat or a dog but it it takes a very long time and it's not flexible wears machine learning the goal and aim and promise is that it'll figure out what the differentiators are for you instead of having a human tried to figure those out and program management yeah I feel like there's a lot of hand waving and there's not a lot of documentation and no one's quite figured this out especially to get people all types of people involved because I think if if we're not careful we'll get a very small segment of the population programming for potentially everyone and I think it'd be really good to have the accessibility just like we're starting to see with microcontrollers programming like Python also finishing yeah challenge like for example if you feed a computer you know what you consider a person a photo of a person if you don't feed it enough different photos of the huge variety of people out there they will be able to recognize some people based on their hairstyle their skin color their height how their posture is it won't be able to be smart enough to recognize it as a human so it's a lot about making sure that the data were feeding this computer it's good data we are only eight we are we eat so it is the same we always say that with them our our theme make robot friend make not robot enemy yeah so be really nice to robots the code that you put in that's their soul that's how they're going to eventually think in the future we train robots to be bad and horrible to humans all you're gonna get is been horrible human robots what do you think so there's a couple tools because I was gonna ask about the tools so tensorflow that's one of the ones that this thing's will say right away tensorflow yeah and then tensorflow like what's tensorflow and what is tensorflow white tents are plentiful light are these programming structures that yet you create the models that is this feeding the data and creating you know what what is it cat works the dog these these tensors these matrices of data tweaking and tuning them and then being able to run that data also against new information so like a new photo of an animal whether it's a cat or dog so tensorflow is this is a google project it's really awesome it's kind of what sparked machine learning machine learning has been around for at least 20 years a ton of startups that they just get a little bit of tensorflow going they're like now we got the AI company basically that's what it is that's what all of a lot of it is and it's interesting I was looking at like kaggle which is a place where people share and work on data sets and it's new there's like an airline that's like here's some data can you tell us whether this customers are likely to show up at the flight or delet you know if they're not gonna show up so we know whether their ticket is gonna be valid or not – you know finance companies – health companies so it's all about you know getting that data together almost everyone's using tensorflow of course is people who have like home-brewed solutions but tensorflow is an open-source version that runs on multiple different operating systems and programming languages so C or Python you know there's like a rest giant computers that are crunching all these numbers to make the model and then the most interesting thing for us as an electronics company model is we want to run it on little bits of hardware and I clearly hardware that we're really good at yeah the light is the light is it ones you know you would use tensorflow the big project to compute your models but then let's say you weren't told I'm gonna small my controller or a small single board computer that's where you'd go tensorflow light okay so there's like experimental micro so we've been thinking about a lot of different things are there events that people can go to and learn about machine learning and have like a machine learning badge talk about that a bit also what demos are out there that show hardware I've seen some demos and it's usually a guy screaming up a little device going yes no yes and it doesn't necessarily recognize it and the the demo presenting the presenters are struggling to see if the LED is lighting up or not so I would say that some of the Google aiy demos have been really cool people have made some cool projects like the robots at senator shoulder and recognize people so we have a knight we had an idea good demos are possible yeah we had an idea one how do we get good demos out there yes you how can we make tools just like we do and learning guides and videos for people want to get into machine learning and have something that doesn't violate privacy that's like a very cool teaching tool so they could dip their toes in this idea of machine learning and this she told me to do this weekend yeah that was your weekend project okay well maybe even either it was this weekend or we've been working on it for years so the idea that we came up with is there's a kind of iconic pop culture touchstone okay so to speak and it's from the movie Tron and Flynn find classic you find a bit and the bit can only say yes or no well it's bit what's up what's watch a little tiny snippet okay of Tron and what hopefully these YouTube machine learning algorithm doesn't doesn't give me trouble for this but here's just a little tip that would be ironic there's a little tiny clip of what we're talking about okay thanks haven't seen it so Flynn he's in he's in the chair these machines are intelligent it's machine learning like they're learning something he's learning something and here's here's Ben Oh yes yes and all you can say okay now we're gonna do that but we're gonna do it on a PI gamer badge you just ship about 4,000 plus of these in a box guess what dimming you said run and we thought wouldn't it be cool to be able to play video games that added machine learning maybe project Sundays later but first let's get a what's getting easy to understand demo for people and so what's uh let's do this so here's how it's gonna work you're gonna talking to the let me just go to the overhead yes the board is running tensorflow light micro and it's got a model that can recognize the words yes or no yeah so if it if it if you say yes it's going to play the animation and it's gonna let you know it recognize yes and if it recognizes no it's gonna say no so he wanted to do this like real time and show like you know good demos are possible with this stuff so let's uh okay what's a demo okay yeah so I will turn it on yeah we wanted to have graphics and feedback and like ways that people could see what's going on on the screen still animation okay so now it's ready and so you can gives you instructions so instead of listening constantly which we thought some people don't like the privacy the side effects of that is you have to press the button a button a here and then you speak into this microphone that I've just plugged into the stem report here just a standard microphone and it will display a video and animation and audio so let's try it out I'm gonna press a and speaking just like yes I did it live demo so the that's what we wanted to show and it has some feedback on the screen it shows the version it shows what we're using and this is all hardware that we have now battery-powered low powered yes yeah this is a powder so the the other one that we're working on this is the edge badge this is what we're calling it and this is one for conferences and more aware machine learning AI all the things that people want to know we have a little spot for a secure chip in the back yeah cuz this this version you would be able to download miles or share models or upload multitude rain into a model using something like Azure Google cloud or whatever and then you can maybe share the model so it's kind of like a little edge computing node that would be part of a greater network as a greater secure network so this is kind of bit it's the same chip and hardware it's at the Sam D 51 this is a cortex m4 processor runs at 120 megahertz but I I loved overclocking it to 200 megahertz it has two and 56 K of RAM and then this version of the badge of course adds an ESP 32 for wireless support and also it could probably do some computation for you as well because it's a pretty fast processor dual core to 40 megahertz so it you know will lit one full fledge Tenterfield know it won't be able to calculate your models but you can do is collect data upload it to a cloud service that can do that heavy multi processor crunching and then download that model and then load it into your tensor flow light running on the microcontroller yeah and a couple things that's coming up ahead for us and we're gonna show some cool character selection and some future videos using machine learning training self-driving cars using machine learning and this is all on a deferred hardware and then the other neat thing is we did a lot of work with making devices behave with the user in line first so when you plug in these devices it shows up as USB Drive so you can drag the models on the dragon traffic's on very simple to get going you don't have to have these giant tool chains IDs you can actually get going really fast so that's our machine learning segment for today it's true right well we kicked it off we had this codes online son github if you have a PI game or a PI battery actually any Sam d 51 device that we sell you'll be able to run this demo code that you'll need the PI game or PI badge if you want the full graphics setup and check out the TF light micro speech repo we have and tried the demos and see how girls will be training some more models and deploying them on this hardware alright bit did lady a to do a good demo there you go yes yes yes yes yes all right that was machine learning thanks everybody

5 thoughts on “Tiny Machine Learning on the Edge with TensorFlow Lite Running on SAMD51”

  1. This is really exciting! Adafruit continues to surprise with leading edge tech. It is great to bring this technology to us ordinary folks. AI will infuse all kinds of computer systems. Thanks for making it available so we can learn how to incorporate it into our inventions!

  2. Machine learning is like rocket science. I've been studying it for months but I still can't do a thing with original data.

Leave a Reply

Your email address will not be published. Required fields are marked *