Awesome
UNIFEI-IESTI01-TinyML
TinyML - Machine Learning for Embedding Devices
UPDATED to 2024 - 1st Semester
<img src='images/IESTI_2.jpg'/> <figcaption><a href='https://unifei.edu.br/iesti/'>Instituto de Engenharia de Sistemas e Tecnologias da Informação – IESTI - Campus de Itajubá</a></figcaption> <hr>For the previous versions of IESTI01 courses, please visit:
- 1st Semester 2021 - UNIFEI-IESTI01-TinyML-2021.1
- 2nd Semester 2021 - UNIFEI-IESTI01-TinyML-2021.2
- 1st Semester 2022 - UNIFEI-IESTI01-TinyML-2022.1
For the current IESTI01 course version, please go to:
<hr>Material
- All materials were uploaded to this repo at the end of last semester's course
- Slides, Notebooks, Code, and Docs in English
- Videos in Portuguese
Optional pre-course activities:
- Pre-course: : [Suggested readings]
- Pre-course: : [Jupyter Notebook, CoLab and Python Review]
Parte 1: Fundamentals
- Class 1 - About the Course and Syllabus [Slides] [Video]
- Class 2 - Introduction to TinyML [Slides] [Docs] [Video]
- Class 3 - TinyML Challenges - Embedded Systems [Slides] [Docs] [Video]
- Class 4 - TinyML Challenges - Machine Learning [Slides] [Video]
- Class 4a - Google CoLab [Notebooks and Docs] [Video]
- Class 4b - Python Review [Notebooks and Docs] [Video]
- Class 5 - The Machine Learning Paradigm [Slides] [Notebooks and Docs] [Video]
- Class 6 - The Building Blocks of Deep Learning (DL) - Introduction [Slides] [Notebooks and Docs] [Video]
- Class 7 - The Building Blocks of DL - Regression with DNN [Slides] [Notebooks and Docs] [Video]
- Class 8 - The Building Blocks of DL - Classification with DNN [Slides] [Notebooks and Docs] [Video]
- Class 9 - The Building Blocks of DL - DNN Recap, Datasets and Model Performance Metrics [Slides] [Notebooks and Docs] [Video]
- Class 10 - Introducing Convolutions (CNN) [Slides] [Docs] [Video]
- Class 11 - Image Classification using CNN [Slides] [Notebooks and Docs] [Video]
- Class 12 - Introduction to Edge Impulse – CNN with Cifar-10 [Slides] [Notebooks] [Video]
- Class 13 - Preventing Overfitting [Slides] [Notebooks and docs] [Video]
- Class 13a - Wisconsin Diagnostic Breast Cancer (WDBC) [Video]
- Class 14 - Fundamentals wrap-up and Application’s preview [Slides] [Docs] [Video]
Parte 2: Applications & Deploy
- Class 15 - ML Applications Overview - AI Lifecycle and ML Workflow [Slides] [Video]
- Class 16 - Introduction to TFLite and TFLite-Micro [Slides] [Notebooks] [Docs] [Video]
- Class 17 - TinyML Kit Overview - HW and SW Installation & Test [Slides] [Notebooks] [Docs] [Video]
- Class 18 - TFLite-Micro Overview & Hello World Code Walkthrough [Slides] [Docs] [Video]
- Class 19 - Motion Classification - Introduction [Slides] [Video]
- Class 20 - Motion Classification using MCU (Nano 33) [Slides] [Docs] [Video]
- Class 21 - K-means Clustering & Anomaly Detection [Slides] [Docs] [Notebooks] [Video]
- Class 22 - Anomaly Detection Hands-On Lab & Pos-Processing [Slides] [Code] [Video]
- Class 23 - Keyword Spotting - Introduction [Slides] [Docs] [Notebooks] [Video]
- Class 24 - Lab KWS using MCU (Nano 33) [Slides] [Docs and code] [Notebooks] [Video]
- Class 24a - KWS using MCU (ESP32) [Docs]
- Class 25 - Image Classification Introduction [Slides] [Docs] [Notebooks] [Video]
- Class 26 - Image Classification using Edge Impulse Studio [Slides] [Video]
- Class 27 - Collecting Data - Alternative ways [Slides] [Docs] [Video]
- Class 28 - Responsible AI & Course Wrap-up [Slides] [Docs] [Video]
- Class 29 - EdgeAI: Going Further [Slides] [Video]
- Class 30 - Group Presentations (2024)
- Monitoramento Acústico de Fluxo Hídrico [Report] [Video]
- Detecção de Quedas de pessoas [Report] [Video]
- Contagem de Capacitores [Report] [Video]
- Identificador de estilos musicais[Report] [Video]
- Teste de qualidade de Produtos [Report] [Video]
- Afinador de violão [Report] [Video]
- Detecção de doenças em folhas de tomate [Report]
Relevance of TinyML Learning
Microcontrollers (MCUs) are affordable electronic components, usually with only a few kilobytes of RAM, and designed to consume minimal power. MCUs are embedded in nearly all residential, medical, automotive, or industrial devices. It's estimated that over 40 billion microcontrollers are sold annually, and probably hundreds of billions are currently in service. However, interestingly, these devices often need to receive the proper attention, as they are frequently used merely as replacements for the functionalities that older electromechanical systems used to perform in cars, washing machines, or remote controls.
More recently, with the advent of the Internet of Things (IoT), a significant portion of these MCUs has started generating "quintillions" of data, much of which goes unused due to the high cost and complexity of transmission (bandwidth and latency).
On the other hand, in the past few decades, we've witnessed the development of Machine Learning models (a sub-field of Artificial Intelligence) trained on large datasets using powerful mainframes. But what's happening now is that suddenly, it has become possible to extract "meaning" from noisy and complex data like images, audio, or vibrations, using neural networks. And importantly, we can run these neural network models on microcontrollers and sensors, using very little power to interpret much more of the sensor data we typically overlook. This is TinyML, a new field that enables extracting "machine intelligence" right in the physical world (where the data is generated).
Course Overview
TinyML is an introductory course at the intersection of Machine Learning and Embedded Devices. The proliferation of embedded devices with ultra-low power consumption (on the order of milliwatts), coupled with the introduction of machine learning frameworks dedicated to embedded devices, such as TensorFlow Lite for Microcontrollers (TFLite Micro or TFLM), enables the widespread adoption of AI-powered IoT devices, known as "AioT."
Furthermore, the explosive growth of machine learning and the user-friendliness of platforms like TensorFlow (TF) make it an essential subject of study for engineering students, especially in Electronics, Computer Science, and Control & Automation.
TinyML differs from conventional machine learning (e.g., server-cloud-based) because it requires software knowledge and expertise in embedded hardware. This course aims to provide a foundation for understanding this emerging field.
References
The current version of this pioneering course in Latin America is primarily based on:
- Harvard School of Engineering and Applied Sciences - CS249r: Tiny Machine Learning
- Professional Certificate in Tiny Machine Learning (TinyML) – edX/Harvard
- Introduction to Embedded Machine Learning - Coursera/Edge Impulse
- Computer Vision with Embedded Machine Learning - Coursera/Edge Impulse
- Fundamentals textbooks:
- Applications & Deploy textbooks:
The IESTI01 course is part of the TinyML4D, an initiative to make TinyML education available globally.
Course Topics
- Fundamentals of IoT
- Fundamentals of Machine Learning (ML)
- Fundamentals of Deep Learning (DL)
- Collecting Data for ML
- Training and Deploying ML Models
- Basics of Embedded ML
- Code behind some of the most widely used applications in TinyML
- Real-world applications of TinyML in the industry
- Principles of Automatic Speech Recognition (Keyword Spotting apps like Alexa, Hey Google, Siri, etc.)
- Principles of Automatic Image Classification (Visual Wake Words)
- Anomaly Detection Concepts and Applicable ML Models
- Principles of Data Engineering applied to TinyML
- Overview of microcontroller-based device hardware
- Overview of software behind microcontroller-based devices
- Real projects using market platforms
- Design, Development, and Deployment of Responsible AI
Carga horária:
- 30 hours (Recorded videos)
- 15 hours de assignments/labs
- 15 hours of individual research and study + final group project
Approval Process:
- Individual Quiz Responses: 20%
- Code Assignments (ML/DL) (Jupyter Notebook / CoLab): 25%
- Practical Projects (Laboratory Reports): 25%
- Final Group Project (with presentation): 30%
Prerequisites:
- Proficiency in the English language (for reading).
- Basic programming knowledge in C/C++ (Arduino IDE) and Python. All class tasks will involve one or both programming languages.
- Familiarity with command-line tools on Mac, Windows, or Linux. Projects will require some operations in a terminal.
- Understanding linear algebra, signal analysis, basic probability, and statistics. Many ML topics revolve around grasping vector and matrix operations, notation, and concepts like Gaussian distributions, means, standard deviations, etc.
Methodology/Resources:
- Students will be able to take classes sequentially at their convenience.
- Exercises and projects can be developed on personal computers with TensorFlow v2.x installed or by utilizing online tools like Google Colab (desirable).
- Real TinyML models will be developed and trained using the Edge Impulse Studio.
- For initial data capture, deployment of trained models, and familiarization with market tools, personal smartphones equipped with at least an accelerometer, microphone, and camera sensors will be used.
- In the second part of the course, an Arduino BLE Sense (Cortex-M4) Kit and a digital camera model OV7675 will be used. (Each student will receive a Kit the university provides for personal use during the course.)