Libre YOLO - An open source YOLO library with MIT license.
Project description
LibreYOLO
⭐ 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
pip install libreyolo covers most users. It comes with the YOLOv9 flagship
and the other detection models, plus training and inference. Now and then you'll
add an extra: for a model family with a heavier dependency (for example RF-DETR,
which needs the large transformers library), or for an export backend when you
need to export a model:
pip install libreyolo
# Add an extra in brackets when you need one (comma-separate to combine),
# e.g. pip install "libreyolo[rfdetr,onnx]":
# export: onnx, tensorrt, openvino, ncnn, tflite, coreml
# models: rfdetr, vlm, sam, openvocab, clip, gaze
# training: lora, plots, tensorboard, mlflow, wandb
# or all: pip install "libreyolo[all]"
from libreyolo import LibreYOLO, SAMPLE_IMAGE
model = LibreYOLO("LibreYOLO9t.pt")
result = model(SAMPLE_IMAGE, save=True)
Image classification works the same way. Load a pretrained ImageNet-1k
classifier (MobileNetV4, ConvNeXt, EfficientNetV2, or ResNet), then
predict or fine-tune on your own folder-per-class dataset:
from libreyolo import LibreYOLO
model = LibreYOLO("LibreResNet50-cls.pt") # weights auto-download on first use
result = model("image.jpg") # a single image -> one Results
print(result.probs.top1, float(result.probs.top1conf)) # class index + confidence
print(result.probs.top5) # indices of the 5 most likely classes
# Fine-tune on an ImageFolder dataset (train/ and val/, one sub-folder per
# class). The classifier head resizes to your class count automatically.
model.train(data="path/to/dataset", epochs=5)
For the full list of extras and per-backend notes, see the docs.
To install from source in editable mode (for development or to track unreleased changes):
git clone https://github.com/LibreYOLO/libreyolo.git
cd libreyolo
pip install -e .
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.
Compatibility
✓ supported, exp experimental. Empty cells are not currently supported.
All trainable families in the Training column accept universal training
hooks via callbacks= and built-in experiment loggers via loggers=
(tensorboard, mlflow, wandb).
| Model family | Inference | Training | Export formats | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Detection | Segmentation | Semantic | Classification | Pose | OBB | Gaze | ONNX | TorchScript | TensorRT | OpenVINO | NCNN | TFLite | ||
| ⭐ YOLOv9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| ⭐ RF-DETR | ✓ | ✓ | exp | exp | exp | exp | ✓ | ✓ | ✓ | ✓ | ✓ | exp | ||
| YOLOX | ✓ | exp | exp | exp | exp | exp | exp | |||||||
| YOLOv9-E2E | ✓ | exp | exp | exp | exp | |||||||||
| YOLOv9-P2 | ✓ | ✓ | exp | |||||||||||
| YOLO-NAS | ✓ | ✓ | exp | exp | exp | exp | exp | exp | ||||||
| D-FINE | ✓ | exp | exp | exp | exp | exp | ||||||||
| DEIM | ✓ | exp | exp | exp | exp | exp | ||||||||
| DEIMv2 | ✓ | exp | exp | exp | exp | exp | ||||||||
| RT-DETR | ✓ | exp | exp | exp | exp | exp | ||||||||
| RT-DETRv2 | ✓ | exp | ||||||||||||
| RT-DETRv4 | ✓ | exp | ||||||||||||
| PicoDet | ✓ | exp | exp | exp | ||||||||||
| RTMDet | ✓ | exp | ||||||||||||
| EC | ✓ | ✓ | ✓ | exp | ||||||||||
| MobileNetV4 | ✓ | ✓ | ✓ | |||||||||||
| ConvNeXt | ✓ | ✓ | ✓ | |||||||||||
| EfficientNetV2 | ✓ | ✓ | ✓ | |||||||||||
| ResNet | ✓ | ✓ | ✓ | |||||||||||
| L2CS | ✓ |
YOLOv9-P2 is a small-object variant of YOLOv9 with an extra stride-4 detection
scale, built for aerial/tiny-object imagery where objects fall below ~16 px
(on regular datasets like COCO, prefer stock YOLOv9). A VisDrone-trained
research preview is available as
LibreYOLO9P2s-visdrone.pt
(non-commercial license); train your own with
LibreYOLO9P2(None, size="s").train(..., pretrained="LibreYOLO9s.pt").
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libreyolo-1.3.1.tar.gz.
File metadata
- Download URL: libreyolo-1.3.1.tar.gz
- Upload date:
- Size: 3.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5463e2f973de8059eb629d5b275cad65e5a35008425095175ecbffab1c9759f4
|
|
| MD5 |
30656c8e4a625e3ac417ac4d96429603
|
|
| BLAKE2b-256 |
351482d92dc78c91b2f45d5ddb30b71316701cd706fe2e4df62f9de07d8198a7
|
Provenance
The following attestation bundles were made for libreyolo-1.3.1.tar.gz:
Publisher:
publish.yml on LibreYOLO/libreyolo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libreyolo-1.3.1.tar.gz -
Subject digest:
5463e2f973de8059eb629d5b275cad65e5a35008425095175ecbffab1c9759f4 - Sigstore transparency entry: 2083084274
- Sigstore integration time:
-
Permalink:
LibreYOLO/libreyolo@178c5411d1dfe3bcc3cc0443db93fcd737180b12 -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/LibreYOLO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@178c5411d1dfe3bcc3cc0443db93fcd737180b12 -
Trigger Event:
push
-
Statement type:
File details
Details for the file libreyolo-1.3.1-py3-none-any.whl.
File metadata
- Download URL: libreyolo-1.3.1-py3-none-any.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8ae3a57575395a69a80f2ec0e06977ccb2717e78e23796299c7d32369da18b9
|
|
| MD5 |
908e3d901b9cf54e9be212abac533960
|
|
| BLAKE2b-256 |
a702da97d9d6fd66a6f5b7829fde1a949039a8a5f46f05eb267c28a13c6cfdd2
|
Provenance
The following attestation bundles were made for libreyolo-1.3.1-py3-none-any.whl:
Publisher:
publish.yml on LibreYOLO/libreyolo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libreyolo-1.3.1-py3-none-any.whl -
Subject digest:
e8ae3a57575395a69a80f2ec0e06977ccb2717e78e23796299c7d32369da18b9 - Sigstore transparency entry: 2083084284
- Sigstore integration time:
-
Permalink:
LibreYOLO/libreyolo@178c5411d1dfe3bcc3cc0443db93fcd737180b12 -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/LibreYOLO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@178c5411d1dfe3bcc3cc0443db93fcd737180b12 -
Trigger Event:
push
-
Statement type: