Close

Hack Chat Transcript, Part 2

A event log for Machine Learning with Microcontrollers Hack Chat

Arduinos and Pis and AI, oh my

lutetiumLutetium 09/11/2019 at 20:170 Comments

happyday.mjohnson12:21 PM
@Daniel thanks for the github link.

riley.august joined  the room.12:21 PM

Daniel Konhauser12:21 PM
are you leveraging transfer learning in these demos?

pt12:21 PM
@Tara the demos we are showing are pi 4, nordic nrf52840, and samd 51

Daniel Situnayake12:21 PM
@Duncan our speech model that can detect "yes" or "no" is ~20kb, our vision model that can detect the presence or absence of a person is ~250kb. I'm not sure

Pete Warden12:21 PM
@Tara we're actually working on a book that has a chapter about setting up TF Lite for new devices. TF Lite Micro should be a lot easier to port than regular TF Lite too - http://shop.oreilly.com/product/0636920254508.do

Matteo Borri12:21 PM
that looks amazing for when you're far out @Evan Juras thank you

Meghna Natraj12:22 PM
@Andres Manjarres Unfortunately no. 1) we train regular tensor flow models (and factor in micro controller constraints if possible- small model size, low latency) 2) convert it to a tensorflow lite model 3) run it on a microcontroller that we support.

Daniel Situnayake12:22 PM
*I'm not sure of the exact latency, but it's pretty low!

pt12:22 PM
@Duncan we'll show the yes no demo on video right now here too ---

Tara12:22 PM
Thanks @pt and @Pete Warden !! I'll definitely check it out.

Pete Warden12:22 PM
@Tara drop an email to petewarden@google.com and we might be able to send you a draft copy

Evan Juras12:22 PM
Thanks @Matteo Borri :D

Andres Manjarres12:22 PM
@Meghna Natraj Okey, thanks

limor12:22 PM
@Dan Maloney yes! we would have to take ~100+ photos of me and pt and train a new model to detect us

John Loeffler12:23 PM
Limor and PT any Cortex M7 Boards in the works?

Dick Brooks12:23 PM
Question: Do you plan to build a Deep Learning demo also?

happyday.mjohnson12:23 PM
I use google colab for deep learning/keras/tensorflow , mu for CP...what is/will be the ideal tool chain for this experience?

jcradford12:23 PM
@Pete Warden I'd be interested in that for a high school class...

limor12:23 PM
we haven't written a guide on that yet - hopefully soon, we're learning a lot every weekend!

@limor Cool, thanks. Thought it would be something like that.

Duncan12:23 PM
@Daniel Situnayake 20kB is impressive! Nice work.

Pete Warden12:23 PM
@jcradford please drop me an email too

somenice12:23 PM
Thanks @Daniel Situnayake

Prof. Fartsparkle12:23 PM
@limor do some models made for desktop/server run with tensorflow lite on the SAMD51? Like the more popular image recognition networks like mobilnet or tiny-yolo?

riley.august12:23 PM
Very cool. Also, Matteo, you misremembered what we generated. It was not a learning capable program, it was a fixed program. We used genetic programming and simulation to develop task specific programs.

I was planning on scraping family photos from Google Photos to train a model for a security system I'm working on

pt12:24 PM
ok! all the demos worked, yay

Daniel Situnayake12:24 PM
@Dick Brooks if you want to see the absolute basics of training a deep learning model and deploying it to device, check out this sample: http://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/experimental/micro/examples/hello_world

pt12:24 PM
one tip for folks who want to play around, check out https://runwayml.com

Tara12:24 PM
@pt Is the demo code you are showing for the pi4, Nordic nrf52840, and samd 51 available?

pt12:24 PM
@tara yep!

Gabriel D'Espindula joined  the room.12:24 PM

Everyone, if you miss something, rest assured that there will be a full transcript posted after the chat, as well as links to the demos and livestream.

happyday.mjohnson12:25 PM
@Daniel - thank you for the github on learning tensorflow...besides Adafruit learning (most awesome) where else should we go to explore?

limor12:25 PM
@Evan Juras yay i used your awsome guide to make the demo im running now. just changed a couple things and using pygame instead of opencv so it works with framebuffer devices (no X11)

Matteo Borri12:25 PM
i gotta learn TF

siddacious12:25 PM
@John Loeffler "In the works" is subjective but signs point to yes ;)

