YOLO-NAS

A convolutional detector whose backbone and neck came out of Deci.AI's architecture search, built from quantization-aware RepVGG blocks. Its weights are Deci.AI's, licensed for non-commercial use only, and LibreYOLO publishes none of them.

Tasks
detection, pose
Sizes
s, m, l at 640 px
Install
pip install libreyolo
Support tier
Core, since v1.1.0. Core trainable detectors: features follow the flagships in the same release wave.
Upstream
YOLO-NAS by Deci.AI, Deci.AI proprietary, non-commercial. Paper, source
Licenses
Code Apache-2.0, weights Deci.AI proprietary, non-commercial. Commercial use

Install

YOLO-NAS needs no extra beyond the base package.

bash
pip install libreyolo

Predict

A checkpoint name that is not already on disk is fetched from Deci's public CDN, not from the LibreYOLO org, which hosts none of these weights. Before the transfer starts the library prints Deci's license terms once per process, and before the downloaded file is opened its SHA-256 is checked against a pinned value. What those terms allow is in licensing.

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE # A name not already on disk is fetched from Deci's CDN. The download# prints Deci's license terms first; taking the file accepts them.model = LibreYOLO("LibreYOLONASs.pt")result = model(SAMPLE_IMAGE, save=True) for box in result.boxes:    print(box.cls, box.conf, box.xyxy)
CLI
libreyolo predict model=LibreYOLONASs.pt save=True \  source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg
Pose
from libreyolo import LibreYOLO, SAMPLE_IMAGE # The -pose suffix picks the pose head and its own set of weights.model = LibreYOLO("LibreYOLONASs-pose.pt")result = model(SAMPLE_IMAGE) print(result.keypoints.xy)

The returned Results object is the one every family returns, so swapping in a different detector is a one line change. conf sets the confidence threshold and iou the NMS threshold. See prediction for sources, streaming and result handling.

Variants

Detection and pose are the same architecture under different heads, and they take the same arguments. The sizes in the table below are the detection ones; pose is published at those and at one smaller size. The pose head predicts the COCO keypoint set.

CheckpointInput (px)mAP 50-95Params (M)
LibreYOLONASl64056.366.98
LibreYOLONASm64055.451.18
LibreYOLONASs64051.819.05

COCO val2017, 500 images. Measured by the LibreYOLO benchmark harness and published on Vision Analysis, where latency across hardware and runtimes is compared and the full run records live.

Train

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreYOLONASs.pt")model.train(data="my-dataset.yaml", epochs=100, imgsz=640, batch=16)
CLI
libreyolo train model=LibreYOLONASs.pt data=my-dataset.yaml \  epochs=100 imgsz=640 batch=16
From scratch
from libreyolo import LibreYOLONAS # No Deci checkpoint is touched: the model starts from random weights,# so what comes out of the run derives only from your data.model = LibreYOLONAS(None, size="s")model.train(data="my-dataset.yaml", imgsz=640, batch=16)

epochs, lr0 and amp are resolved per task when you leave them out, so a pose run starts from different defaults than a detection run. The optimizer defaults to AdamW. The class count comes from the dataset YAML and the head is rebuilt for it before the first epoch; on the pose head the keypoint count is handled the same way, so a COCO pose checkpoint can be fine-tuned onto a skeleton of a different size.

Fine-tuning starts from Deci's weights, which is what Deci's license covers. Training from a randomly initialized model involves no Deci checkpoint at all, and that is the third snippet above.

See training for datasets, augmentation, multi-GPU and loggers.

Validate

val() returns a dictionary of metrics/ keys covering precision, recall, mAP 50 and mAP 50-95, measured against any dataset in the format you trained on.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreYOLONASs.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mAP50-95"])print(metrics["metrics/mAP50"])
CLI
libreyolo val model=LibreYOLONASs.pt data=my-dataset.yaml
Against COCO
# The bundled COCO yaml carries an embedded download script, so it# needs explicit permission unless the dataset is already local.libreyolo val model=LibreYOLONASl.pt data=coco.yaml imgsz=640 \  allow_download_scripts=True

Export

TaskONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
DetectionDetection to ONNX: supported. Detection to TorchScript: supported. Detection to ExecuTorch: supported. Detection to TensorRT: supported. Detection to OpenVINO: supported. Detection to Paddle: supported. Detection to MNN: supported. Detection to RKNN: supported. Detection to ncnn: supported. Detection to TFLite: supported. Detection to CoreML: not supportedDetection to Core AI: supported.
PosePose to ONNX: supported. Pose to TorchScript: supported. Pose to ExecuTorch: supported. Pose to TensorRT: supported. Pose to OpenVINO: supported. Pose to Paddle: supported. Pose to MNN: not supportedPose to RKNN: not supportedPose to ncnn: supported. Pose to TFLite: not supportedPose to CoreML: not supportedPose to Core AI: not supported

