Devices
Raspberry Pi
Connect a Raspberry Pi to Studio, and build a Raspberry Pi package for your model.
Try it in StudioOn this page
Goal
By the end of this page you will know how to connect a Raspberry Pi to PetalEdge Studio and how to build a Raspberry Pi package.
What you need
- A Raspberry Pi with Raspberry Pi OS (Debian).
- A network connection from the Raspberry Pi to your PetalEdge server. Before you begin on the connect page explains what your setup needs.
Connect the Raspberry Pi to Studio
A connected device can collect data for your project.
- Open Devices in the left menu and select Connect Device.
- Read Before you begin.
- Under Choose your device, choose Debian / Raspberry Pi OS.
- Copy the command under Run this on your device and run it in a terminal on the Raspberry Pi. It installs the PetalEdge device client.
- Answer the setup wizard's questions.
- Studio shows Waiting for your device... until the Raspberry Pi connects, then shows its Live status.
Build a Raspberry Pi package
- Open Deployment in the left menu.
- Choose Raspberry Pi as the device.
- Choose a precision. See Choosing Float32 or INT8.
- Select Build Deployment Package (or Build for Raspberry Pi).
- Select Download Latest Build to save the
.pxefile.
What is inside a .pxe package
| Part | What it is |
|---|---|
runner.py | The program that runs your processing block and model on the device |
model.tflite | Your trained model |
manifest.json | Model details, checked when the package is built |
labels.txt | Your label names |
dsp_config.json | Your processing block settings |
postprocess_config.json | Settings used after the model runs |
Unlike a .pe package, a .pxe package runs the processing block on the device. It supports these processing blocks: Image, Raw Data, Spectral Analysis, Flatten, MFCC and Spectrogram.
Which models can use it
- Image projects: NanoVision, Vision Pro and EdgeDetect Lite. FaceRec-Edge builds its own ONNX package, which Studio describes for Raspberry Pi 4 and 5.
- Motion projects.
- Audio projects with MFCC, Spectrogram or Raw Data.
Result
You have a .pxe package for your Raspberry Pi. Step-by-step instructions for running it on the board will be added once that workflow has been tested on hardware.