Metadata-Version: 2.4
Name: libreyolo
Version: 1.6.0
Summary: MIT-licensed computer vision library: one Python API for YOLO, RF-DETR, RT-DETR and dozens more model families, with training and export where a family supports them.
Author: LibreYOLO Team
License-Expression: MIT
Project-URL: Homepage, https://www.libreyolo.com
Project-URL: Documentation, https://www.libreyolo.com/docs
Project-URL: Repository, https://github.com/LibreYOLO/libreyolo
Project-URL: Issues, https://github.com/LibreYOLO/libreyolo/issues
Project-URL: Changelog, https://www.libreyolo.com/docs/changelog
Keywords: yolo,object-detection,computer-vision,pytorch,deep-learning,instance-segmentation,pose-estimation,rf-detr,rt-detr,yolov9,yolox,onnx,mit-license
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
License-File: THIRD_PARTY_NOTICES.txt
License-File: weights/LICENSE_NOTICE.txt
License-File: licenses/Apache-2.0.txt
Requires-Dist: numpy>=1.19.0
Requires-Dist: Pillow>=9.1.0
Requires-Dist: torch>=2.4.0
Requires-Dist: torchvision>=0.19.0
Requires-Dist: PyYAML>=6.0
Requires-Dist: requests>=2.25.0
Requires-Dist: opencv-python>=4.11.0.86
Requires-Dist: mss>=9.0.1
Requires-Dist: tqdm>=4.65.0
Requires-Dist: pycocotools>=2.0.0
Requires-Dist: typer>=0.9.0
Requires-Dist: click>=8.0.0
Requires-Dist: safetensors>=0.4.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: cloudpickle>=3.0.0
Provides-Extra: marigold
Requires-Dist: diffusers==0.38.0; extra == "marigold"
Requires-Dist: peft==0.18.1; extra == "marigold"
Requires-Dist: accelerate==1.13.0; extra == "marigold"
Requires-Dist: transformers==5.4.0; extra == "marigold"
Requires-Dist: bitsandbytes==0.49.2; (platform_system == "Linux" or platform_system == "Windows") and extra == "marigold"
Provides-Extra: stream
Requires-Dist: yt-dlp; extra == "stream"
Provides-Extra: onnx
Requires-Dist: onnx>=1.14.0; extra == "onnx"
Requires-Dist: onnxsim>=0.4.0; extra == "onnx"
Requires-Dist: onnxruntime>=1.18.0; extra == "onnx"
Provides-Extra: triton
Requires-Dist: tritonclient[http]>=2.40.0; extra == "triton"
Provides-Extra: executorch
Requires-Dist: executorch; extra == "executorch"
Provides-Extra: coreai
Requires-Dist: coreai-torch>=0.4.1; sys_platform == "darwin" and extra == "coreai"
Provides-Extra: rfdetr
Requires-Dist: transformers>=5.1.0; extra == "rfdetr"
Provides-Extra: eomt
Requires-Dist: transformers>=5.1.0; extra == "eomt"
Provides-Extra: midas
Requires-Dist: timm<1.1,>=1.0.28; extra == "midas"
Provides-Extra: lora
Requires-Dist: libreyolo[rfdetr]; extra == "lora"
Requires-Dist: peft>=0.12.0; extra == "lora"
Provides-Extra: plots
Requires-Dist: matplotlib>=3.7.0; extra == "plots"
Provides-Extra: fast-eval
Requires-Dist: faster-coco-eval>=1.7.0; extra == "fast-eval"
Provides-Extra: vla
Requires-Dist: lerobot[dataset,diffusion,smolvla]>=0.6.1; python_version >= "3.12" and extra == "vla"
Provides-Extra: llm
Requires-Dist: openai>=1.66.0; extra == "llm"
Provides-Extra: ground
Requires-Dist: libreyolo[vlm]; extra == "ground"
Provides-Extra: molmo2
Requires-Dist: transformers==4.57.1; extra == "molmo2"
Requires-Dist: einops>=0.8.0; extra == "molmo2"
Requires-Dist: accelerate>=0.26.0; extra == "molmo2"
Provides-Extra: vlm
Requires-Dist: transformers>=5.1.0; extra == "vlm"
Requires-Dist: num2words>=0.5.0; extra == "vlm"
Requires-Dist: decord==0.6.0; extra == "vlm"
Requires-Dist: lmdb>=1.7.0; extra == "vlm"
Requires-Dist: peft>=0.12.0; extra == "vlm"
Provides-Extra: vlm-train
Requires-Dist: libreyolo[vlm]; extra == "vlm-train"
Requires-Dist: peft>=0.17.0; extra == "vlm-train"
Provides-Extra: sam
Requires-Dist: transformers>=5.3.0; extra == "sam"
Requires-Dist: timm>=1.0.23; extra == "sam"
Provides-Extra: hub-kernels
Requires-Dist: kernels>=0.6.0; extra == "hub-kernels"
Provides-Extra: openvocab
Requires-Dist: transformers>=5.1.0; extra == "openvocab"
Requires-Dist: timm>=1.0.0; extra == "openvocab"
Requires-Dist: regex>=2023.0.0; extra == "openvocab"
Requires-Dist: ftfy>=6.0.0; extra == "openvocab"
Provides-Extra: sensenova
Requires-Dist: transformers>=5.1.0; extra == "sensenova"
Requires-Dist: accelerate>=1.7.0; extra == "sensenova"
Requires-Dist: bitsandbytes>=0.45.0; sys_platform != "darwin" and extra == "sensenova"
Provides-Extra: modus
Requires-Dist: transformers>=5.1.0; extra == "modus"
Requires-Dist: accelerate>=1.7.0; extra == "modus"
Provides-Extra: label
Requires-Dist: libreyolo[sam]; extra == "label"
Provides-Extra: tensorrt
Requires-Dist: tensorrt-cu12==10.16.1.11; sys_platform != "darwin" and extra == "tensorrt"
Requires-Dist: pycuda>=2022.1; sys_platform != "darwin" and extra == "tensorrt"
Provides-Extra: openvino
Requires-Dist: openvino>=2024.0.0; extra == "openvino"
Provides-Extra: paddle
Requires-Dist: libreyolo[onnx]; extra == "paddle"
Requires-Dist: onnx<1.18,>=1.14.0; extra == "paddle"
Requires-Dist: paddlepaddle==2.6.2; extra == "paddle"
Requires-Dist: x2paddle==1.6.0; extra == "paddle"
Requires-Dist: six>=1.16.0; extra == "paddle"
Provides-Extra: mnn
Requires-Dist: libreyolo[onnx]; extra == "mnn"
Requires-Dist: MNN>=3.6.1; extra == "mnn"
Provides-Extra: ncnn
Requires-Dist: pnnx; extra == "ncnn"
Requires-Dist: ncnn; extra == "ncnn"
Provides-Extra: tflite
Requires-Dist: libreyolo[onnx]; extra == "tflite"
Requires-Dist: onnx2tf>=2.4.3; python_version >= "3.12" and extra == "tflite"
Requires-Dist: ai-edge-litert>=2.1.2; python_version >= "3.12" and extra == "tflite"
Requires-Dist: onnx-graphsurgeon>=0.3.27; extra == "tflite"
Requires-Dist: onnx-simplifier>=0.4.36; extra == "tflite"
Provides-Extra: litert
Requires-Dist: libreyolo[tflite]; extra == "litert"
Provides-Extra: tracking
Provides-Extra: rtdetr
Provides-Extra: gaze
Requires-Dist: gdown>=5.1.0; extra == "gaze"
Provides-Extra: clip
Requires-Dist: regex>=2023.0.0; extra == "clip"
Requires-Dist: ftfy>=6.0.0; extra == "clip"
Provides-Extra: clip-convert
Requires-Dist: libreyolo[clip]; extra == "clip-convert"
Requires-Dist: open_clip_torch>=2.24.0; extra == "clip-convert"
Provides-Extra: siglip2
Requires-Dist: sentencepiece>=0.1.99; extra == "siglip2"
Provides-Extra: siglip2-convert
Requires-Dist: libreyolo[siglip2]; extra == "siglip2-convert"
Requires-Dist: transformers>=5.1.0; extra == "siglip2-convert"
Provides-Extra: coreml
Requires-Dist: coremltools>=8.0; extra == "coreml"
Provides-Extra: fiftyone
Requires-Dist: fiftyone>=1.0.0; extra == "fiftyone"
Requires-Dist: graphql-core<3.3; extra == "fiftyone"
Provides-Extra: tensorboard
Requires-Dist: tensorboard>=2.13.0; extra == "tensorboard"
Provides-Extra: mlflow
Requires-Dist: mlflow>=2.9.0; extra == "mlflow"
Provides-Extra: wandb
Requires-Dist: wandb>=0.16.0; extra == "wandb"
Provides-Extra: comet
Requires-Dist: comet-ml>=3.47.1; extra == "comet"
Provides-Extra: clearml
Requires-Dist: clearml>=1.17.0; extra == "clearml"
Provides-Extra: neptune
Requires-Dist: neptune-scale>=0.30.0; extra == "neptune"
Provides-Extra: dvclive
Requires-Dist: dvclive>=3.49.0; extra == "dvclive"
Provides-Extra: dvc
Requires-Dist: libreyolo[dvclive]; extra == "dvc"
Provides-Extra: hf
Requires-Dist: huggingface_hub>=1.0.0; extra == "hf"
Provides-Extra: all
Requires-Dist: libreyolo[stream]; extra == "all"
Requires-Dist: libreyolo[onnx]; extra == "all"
Requires-Dist: libreyolo[triton]; extra == "all"
Requires-Dist: libreyolo[rfdetr]; extra == "all"
Requires-Dist: libreyolo[eomt]; extra == "all"
Requires-Dist: libreyolo[midas]; extra == "all"
Requires-Dist: libreyolo[lora]; extra == "all"
Requires-Dist: libreyolo[plots]; extra == "all"
Requires-Dist: libreyolo[tensorrt]; extra == "all"
Requires-Dist: libreyolo[tflite]; extra == "all"
Requires-Dist: libreyolo[openvino]; extra == "all"
Requires-Dist: libreyolo[paddle]; extra == "all"
Requires-Dist: libreyolo[mnn]; extra == "all"
Requires-Dist: libreyolo[ncnn]; extra == "all"
Requires-Dist: libreyolo[tracking]; extra == "all"
Requires-Dist: libreyolo[rtdetr]; extra == "all"
Requires-Dist: libreyolo[gaze]; extra == "all"
Requires-Dist: libreyolo[clip]; extra == "all"
Requires-Dist: libreyolo[siglip2]; extra == "all"
Requires-Dist: libreyolo[coreml]; extra == "all"
Requires-Dist: libreyolo[vlm]; extra == "all"
Requires-Dist: libreyolo[llm]; extra == "all"
Requires-Dist: libreyolo[sam]; extra == "all"
Requires-Dist: libreyolo[label]; extra == "all"
Requires-Dist: libreyolo[openvocab]; extra == "all"
Requires-Dist: libreyolo[sensenova]; extra == "all"
Requires-Dist: libreyolo[modus]; extra == "all"
Requires-Dist: libreyolo[tensorboard]; extra == "all"
Requires-Dist: libreyolo[mlflow]; extra == "all"
Requires-Dist: libreyolo[wandb]; extra == "all"
Requires-Dist: libreyolo[comet]; extra == "all"
Requires-Dist: libreyolo[clearml]; extra == "all"
Requires-Dist: libreyolo[dvclive]; extra == "all"
Requires-Dist: libreyolo[hf]; extra == "all"
Dynamic: license-file