An exported artifact loads back through LibreYOLO() on its file suffix, so a .onnx or .engine file behaves like a checkpoint and returns the same Results. Running the graph in a bare runtime, with no LibreYOLO installed, is also supported, but then preprocessing and postprocessing are yours to write. Each format installs a different extra and takes a few arguments of its own. Both are on that format's page.

An export is another copy of the same weights in a different container. Exporting a Deci checkpoint changes neither where the weights came from nor the license that covers them.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreYOLONASs.pt")model.export(format="onnx", imgsz=640)
CLI
libreyolo export model=LibreYOLONASs.pt format=onnx imgsz=640
Use the exported file
from libreyolo import LibreYOLO, SAMPLE_IMAGE # The factory routes on the file suffix, so an exported artifact loads# like any checkpoint and returns the same Results object.model = LibreYOLO("LibreYOLONASs.onnx")result = model(SAMPLE_IMAGE) print(result.boxes.xyxy)

Checkpoints

There are none to list. Deci's license forbids redistribution, so the LibreYOLO org publishes no YOLO-NAS weights and the download resolves elsewhere: a name of the form LibreYOLONAS<size>.pt, or LibreYOLONAS<size>-pose.pt for pose, maps to the matching object on Deci's public CDN.

Only the checkpoints whose SHA-256 the library pins can be fetched that way. Anything else fails closed rather than opening an unverified third-party pickle, and has to be downloaded by hand and passed as a path. A file already on disk loads from its path, with no download and no checksum gate. That includes a Deci .pth under its original name, which the loader recognizes.

Licensing

Check the license on the Hugging Face repository of the specific weights you download. Every checkpoint in the LibreYOLO org carries one, and they are not always the same across a family. That repository is the authoritative source; the summary below describes what applied when this page was last verified.

This is a description of the licenses involved, not legal advice. If the answer matters commercially, read the licenses yourself and take your own counsel.

Original work
YOLO-NAS, Deci.AI
Upstream license
Deci.AI proprietary, non-commercial
LibreYOLO code
MIT
Weights
Deci.AI proprietary, non-commercial, distributed by their authors. LibreYOLO does not host or mirror them.
Interpretation
Two licenses apply here and they are not the same. The SuperGradients source this port follows is Apache-2.0 and LibreYOLO's own implementation is MIT, so nothing restricts the architecture or the training code. Deci's published checkpoints are a different matter: the YOLO-NAS license grants a revocable, non-transferable right to use them and nothing more. It forbids redistribution and sublicensing, forbids offering them as a managed or remote service, restricts modification and reverse engineering, and rules out commercial use, including any model running in a production environment, unless you hold a separate agreement with Deci. LibreYOLO therefore does not mirror them, and prints those terms once before the download starts. Weights trained from a randomly initialized model on your own data derive from no Deci checkpoint.

LibreYOLO neither hosts nor mirrors these weights: nothing for this family exists in the LibreYOLO Hugging Face org. Every auto-download goes to Deci's public CDN instead, prints Deci's terms once per process before it starts, and is checked against a pinned SHA-256 before the file is opened.

Training from a randomly initialized model is the alternative. The architecture is Apache-2.0 upstream and MIT here, so a model trained that way on your own data derives from no Deci checkpoint.

Citation

YOLO-NAS was released without a paper. The entry below is the one its authors ask for, covering SuperGradients, the library it shipped in.

@misc{supergradients,
  doi = {10.5281/ZENODO.7789328},
  url = {https://zenodo.org/record/7789328},
  author = {Aharon,  Shay and {Louis-Dupont} and {Ofri Masad} and Yurkova,  Kate and {Lotem Fridman} and {Lkdci} and Khvedchenya,  Eugene and Rubin,  Ran and Bagrov,  Natan and Tymchenko,  Borys and Keren,  Tomer and Zhilko,  Alexander and {Eran-Deci}},
  title = {Super-Gradients},
  publisher = {GitHub},
  journal = {GitHub repository},
  year = {2021},
}

Copied from the authors' citation block at github.com/Deci-AI/super-gradients#citing.

Verified against LibreYOLO v1.5.0. Support tables, checkpoints and benchmark numbers on this page are generated from the released library and the published weights, not written by hand.