Metadata-Version: 2.4
Name: libreyolo
Version: 1.1.1
Summary: Libre YOLO - An open source YOLO library with MIT license.
Author: LibreYOLO Team
License: MIT
Project-URL: Homepage, https://github.com/LibreYOLO
Project-URL: Repository, https://github.com/LibreYOLO/libreyolo
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.19.0
Requires-Dist: Pillow>=8.0.0
Requires-Dist: torch>=1.13.0
Requires-Dist: torchvision>=0.11.0
Requires-Dist: PyYAML>=6.0
Requires-Dist: requests>=2.25.0
Requires-Dist: opencv-python>=4.11.0.86
Requires-Dist: tqdm>=4.65.0
Requires-Dist: pycocotools>=2.0.0
Requires-Dist: typer>=0.9.0
Provides-Extra: onnx
Requires-Dist: onnx>=1.14.0; extra == "onnx"
Requires-Dist: onnxsim>=0.4.0; extra == "onnx"
Requires-Dist: onnxruntime>=1.16.0; extra == "onnx"
Provides-Extra: rfdetr
Requires-Dist: rfdetr<2.0.0,>=1.6.2; extra == "rfdetr"
Provides-Extra: tensorrt
Requires-Dist: tensorrt-cu12; extra == "tensorrt"
Requires-Dist: pycuda>=2022.1; extra == "tensorrt"
Provides-Extra: openvino
Requires-Dist: openvino>=2024.0.0; extra == "openvino"
Provides-Extra: ncnn
Requires-Dist: pnnx; extra == "ncnn"
Requires-Dist: ncnn; extra == "ncnn"
Provides-Extra: tracking
Requires-Dist: scipy>=1.7.0; extra == "tracking"
Provides-Extra: rtdetr
Requires-Dist: scipy>=1.7.0; extra == "rtdetr"
Provides-Extra: all
Requires-Dist: libreyolo[onnx]; extra == "all"
Requires-Dist: libreyolo[rfdetr]; extra == "all"
Requires-Dist: libreyolo[tensorrt]; extra == "all"
Requires-Dist: libreyolo[openvino]; extra == "all"
Requires-Dist: libreyolo[ncnn]; extra == "all"
Requires-Dist: libreyolo[tracking]; extra == "all"
Requires-Dist: libreyolo[rtdetr]; extra == "all"
Dynamic: license-file

# LibreYOLO

[![Documentation](https://img.shields.io/badge/docs-libreyolo.com-blue)](https://www.libreyolo.com/docs)
[![PyPI](https://img.shields.io/pypi/v/libreyolo)](https://pypi.org/project/libreyolo/)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

MIT-licensed object detection library with training and inference support across YOLOv9 (`t`, `s`, `m`, `c`), YOLOX (`n`, `t`, `s`, `m`, `l`, `x`), YOLO-NAS (`s`, `m`, `l`), RF-DETR (`n`, `s`, `m`, `l`), and D-FINE (`n`, `s`, `m`, `l`, `x`).

![LibreYOLO Detection Example](libreyolo/assets/parkour_result.jpg)

## Installation

```bash
pip install libreyolo
```

For optional runtime and export dependencies such as ONNX Runtime, OpenVINO, TensorRT, NCNN, and RF-DETR, see the full docs.

## Inference Backend and Export Support

### Format Status

| Format | Export | Runtime backend | Status | Precision | Notes |
|--------|--------|-----------------|--------|-----------|-------|
| ONNX | Yes | ONNX Runtime | Supported | FP32, FP16 | Release-blocking export path and the broadest tested runtime target. |
| TorchScript | Yes | PyTorch JIT | Experimental | FP32, FP16 | Useful compatibility target, but not a release gate. |
| TensorRT (`tensorrt` / `trt`) | Yes | TensorRT | Experimental | FP32, FP16, INT8 | CUDA-only path. INT8 requires calibration data. |
| OpenVINO | Yes | OpenVINO | Experimental | FP32, FP16, INT8 | Runtime-specific path with CPU-oriented deployment coverage. |
| NCNN | Yes | NCNN | Experimental | FP32, FP16 | Highest maintenance overhead today. No INT8 path, and some DETR-family models are not supported. |

The e2e suite mirrors this policy with pytest markers: `supported_backend` for ONNX and `experimental_backend` for the other export backends.

### Model Family Matrix

`✓` supported, `~` supported with caveats, `—` intentionally unsupported

| Model family | ONNX | TorchScript | TensorRT | OpenVINO | NCNN |
|--------------|------|-------------|----------|----------|------|
| YOLOX | ✓ | ✓ | ✓ | ✓ | ✓ |
| YOLOv9 | ✓ | ✓ | ✓ | ✓ | ✓ |
| YOLO-NAS | ✓ | ✓ | ✓ | ✓ | ✓ |
| RF-DETR | ✓ | ~ | ✓ | ✓ | ~ |
| D-FINE | ✓ | ✓ | ✓ | ✓ | — |
| RT-DETR | ✓ | ✓ | ✓ | ✓ | — |

Notes:
- RF-DETR TorchScript export exists, but tracing can still be brittle on some checkpoints and shapes.
- NCNN is intentionally blocked for D-FINE and RT-DETR because the runtime lacks required DETR query-selection ops.
- RF-DETR on NCNN is not blocked at export time, but current e2e coverage still tracks known runtime limitations.

## Quick Start

```python
from libreyolo import LibreYOLO, SAMPLE_IMAGE

# Auto-detect family and size from the checkpoint name
model = LibreYOLO("LibreYOLOXs.pt")
result = model(SAMPLE_IMAGE, save=True)

print(f"Detected {len(result)} objects")
print(result.boxes.xyxy)
print(result.saved_path)
```

## Documentation

Full documentation at [libreyolo.com/docs](https://www.libreyolo.com/docs).

## License

- **Code:** MIT License
- **Weights:** Pre-trained weights may inherit licensing from the original source
