Metadata-Version: 2.1
Name: easy-rfdetr
Version: 0.1.0
Summary: YOLO-like API for RF-DETR real-time object detection
Author-email: easy-rfdetr <dev@example.com>
Project-URL: Homepage, https://github.com/boscochanam/easy-rfdetr
Project-URL: Documentation, https://easy-rfdetr.readthedocs.io
Project-URL: Repository, https://github.com/boscochanam/easy-rfdetr
Project-URL: Issues, https://github.com/boscochanam/easy-rfdetr/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch >=2.0.0
Requires-Dist: torchvision >=0.15.0
Requires-Dist: rfdetr >=1.0.0
Requires-Dist: opencv-python >=4.8.0
Requires-Dist: pillow >=10.0.0
Requires-Dist: numpy >=1.24.0
Requires-Dist: rich >=13.0.0
Requires-Dist: tqdm >=4.65.0
Requires-Dist: requests >=2.28.0
Requires-Dist: typer >=0.9.0
Provides-Extra: dev
Requires-Dist: pytest >=7.4.0 ; extra == 'dev'
Requires-Dist: pytest-cov >=4.1.0 ; extra == 'dev'
Requires-Dist: black >=23.0.0 ; extra == 'dev'
Requires-Dist: ruff >=0.1.0 ; extra == 'dev'
Provides-Extra: gradio
Requires-Dist: gradio >=4.0.0 ; extra == 'gradio'
Provides-Extra: youtube
Requires-Dist: yt-dlp >=2023.0.0 ; extra == 'youtube'

# easy-rfdetr

<p align="center">
  <img src="https://img.shields.io/pypi/v/easy-rfdetr" alt="PyPI Version">
  <img src="https://img.shields.io/pypi/dm/easy-rfdetr" alt="PyPI Downloads">
  <img src="https://img.shields.io/pypi/pyversions/easy-rfdetr" alt="Python Versions">
  <a href="https://colab.research.google.com/github/easy-rfdetr/easy-rfdetr/blob/main/examples/train.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab"></a>
</p>

## Train a Model

```python
from easy_rfdetr import RFDETR

model = RFDETR("medium")
model.train(data="my_dataset/", epochs=50)
```

## Run Inference

```python
model("image.jpg").show()
```

## Install

```bash
pip install easy-rfdetr
```

Drop-in replacement for `YOLO()` from ultralytics. Same API, transformer accuracy.

---

## Training

Drop your dataset in a folder. We auto-detect COCO or YOLO format:

```
dataset/
├── train/images/ + labels/
├── valid/images/ + labels/
└── test/images/ + labels/
```

Train:
```python
model.train(data="dataset/", epochs=50, batch=8)
```

Resume:
```python
model.train(data="dataset/", resume=True)
```

---

## Inference

```python
model = RFDETR("medium")  # nano, small, medium, large

# From file
model("photo.jpg").show()

# From URL
model("https://example.com/img.jpg")

# Batch
model(["a.jpg", "b.jpg"])

# Confidence threshold
model("img.jpg", threshold=0.8)

# Get boxes
r = model("img.jpg")
print(r.boxes)     # xyxy
print(r.scores)    # confidence
print(r.labels)    # ["person", "car", ...]

# Save
r.save("output.jpg")
```

---

## Web UI

```python
model.ui()
```

---

## CLI

```bash
rfdetr predict source=image.jpg
rfdetr train data=dataset/ epochs=50
```

---

## Requirements

- Python >= 3.10
- PyTorch >= 2.0.0
- CUDA or Apple Silicon (optional)

---

## License

Apache 2.0 - See [LICENSE](LICENSE)

---

Built on [RF-DETR](https://github.com/roboflow/rf-detr) by Roboflow.
