Skip to main content

First Inference

Run object detection on your Metis hardware in under five minutes. This guide uses inference.py, the SDK's command-line tool for running any model from the Model Zoo with a single command. For other ways to run inference (Python API, C++ API, GStreamer), see the Tutorials section.

Before every session

Activate your environment first:

source venv/bin/activate

Quickstart

./inference.py yolov5s-v7-coco usb:0

No USB camera? Use a sample video:

./inference.py yolov5s-v7-coco media/traffic1_1080p.mp4

Prerequisites

Step 1: Run object detection

With a USB camera:

./inference.py yolov5s-v7-coco usb:0

Or with a sample video file:

./inference.py yolov5s-v7-coco media/traffic1_1080p.mp4
First run

The first time you run a model, the pipeline compiler builds it for your hardware. This takes a few minutes and shows a progress bar. Subsequent runs start immediately. See Model Formats for what gets built and where it's stored.

Step 2: Read the output

A window opens showing the video feed with bounding boxes on detected objects. An instrumentation panel in the bottom-left displays:

MetricWhat it means
System throughputEnd-to-end performance of the complete pipeline
Device throughputMaximum Metis device throughput (if all other pipeline elements keep up)
CPU utilizationHow effectively the pipeline is offloaded from the host CPU

When the pipeline finishes (or you press Ctrl+C), average metrics are printed to the terminal.

Step 3: Try a different model

The SDK ships with many pre-optimized models. Try a classification model:

./inference.py resnet50-imagenet media/traffic1_1080p.mp4

Or a different object detector:

./inference.py yolov8s-coco-onnx usb:0

Browse the full list in the Model Zoo.

Troubleshooting

SymptomFix
command not found: inference.pyActivate environment: source venv/bin/activate
No display window appearsAdd --no-display to run headless, or check your display server
No Axelera device foundRun axdevice to check detection. See Verify Setup
Missing media filesRun ./install.sh --media to download sample videos

Next steps