⭐ Support LibreYOLO. The best way to help is to star the repo. Feel free to open an issue if you encounter problems or have suggestions, and code contributions are very welcome (see CONTRIBUTING.md).
MIT-licensed computer vision library with inference and training support for a variety of models. It provides a familiar high-level Python and CLI interface and reads common YOLO-format datasets, so existing workflows port over with minimal changes.
Installation & Quick start
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreYOLO9t.pt") result = model(SAMPLE_IMAGE, save=True)
Optional pip extras
The base install covers YOLOv9 and the other detection models, plus training
and inference. Add an extra in brackets when you need a heavier model family
(for example RF-DETR, which needs transformers) or an export backend.
Comma-separate to combine, e.g. pip install "libreyolo[rfdetr,onnx]":
| Group | Extras |
|---|---|
| Export | onnx, tensorrt, openvino, ncnn, tflite (alias: litert), coreml |
| Models | rfdetr, vlm, sam, openvocab, clip, gaze |
| Training | lora, plots, tensorboard, mlflow, wandb |
| Everything | pip install "libreyolo[all]" |
For the full list of extras and per-backend notes, see the docs.
To install from source (development, or to track unreleased changes):
git clone https://github.com/LibreYOLO/libreyolo.git cd libreyolo pip install -e .
A plain clone checks out release, the stable branch whose code matches these
docs. For the latest unreleased work, switch to the integration branch with
git checkout dev.
Flagship models
LibreYOLO recommends these model families because they offer the best balance and receive the heaviest testing:
- YOLOv9 for CNN-based YOLO models.
- RF-DETR for transformer-based detection and segmentation.
Detection models
LibreYOLO is a YOLO library first. The table below covers the main detection
families. ✓ supported. Empty cells are not currently supported.
| Model family | Inference | Training | Export formats | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Detection | Segmentation | Pose | ONNX | TorchScript | TensorRT | OpenVINO | NCNN | TFLite (LiteRT) | ||
| ⭐ YOLOv9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| ⭐ RF-DETR | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| YOLOX | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| YOLO-NAS | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| YOLOv9-E2E | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| YOLOv9-P2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| YOLOv7 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| D-FINE | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| DEIM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| DEIMv2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| RT-DETR | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| RT-DETRv2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| RT-DETRv4 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| EC | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| RTMDet | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| PicoDet | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
Beyond detection
The same three-line API covers a lot more than boxes: the checkpoint name selects the task. These families are extras on top of the core library.
All other tasks and their models
- Instance segmentation (promptable): SAM, SAM 2, SAM 3, MobileSAM, EdgeTAM, PicoSAM3, EoMT
- Semantic segmentation: SegFormer, PIDNet, EoMT, DINOv2
- Panoptic segmentation: EoMT
- Oriented boxes (OBB): RF-DETR
- Classification: ResNet, ConvNeXt, MobileNetV4, EfficientNetV2, DINOv2, CLIP, SigLIP2
- Point detection: FOMO, LocateAnything
- Depth estimation: Depth Anything 3, Depth Anything V2, ZipDepth
- Image restoration & super-resolution: NAFNet, Real-ESRGAN, SwinIR
- Background removal (matting): BiRefNet
- OCR: PP-OCR
- Gaze estimation: L2CS
- Open-vocabulary & VLM detection: Grounding DINO, OWLv2, OmDet-Turbo, OV-DEIM, Florence-2, Kosmos-2, Qwen3-VL, InternVL3, LFM2-VL, SmolVLM2, LocateAnything
License
- Code: MIT License
- Weights: Pre-trained weights may inherit licensing from the original source. Check the license in the specific HF repo of weights that you are interested in. LibreYOLO HF models always have a license.
