Edge Impulse Machine Learning
Get started with embedded machine learning on Raspberry Pi using Edge Impulse for object detection and audio classification.
- Raspberry Pi
- Advanced
- 90 minutes
- 6 steps
Shop this project
CartYou'll need
Raspberry Pi 4 Model B3GB / Board Only$96.63
Raspberry Pi AI Camera$77.92
Micro SD Card Preloaded Raspberry Pi OS (Legacy-32 Bit)16GBSold out · view product
Prices from vilros.com. Tax and shipping at checkout.
Before you start, you'll need
- Raspberry Pi 4 (4GB or 8GB recommended)
- USB webcam or Pi Camera
- USB microphone (optional for audio)
- Internet connection
- Edge Impulse account (free)
Install Edge Impulse CLI
About 15 minutes
Set up Edge Impulse tools on Pi.
- Update system: sudo apt update && sudo apt upgrade
- Install Node.js: curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
- Install dependencies: sudo apt install nodejs gcc g++ make build-essential
- Install Edge Impulse CLI: sudo npm install -g edge-impulse-linux
- Create free account at edgeimpulse.com.
You should see
Edge Impulse CLI is installed.
Connect Pi to Edge Impulse
About 10 minutes
Link your Pi to Edge Impulse project.
- Run: edge-impulse-linux
- Log in with your Edge Impulse credentials.
- Create new project or select existing one.
- Pi is now connected and ready to collect data.
You should see
Pi shows as connected device in Edge Impulse dashboard.
Collect training data
About 25 minutes
Capture images or audio for your model.
- Connect USB webcam to Pi.
- In Edge Impulse dashboard, go to Data Acquisition.
- Use Pi to capture images of objects you want to detect.
- Capture at least 50-100 images per object class.
- Label each image with the correct class.
- For audio: use USB microphone to record sound samples.
You should see
Training data is collected and labeled.
Design and train model
About 25 minutes
Build a machine learning model.
- In Edge Impulse, go to Create Impulse.
- For object detection: add Image processing block and Object Detection learning block.
- For audio: add Audio processing block and Classification learning block.
- Generate features from your data.
- Train the neural network (takes 5-10 minutes).
- Review accuracy metrics.
You should see
Model is trained with good accuracy (>85%).
Deploy to Raspberry Pi
About 10 minutes
Download and run trained model.
- In Edge Impulse dashboard, go to Deployment.
- Select 'Linux (ARMv7)' as target.
- Download the model package.
- Extract on Raspberry Pi.
- Run: edge-impulse-linux-runner
- Model now runs inference on Pi!
You should see
Model runs on Pi and detects objects/sounds in real-time.
Test your ML model
About 5 minutes
Verify detection works.
- Point camera at trained objects.
- Watch terminal for detection results and confidence scores.
- For audio: make sounds the model was trained on.
- Adjust camera angle or lighting for better results.
You should see
Model accurately detects trained objects or sounds.
It didn't work
Low accuracy.
Collect more diverse training data. Include different angles, lighting conditions, and backgrounds. Retrain the model.
What to do next
Stuck? Contact Vilros Support with your board model and what you see on screen.