What is LibreYOLO?
LibreYOLO is an MIT-licensed computer vision library for Python. It sits in the Vision & Understanding category of the Multimodal Generation tools and is open-source, written in Python and licensed MIT (code); pre-trained weights keep their original licenses. To get started: install the package.
Overview
LibreYOLO is an MIT-licensed computer vision library for Python. It puts detection, instance and semantic segmentation, pose estimation, depth, OCR, background removal and a long list of other tasks behind one small API: you load a checkpoint with the LibreYOLO class and call it on an image, and only the checkpoint changes from task to task. The README counts twenty-two tasks.
Training and export are part of the library rather than a paid add-on. It reads common YOLO-format datasets, so existing training workflows port over with few changes, and it supports multi-GPU training, LoRA, layer freezing, distillation and logging to TensorBoard, MLflow, Weights & Biases and other trackers. Trained models export to twelve formats, including ONNX, TensorRT, OpenVINO, CoreML, TFLite (LiteRT), NCNN and ExecuTorch, plus NVIDIA Triton serving.
Beyond its own YOLOv9-based checkpoints, it wraps many model families — RF-DETR, YOLOX, RT-DETR, D-FINE, SAM 2 and SAM 3, Depth Anything, Grounding DINO, Florence-2 and several vision-language models among them. The code is MIT, but pre-trained weights keep the license of their original source, so the project tells you to check each Hugging Face model card before commercial use.
What it does
- One LibreYOLO class for detection, segmentation, pose, depth, OCR, background removal, embeddings and more — only the checkpoint changes
- Many model families behind the same API, including YOLOv9, RF-DETR, YOLOX, RT-DETR, D-FINE, SAM 2/3, Depth Anything and Grounding DINO
- Built-in training on YOLO-format datasets, with multi-GPU, LoRA, layer freezing, distillation and experiment-tracker logging
- Export to twelve formats including ONNX, TensorRT, OpenVINO, CoreML, TFLite, NCNN, MNN and ExecuTorch, plus Triton serving
- A libreyolo CLI that predicts from images, video, webcams, RTSP streams, YouTube URLs or the screen
- MIT-licensed code; optional pip extras pull in heavier model families and export backends only when needed
Getting started
Install the package from PyPI, run a pretrained detector in three lines of Python, then train on your own data and export the result.
Install the package
The base install covers YOLOv9 and the other core detectors, training and inference. Add extras such as onnx or rfdetr when you need a heavier family or an export backend.
pip install libreyolo
# optional extras, comma-separated
pip install "libreyolo[rfdetr,onnx]"Run a pretrained model
Load a checkpoint and call the model on an image. save=True writes the annotated result.
from libreyolo import LibreYOLO, SAMPLE_IMAGE
model = LibreYOLO("LibreYOLO9t.pt")
result = model(SAMPLE_IMAGE, save=True)
Predict on a live source from the CLI
Point the CLI at a webcam, a network camera or your screen instead of a file.
libreyolo predict --model yolo9-t --source 0 --show # webcam
libreyolo predict --model yolo9-t --source rtsp://camera/1 # network camera
libreyolo predict --model yolo9-t --source screen # screen captureTrain on your dataset
Train from Python or the CLI on a YOLO-format dataset.
from libreyolo import LibreYOLO
model = LibreYOLO("LibreYOLO9t.pt")
model.train(data="dataset.yaml", epochs=100, imgsz=640)Export for deployment
Export the model to ONNX (or another supported format) to run it outside PyTorch. Support varies by model family and task.
libreyolo export --model yolo9-t --format onnxCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Replacing an AGPL-licensed detection stack with MIT-licensed code in a commercial product
- Fine-tuning a detector or segmenter on an existing YOLO-format dataset
- Running several vision tasks — detection, depth, pose, background removal — from one dependency
- Exporting a trained model to TensorRT, CoreML, TFLite or ONNX for edge deployment
How LibreYOLO compares
LibreYOLO alongside other open-source vision & understanding tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| PaddleOCR | ★ 93k | A toolkit for detecting and recognizing text in images across many languages, plus document parsing. |
| OpenCV | ★ 91.7k | The long-standing open-source computer-vision library for C++, Python and Java; version 5 rewrote the DNN engine and added ONNX-based LLM and VLM inference in-library. |
| Ultralytics YOLO | ★ 63.6k | A framework for training and running YOLO models for real-time object detection, segmentation, and tracking. |
| YOLOv5 | ★ 58.3k | Ultralytics' PyTorch repo for training, running and exporting YOLOv5 object-detection, instance-segmentation and classification models with plain scripts and PyTorch Hub. |
| Supervision | ★ 51.7k | A Python toolkit for processing, annotating, and visualizing detections and segmentations from many vision models. |
| MediaPipe | ★ 37.8k | Google's on-device ML framework: ready-to-run vision, text and audio tasks with one cross-platform API for Android, iOS, web, desktop and edge. |
| MMDetection | ★ 33k | An OpenMMLab toolbox with many object detection and instance segmentation algorithms for research and production. |
| LibreYOLO | ★ 1.1k | MIT-licensed vision library: detection, segmentation, pose, depth and more behind one API |
