From 2bfd8f57075a6cae8f469fc56f05b9d4faa8f20b Mon Sep 17 00:00:00 2001 From: patrykorwat Date: Wed, 19 Aug 2026 20:45:38 +0000 Subject: [PATCH] fix(axelera): default to Apache-2.0 YOLOX model, drop AGPL YOLO references Frigate (MIT) cannot reference Ultralytics YOLO models (AGPL-3.0), see blakeblackshear/frigate#10717. The plugin now defaults to the SDK model-zoo preset yolox-s-coco (Megvii YOLOX, Apache-2.0), docs updated accordingly. --- docs/docs/configuration/object_detectors.md | 10 +++++----- docs/docs/frigate/installation.md | 4 ++-- frigate/detectors/plugins/axelera.py | 17 +++++++++-------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index c487f28013..f2ca936a2f 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -797,13 +797,13 @@ See the [installation docs](../frigate/installation.md#axelera-metis) for inform ### Configuration {#configuration-axelera} -The integration runs inference through a single stream created with `create_inference_stream(network=...)`, which accepts a compiled model as a URL (downloaded into the model cache), a local file path, or an SDK model-zoo preset name. When no model is specified, the compiled default model is downloaded from Hugging Face into the model cache on first startup; the SDK model-zoo preset `yolov8n-coco` can be selected explicitly with `model.path: yolov8n-coco`. +The integration runs inference through a single stream created with `create_inference_stream(network=...)`, which accepts a compiled model as a URL (downloaded into the model cache), a local file path, or an SDK model-zoo preset name. When no model is specified, the compiled default model is downloaded from Hugging Face into the model cache on first startup; the SDK model-zoo preset `yolox-s-coco` can be selected explicitly with `model.path: yolox-s-coco`. :::info -The Metis board needs models compiled for its architecture. Compile them from the Voyager model zoo with the SDK tooling, e.g. `axzoo build yolov8n_coco --backend axrelay --cal-source repr` (or compile a custom ONNX model with `axcompile`, see [Building a model](/frigate/installation#building-a-model)), producing a `.axm` file or a compiled model directory. Host the compiled model anywhere reachable, e.g. on Hugging Face, and point `model.path` at it. Plain strings in `model.path` are treated as SDK model-zoo preset names; anything else is treated as a file (downloaded from a URL or used in place). +The Metis board needs models compiled for its architecture. Compile them from the Voyager model zoo with the SDK tooling, e.g. `axzoo build yolox_s_coco --backend axrelay --cal-source repr` (or compile a custom ONNX model with `axcompile`, see [Building a model](/frigate/installation#building-a-model)), producing a `.axm` file or a compiled model directory. Host the compiled model anywhere reachable, e.g. on Hugging Face, and point `model.path` at it. Plain strings in `model.path` are treated as SDK model-zoo preset names; anything else is treated as a file (downloaded from a URL or used in place). ::: @@ -813,7 +813,7 @@ The Metis board needs models compiled for its architecture. Compile them from th The Metis board runs models compiled for its architecture (`.axm` files, or a compiled model directory). Two options are available: -- **SDK model-zoo preset (no compilation or download needed):** the `yolov8n-coco` preset ships with the Voyager SDK. Select it with `model.path: yolov8n-coco`. -- **Compiled model:** build one with the SDK tooling, e.g. `axzoo build yolov8n_coco --backend axrelay --cal-source repr` (model zoo) or `axcompile -i model.onnx -o compiled/` (custom ONNX). See [Building a model](/frigate/installation#building-a-model). +- **SDK model-zoo preset (no compilation or download needed):** the `yolox-s-coco` preset ships with the Voyager SDK (YOLOX, Megvii, Apache-2.0 licensed). Select it with `model.path: yolox-s-coco`. +- **Compiled model:** build one with the SDK tooling, e.g. `axzoo build yolox_s_coco --backend axrelay --cal-source repr` (model zoo) or `axcompile -i model.onnx -o compiled/` (custom ONNX). See [Building a model](/frigate/installation#building-a-model). -Host the compiled model somewhere Frigate can reach (a local path or an HTTP URL, e.g. on Hugging Face) and point `model.path` at it. With no `model.path`, the detector downloads its compiled default model into the model cache on first startup (a preset hosted on Hugging Face; see `AX_DEFAULT_URL` in the plugin source). Set `model.width` and `model.height` to the compiled model's input size. +Host the compiled model somewhere Frigate can reach (a local path or an HTTP URL, e.g. on Hugging Face) and point `model.path` at it. With no `model.path`, the detector uses the SDK model-zoo preset `yolox-s-coco` by default (no download). Set `model.width` and `model.height` to the compiled model's input size. diff --git a/docs/docs/frigate/installation.md b/docs/docs/frigate/installation.md index abe3d6b9d5..90c623310b 100644 --- a/docs/docs/frigate/installation.md +++ b/docs/docs/frigate/installation.md @@ -519,7 +519,7 @@ Then install the Metis kernel driver, for example with `axdevice driver --instal #### Building a model -Detector models are compiled for the Metis architecture. The simplest path needs no compilation: the detector uses the `yolov8n-coco` model-zoo preset by default, which ships with the SDK. +Detector models are compiled for the Metis architecture. The simplest path needs no compilation: the detector uses the `yolox-s-coco` model-zoo preset by default, which ships with the SDK. To compile your own ONNX model, use the SDK compiler (`axcompile`, see the [Compiler CLI reference](https://docs.axelera.ai/sdk/reference/compiler/compiler-cli)): @@ -527,7 +527,7 @@ To compile your own ONNX model, use the SDK compiler (`axcompile`, see the [Comp axcompile -i /path/to/model.onnx -o /path/to/compiled/ ``` -The compiler produces the artifacts under `output/compiled_model/` (see the SDK "Model Formats" documentation for what each file is). Give the compiled model to the detector through `model.path` (URL or local path) and set `model.width`/`model.height` to the model input size. Models from the SDK model zoo can also be built with the SDK CLI, e.g. `axzoo build yolov8n_coco --backend axrelay --cal-source repr`. +The compiler produces the artifacts under `output/compiled_model/` (see the SDK "Model Formats" documentation for what each file is). Give the compiled model to the detector through `model.path` (URL or local path) and set `model.width`/`model.height` to the model input size. Models from the SDK model zoo can also be built with the SDK CLI, e.g. `axzoo build yolox_s_coco --backend axrelay --cal-source repr`. To use a custom model in Frigate, configure [hardware object detection](/configuration/object_detectors#axelera-metis) and point `model.path` at your compiled model or its URL. diff --git a/frigate/detectors/plugins/axelera.py b/frigate/detectors/plugins/axelera.py index 9230bd4b35..7d438818c3 100644 --- a/frigate/detectors/plugins/axelera.py +++ b/frigate/detectors/plugins/axelera.py @@ -16,10 +16,9 @@ model compilation across frames. Model configuration follows the hardware-backend convention: - `model.path` = URL (downloaded to the model cache) | local file path | SDK - model-zoo preset name (e.g. ``yolov8n-coco``). When omitted, the compiled - default model is downloaded from ``AX_DEFAULT_URL`` (Hugging Face) on first - startup and cached; use ``model.path: yolov8n-coco`` to select the SDK - model-zoo preset instead (no download). + model-zoo preset name (e.g. ``yolox-s-coco``). When omitted, the SDK + model-zoo preset ``AX_DEFAULT_NETWORK`` (YOLOX, Apache-2.0 licensed) is + used; use `model.path: yolox-s-coco` to select it explicitly. - `model.labelmap_path` / `model.labelmap`: labels are mapped to class ids BY NAME via the merged labelmap, independent of label ordering. - `model.width` / `model.height`: input frame dimensions for the network. @@ -45,11 +44,13 @@ logger = logging.getLogger(__name__) DETECTOR_KEY = "axelera" # Default SDK model-zoo preset used when no `model.path` is given. -AX_DEFAULT_NETWORK = "yolov8n-coco" +# YOLOX (Megvii) is Apache-2.0 licensed; Ultralytics YOLO models are AGPL-3.0 +# and cannot be referenced by Frigate (MIT), see blakeblackshear/frigate#10717. +AX_DEFAULT_NETWORK = "yolox-s-coco" -# Default download URL for the compiled default model, hosted on Hugging Face. -# When empty the SDK model-zoo preset AX_DEFAULT_NETWORK is used instead. -AX_DEFAULT_URL = "https://huggingface.co/patrykorwat/metis-yolov8n-coco/resolve/main/yolov8n-coco.axm" +# Optional download URL for a compiled default model. When empty the SDK +# model-zoo preset AX_DEFAULT_NETWORK is used instead (no download needed). +AX_DEFAULT_URL = "" INFERENCE_TIMEOUT = 5.0 MAX_ROWS = 20