Andres Manjarres12:25 PM
Did you try to use the optimizations like quantization? to reduce the size and improve the power consumption o something like that?

Daniel Situnayake12:26 PM
@happyday.mjohnson it's not quite out yet, but @Pete Warden and I are writing this book: http://shop.oreilly.com/product/0636920254508.do

Evan Juras12:26 PM
@limor that's so great to hear! Thanks!! Glad it was helpful :D

pt12:26 PM
Play Video

Daniel Situnayake12:26 PM
however, if you're looking to learn tensorflow generally, I'd recommend one of these courses:

pt12:26 PM
the goal is to be able to do some type of ML in 5 mins or less from taking it out of the box

John Loeffler12:27 PM
Limor and PT any Cortex M7 Boards in the works?

Jack Lupton joined  the room.12:27 PM

Tara12:27 PM
@Pete Warden YES!! Thank you

siddacious12:27 PM
@John Loeffler I have an informed answer above ;)

pt12:27 PM
@John Loeffler not yet :)

happyday.mjohnson12:27 PM
@Daniel, i'm sorry ...didn't get info on tensorflow learning courses... (I'm currently trying CS230/stanford...)

siddacious12:28 PM
<- eats foot

pt12:28 PM
from youtube "Ronald Mourant

Will the BrainCroft Hat be available as a product? When? Price?"

pt12:28 PM
from youtube "chuck

Do you do training on microcontrollers for something adaptive?"

Prof. Fartsparkle12:28 PM
@limor @pt do some models made for desktop/server run with tensorflow lite on the SAMD51? Like the more popular image recognition networks like mobilnet or tiny-yolo?

Daniel Situnayake12:28 PM
Here are some general courses for learning TensorFlow:

- https://www.udacity.com/course/intro-to-tensorflow-for-deep-learning--ud187

- https://www.coursera.org/specializations/tensorflow-in-practice

- https://www.deeplearning.ai/tensorflow-in-practice/

pt12:28 PM
"GJ E

Q: how far are you thinking you will go on making these projects? in the sense of only making identifiers, training models or .... I would like to know what to look forward to"

Phillip Scruggs12:28 PM
Not sure if you answered: Did you have a model that can tell the difference between two people?

Phillip Scruggs12:28 PM
rather than just object detection

Daniel Situnayake12:28 PM
These were all developed by the TensorFlow team at Google and contain roughly the same content

happyday.mjohnson12:29 PM
@Daniel - yay - thank you for the course info.

PaulG12:29 PM
Vid and audio demos are fine but I imagine the models are expensive to train. Are there plans to to create demos that feature just raw data? Readings from multiple sensors and so on.

pt12:29 PM
"rohan joshi

what are upcoming projects ?"

Daniel Situnayake12:29 PM
I also love this book; it's by the guy who created Keras, TF's high-level API: https://www.manning.com/books/deep-learning-with-python

Sébastien Vézina12:29 PM
How much do you need to know about DL/NN theory in order to use TF efficiently? Or start, at least. I find that deciding what hidden layers and how many of them should go into your NN isnt very clear.

limor12:29 PM
@Phillip Scruggs yes we answered, see above or check out @Evan Juras 's guide

@Phillip Scruggs - @limor answered yes when I asked. She said it would take ~ 100 images to train each person.

Daniel Situnayake12:30 PM
great place to start if you're learning! I would emphasize that you DO NOT need to go and learn a bunch of math or do CS-style courses to get started with deep learning

Sébastien Vézina12:30 PM
@Daniel Sit

happyday.mjohnson12:30 PM
@Daniel - yah the deep learning w/ python is a most excellent book. I also bought the audible so I can sit there look at the pictures and be read to....i love that he doesn't get too much in the math and has an intuitive way about him.

Sébastien Vézina12:30 PM
@Daniel Situnayake AH! exactly what i've been doing :s

"Speak & ML", lol

Foxmjay joined  the room.12:30 PM

pt12:30 PM
some upcoming projects... 1) speak and spell (speak and ML) kid's toy that sees things and says them, kids play scavenger hunt with it.

2) emoji cam, all it does is sit on your desk and change your mood status based on your smile, etc.

3) video game that changes characters based on what you show it, want to be a cat? show it a cat.

