This repository contains a comprehensive collection of hands-on exercises for learning machine learning deployment on microcontrollers and edge devices. The course progresses from basic embedded programming to advanced ML optimization techniques.
Each exercise (ex1–ex8) contains:
task/- Exercise materials, starter code, and instructionssolution/- Reference solutions and implementation guides
- Focus: Environment setup, basic microcontroller programming and GPIO operations
- Files: Basic blinky LED example and setup
- Focus: Introduction to ML model training along with digital signal processing and audio analysis fundamentals.
- Files: Audio processing with MLonMCU framework, Jupyter notebook tutorials
- Focus: End-to-end ML workflow implementation
- Files: Multiple Jupyter notebooks covering data preprocessing, training, and evaluation
- Focus: FFT profiling and real-time signal processing
- Files: ADF implementation, FFT profiling tools, audio playback utilities
- Focus: Mel-frequency cepstral coefficients for audio ML
- Files: MFCC training notebooks, TensorFlow Lite model conversion, STM32 deployment
- Focus: Neural network compression techniques
- Files: Fashion-MNIST models with various optimization strategies (pruning, quantization, QAT)
- Focus: Model compression through teacher-student learning
- Files: Knowledge distillation implementation, live inference demo, STM32 deployment packages
- Focus: CNN deployment for image classification
- Files: Camera integration, AI8X framework, meme classification models
-
Prerequisites:
- Docker
- STM32 development environment
- Python 3.8+ with TensorFlow/PyTorch
- Jupyter Notebook
-
Setup:
git clone <repository-url> cd MLonMCU/dockerfiles # Please follow the README.md file in MLonMCU/dockerfiles # Install requirements for each exercise as needed
-
Working with Exercises:
- Start with the PDF instructions in each
task/directory - Follow the progressive difficulty from ex1 to ex8
- Reference solutions are available in each
solution/directory
- Start with the PDF instructions in each
By completing these exercises, you will learn:
- Embedded systems programming for ML applications
- Audio signal processing and feature extraction
- Neural network optimization for resource-constrained devices
- Model quantization and compression techniques
- Real-time inference on microcontrollers
- Computer vision pipeline deployment
Exercises and solutions are continuously updated based on feedback and improvements. Feel free to open issues if you find any bugs or inconsistencies!
We welcome contributions to this project! If you would like to contribute, follow these steps:
-
Fork the Repository: Start by forking this repository to your GitHub account.
-
Create a Feature Branch: Create a new branch for your feature or bug fix:
git checkout -b feature-name
-
Make Your Changes: Implement your feature or bug fix.
-
Build and Test: Build the project and ensure that your changes work as expected.
-
Commit and Push: Commit your changes with a descriptive message and push them to your fork:
git commit -m "Add feature XYZ" git push origin feature-name -
Create a Pull Request: Navigate to your fork on GitHub and create a pull request to the main repository.
Please ensure your pull request adheres to the following guidelines:
- Clearly describe the changes and their purpose.
- Include any relevant documentation or tests.