Skip to content
PetalEdgeDocs

Model Deployment

Deploying a Motion model

Choose a target and precision, then build and download a package for your Motion model.

Try it in Studio
On this page

Goal

By the end of this page you will have downloaded a package that contains your trained Motion model.

Packages for Motion models

Target in StudioPackageUse it for
Generic tf lite.peRunning the model with Python on a computer or Linux device
Raspberry Pi.pxeRunning the model on a Raspberry Pi

Studio builds these packages. Whether each one has been tested on a real device is shown in the Hardware section.

Steps

  1. Open Deployment in Studio's left menu.

  2. Under Target Device, check or choose the target. If your project has a target device set, Studio uses it.

  3. Under Precision, choose the version of the model to ship:

    • Unoptimized (float32): the original model.
    • Quantized (int8): about four times smaller and usually faster, sometimes a little less accurate.

    Each option shows its score from evaluation, so you can compare them. Studio marks one as Recommended. See Choosing Float32 or INT8.

  4. Check Device Preview for the platform, package and precision that will be built.

  5. Select Build Deployment Package (or Build for your device).

  6. When the build finishes, select Download Latest Build.

Build Timeline lists your earlier builds, with their status and time.

What is in the package?

PackageContents
.peThe model (model.tflite), the labels, the processing settings, a manifest and a Python example (inference.py). The example expects features, so your code must run the same processing as your impulse.
.pxeThe model, the labels, the processing settings, a manifest and a runner program that applies the impulse's processing block to raw sensor windows.

The .pe manifest also records your impulse's window length, increase and axes, so your code can cut windows the same way Studio did.

What next?