# LibreYOLO

[English](README.md) | [简体中文](README.zh-CN.md)

> ⭐ **Support LibreYOLO.** The best way to help is to **star the repo**. Feel free to [open an issue](https://github.com/LibreYOLO/libreyolo/issues/new) if you encounter problems or have suggestions, and code contributions are very welcome (see [CONTRIBUTING.md](CONTRIBUTING.md)). If you want to contribute economically, that is very welcome: see the [sponsorship program](SPONSORS.md).

[![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/)
[![PyPI Downloads](https://static.pepy.tech/badge/libreyolo)](https://pepy.tech/projects/libreyolo)
[![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-LibreYOLO-yellow)](https://huggingface.co/LibreYOLO)
[![Benchmarks](https://img.shields.io/badge/benchmarks-visionanalysis.org-purple)](https://www.visionanalysis.org/)
[![Greptile: The War on Bugs](https://www.greptile.com/badge.svg)](https://www.greptile.com/?utm_source=oss_badge&utm_medium=readme&utm_campaign=greptile_for_open_source)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-LibreYOLO-blue?logo=linkedin)](https://www.linkedin.com/company/libreyolo/)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

**An MIT-licensed computer vision library.** Detection, segmentation, pose,
depth, OCR and a dozen more tasks behind one small API, with training and
export included rather than sold separately. Reads common YOLO-format
datasets, so existing workflows port over with minimal changes.

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

## Install

```bash
pip install libreyolo
```

```python
from libreyolo import LibreYOLO, SAMPLE_IMAGE

model = LibreYOLO("LibreYOLO9t.pt")
result = model(SAMPLE_IMAGE, save=True)
```

<details>
<summary><b>Optional extras</b></summary>

<br>

The base install covers YOLOv9 and the other core detectors, training, and
inference. Add an extra when you need a heavier family or an export backend.
Comma-separate to combine, for example `pip install "libreyolo[rfdetr,hub-kernels]"`.

| Group | Extras |
| --- | --- |
| Export | `onnx`, `tensorrt`, `openvino`, `coreml`, `coreai`, `tflite` (alias `litert`), `ncnn`, `mnn`, `paddle`, `executorch` |
| Serving | `triton` |
| Models | `rfdetr`, `vlm`, `sam`, `openvocab`, `clip`, `siglip2`, `eomt`, `midas`, `modus`, `sensenova`, `gaze` |
| Training | `lora`, `plots`, `tensorboard`, `mlflow`, `wandb`, `comet`, `clearml`, `neptune`, `dvclive` |
| Speed | `fast-eval`, `hub-kernels` |
| Sources | `stream` |
| Everything | `pip install "libreyolo[all]"` |

`executorch`, `coreai` and `neptune` are deliberately left out of `all`: they
pin torch or protobuf in ways that would drag the rest of the environment with
them. Full list and per-backend notes in the
[install guide](https://www.libreyolo.com/docs/install).

</details>

<details>
<summary><b>Install from source</b></summary>

<br>

```bash
git clone https://github.com/LibreYOLO/libreyolo.git
cd libreyolo
pip install -e .
```

A plain clone checks out `release`, the stable branch matching the published
package. For unreleased work, `git checkout dev`.

</details>

## One API, twenty tasks

The same three lines run every task. Only the checkpoint changes.

```python
from libreyolo import LibreYOLO

LibreYOLO("LibreYOLO9t.pt")("street.jpg", save=True)             # detection
LibreYOLO("LibreDeepLabv3mv3-sem.pt")("street.jpg", save=True)   # semantic segmentation
LibreYOLO("LibreHRNetw32-pose.pt")("street.jpg", save=True)      # pose
LibreYOLO("LibreMiDaSs-depth.pt")("street.jpg", save=True)       # depth
LibreYOLO("LibreFeyNobgl-matte.pt")("portrait.jpg", save=True)   # background removal
LibreYOLO("LibreRTDETRv2n-obb.pt")("aerial.jpg", save=True)      # oriented boxes
```

Sources are not just files. Point it at a webcam, an RTSP stream, a video, a
directory, a YouTube URL or your screen:

```bash
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 capture
```

## What ships

| Task | Models |
| --- | --- |
| **Detection** | YOLOv9, RF-DETR, YOLOX, YOLO-NAS, D-FINE, DEIM, RT-DETR v1/v2/v4, RTMDet, PicoDet, PP-YOLOE, YOLOv7, EfficientDet, and the classics: DETR, Deformable DETR, DINO-DETR, LW-DETR, Faster R-CNN, RetinaNet, SSD, FCOS, CenterNet |
| **Tiny objects** | TinyFormer, Dome-DETR (aerial, drone, remote sensing) |
| **Instance segmentation** | RF-DETR, RTMDet, D-FINE, Mask R-CNN |
| **Promptable segmentation** | SAM, SAM 2, SAM 3, MobileSAM, EdgeTAM, PicoSAM3 |
| **Semantic segmentation** | SegFormer, PIDNet, PP-LiteSeg, U-Net, DeepLabv3, FCN, LingBot-Vision, DINOv2, EoMT |
| **Panoptic segmentation** | EoMT |
| **Pose** | RF-DETR, YOLO-NAS, HRNet, DEKR, EC |
| **Oriented boxes** | RF-DETR, RT-DETRv2, YOLO-NAS-R |
| **3D detection** | WildDet3D, 3D-MOOD, FCOS3D, DetAny3D (separate runtime) |
| **Classification** | MobileNetV4, ConvNeXt, EfficientNetV2, ResNet, ViT, Swin, DeiT, VGG, AlexNet, CLIP, SigLIP2, DINOv2 |
| **Depth** | Depth Anything 3, Depth Anything V2, ZipDepth, MiDaS |
| **Surface normals** | MoGe-2 |
| **Depth, normals and albedo** | Marigold V2 |
| **Edges** | DexiNed, TEED |
| **Embeddings** | LibreFaceEmbedder, CLIP, SigLIP2, Perception Encoder (image, text, whole-video; also zero-shot classify), DINOv2 |
| **Video embeddings** | V-JEPA 2 (clip embedding and trainable classification probe), LeVJEPA (clip and patch embeddings; CC BY-NC 4.0 weights) |
| **Body mesh** | SAM 3D Body |
| **Restoration** | DDColor, HVI-CIDNet, LaMa, NAFNet, QuickSRNet, Real-ESRGAN, SwinIR |
| **Background removal** | BiRefNet, FeyNobg, BEN2, ViTMatte |
| **OCR** | PP-OCR |
| **Point detection** | FOMO, LocateAnything |
| **Gaze** | L2CS |
| **Open vocabulary and VLMs** | Grounding DINO, OWLv2, OmDet-Turbo, OV-DEIM, Florence-2, Kosmos-2, Qwen3-VL, InternVL3, LFM2-VL, North Micro Vision, SmolVLM2, Gemma 4, Moondream, Molmo2, MODUS |
| **Robot actions (VLA)** | SmolVLA, ACT, Diffusion Policy |

Per-family sizes, checkpoints and parity evidence live in the
[model reference](https://www.libreyolo.com/docs/models).

## Train

```python
from libreyolo import LibreYOLO

model = LibreYOLO("LibreYOLO9t.pt")
model.train(data="dataset.yaml", epochs=100, imgsz=640)
```

```bash
libreyolo train --model yolo9-t --data dataset.yaml --epochs 100
```

Multi-GPU, LoRA, layer freezing, distillation, from-scratch training, and
TensorBoard, MLflow, Weights & Biases, Comet, ClearML, Neptune and DVCLive
logging are all supported. See the
[training guide](https://www.libreyolo.com/docs/train).

## Export and deploy

Twelve formats: ONNX, TorchScript, TensorRT, OpenVINO, CoreML, Core AI, TFLite
(LiteRT), NCNN, MNN, RKNN, Paddle and ExecuTorch. Plus NVIDIA Triton serving
and DeepStream config generation.

```bash
libreyolo export --model yolo9-t --format onnx
```

Support varies by family and task, see the
[export matrix](https://www.libreyolo.com/docs/reference/export-matrix).

## Documentation

- [Docs](https://www.libreyolo.com/docs) covers install, tasks, models, training, prediction, export and the CLI
- [Benchmarks](https://www.visionanalysis.org/) for independent numbers
- [CHANGELOG.md](CHANGELOG.md) for what changed

## Sponsors

The code is written in free time. Training new models, such as LibreYOLO26
and MIT retrains of families with restrictive weights, costs rented GPU time,
and the [LibreYOLO Sponsorship Program](SPONSORS.md) pays for it. Companies
get their logo here from $100 a month, and from $500 a month are named in
every release and in the model card of every weight released while they
sponsor. Hardware manufacturers can sponsor by sending a device.

[![Sponsor](https://img.shields.io/badge/sponsor-Open%20Collective-7fadf2?logo=opencollective)](https://opencollective.com/libreyolo)

No sponsors yet.

## License

- **Code:** MIT License.
- **Weights:** pre-trained weights may inherit licensing from their original
  source, and not all of them are permissive. Check the license on the
  specific Hugging Face repo before you use one commercially. Every LibreYOLO
  Hugging Face model states its license.