Meghna Natraj12:30 PM
@happyday.mjohnson [What resources do you use for training?] Using colab or even your local desktop (only CPU) just works fine. It would take longer -- but you don't need 'fancy' hardware to get started. :) Especially with micro controller constraints, models sizes and training times are quite less. To get stated, you can train models for a day, try to get them to run on a mcu -- done!. I'll share some resources shortly..

limor12:30 PM
re: braincraft hat - its still under revision, we want to build a few more projects to make sure we didnt miss anything, check out the singup page here - as soon as we have it ready for release we'll email you!

ira.hart joined  the room.12:31 PM

limor12:31 PM

https://www.adafruit.com/product/4374

ADAFRUIT 
ADAFRUIT INDUSTRIES

Coming Soon! Machine Learning BrainCraft HAT for Raspberry Pi 4

Adafruit Industries, Unique & fun DIY electronics and kits Coming Soon! Machine Learning BrainCraft HAT for Raspberry Pi 4 ID: 4374 - Coming soon! Sign up to be notified when we have these in the store!The idea behind the BrainCraft board (stand-alone, and Pi “hat”) is that you’d be able to “craft brains” for Machine Learning on the EDGE, with Microcontrollers & Microcomputers.

Read this on Adafruit

Arthur Lorencini Bergamaschi12:31 PM
@pt, @limor and @Pete Warden is there a book/resource to start learning about Tiny ML? I want to do my final project based on tiny ml.

Daniel Situnayake12:31 PM
@Sébastien Vézina it's super fun to learn the math stuff along the way, but I would definitely recommend just going through a couple of the intro books. The first one I recommended is great:

https://www.manning.com/books/deep-learning-with-python

Also, this one is very good (but I haven't read it myself yet)

https://www.amazon.com/Hands-Machine-Learning-Scikit-Learn-TensorFlow/dp/1491962291

Foxmjay12:31 PM
I have made a simple perception implementation some time ago on an atmega328 , for 1kb challenge and for fun

https://hackaday.io/project/18769-avr-perceptron-initiation-to-neural-networks

Seeing now that we can do speech and image detection using TF on microcontrollers makes me happy. looking forward to see more !.

pt12:31 PM
we are also making it so all the models show up as files on the "drive" so you can just swap them out

happyday.mjohnson12:31 PM
@Meghna - thanks. re: colab w/ GPU has been a terrific experience (so far). i also like how easy it is to put datasets on google drive and read in. Also, github integration is nice.

pt12:32 PM
from discord "unawooToday at 3:29 PM

Hi, anyone know of an audio database for tensorflo? i want a microphone in the yard to tell me if someone woofed or meowed"

Daniel Situnayake12:32 PM
For Tiny ML specifically, @Pete Warden and I are working on this book:

http://shop.oreilly.com/product/0636920254508.do

Prof. Fartsparkle12:32 PM
any boards planned with MCUs that include tensor accelerators like the MAIX?

happyday.mjohnson12:32 PM
@Daniel - so hard to wait for 6/2020....

Daniel Situnayake12:33 PM
oh wow, it shouldn't be June 2020!

Daniel Situnayake12:33 PM
it should be Jan 2020 - I will have them fix the date :)

Sébastien Vézina12:33 PM
@Daniel Situnayake Yep I'm on the 3rd chapter of that book but felt I needed to backtrack a bit after seeing a few mentions of linear algebra - i'll keep reading!

happyday.mjohnson12:33 PM
what about preprocessing of sensor data? Are there "best practices" as there are for electronics signal processing?

Max-Felix Müller12:34 PM
@Foxmjay cool, do you know about more ATMega ML Projects?

Daniel Situnayake12:34 PM
it's already mostly written, and you can sign up to O'Reilly's plan and read the currently finished chapters

Peabody192912:34 PM
On a Pi 4, how long does it take the inference engine to recognize an image? Assume the image is an array of 64 bytes.

happyday.mjohnson12:34 PM
@Daniel - thanks for bringing that up about the book. i'll try..

Robert Wolff12:34 PM
@limor @pt have you done any work with the STM32MP1 or any other Cortex-A / Cortex-M hybrid chipsets?

mtfurlan12:34 PM
Oh hey the IRC bridge is down. How useful.

What kind of demo usecases do you use while working on tensorflow?

pt12:34 PM
@Peabody1929 we are going to show that now on vid!

I had an idea to train a model against all the dogs that bark all day in my neighborhood. See if I can identify which dog is barking just from it's "voice". Not sure what I do with that information once I have it though...

Pete Warden12:35 PM

Discussions