Instructions to use uralman/yolo26l-widerface with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use uralman/yolo26l-widerface with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("uralman/yolo26l-widerface", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Rewrite model card for practical use
Browse files
README.md
CHANGED
|
@@ -10,87 +10,131 @@ tags:
|
|
| 10 |
- object-detection
|
| 11 |
- face-detection
|
| 12 |
- widerface
|
|
|
|
| 13 |
pipeline_tag: object-detection
|
| 14 |
---
|
| 15 |
|
| 16 |
-
# YOLO26l face detector (WiderFace
|
| 17 |
|
| 18 |
-
Single-class **face** detector
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
> Base
|
| 23 |
-
> Dataset: [WIDER FACE](http://shuoyang1213.me/WIDERFACE/)
|
| 24 |
|
| 25 |
-
##
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
|
| 32 |
## Quick start
|
| 33 |
|
| 34 |
```bash
|
| 35 |
-
pip install ultralytics
|
| 36 |
-
huggingface-cli download uralman/yolo26l-widerface best.pt --local-dir .
|
| 37 |
```
|
| 38 |
|
| 39 |
```python
|
|
|
|
| 40 |
from ultralytics import YOLO
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
```
|
| 45 |
|
| 46 |
-
Recommended
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
## Training
|
| 49 |
|
| 50 |
| Item | Value |
|
| 51 |
|------|-------|
|
| 52 |
-
| Base
|
| 53 |
-
|
|
| 54 |
-
|
|
| 55 |
-
|
|
| 56 |
-
|
|
| 57 |
-
| Batch | 8, AMP, `cache=ram` |
|
| 58 |
-
| Schedule | up to 200 epochs, patience 50, cosine LR |
|
| 59 |
-
| Augmentations | mosaic, multi-scale, Ultralytics detect defaults |
|
| 60 |
-
| Stopped at | epoch **73** (early stop; gains near plateau) |
|
| 61 |
|
| 62 |
-
##
|
| 63 |
-
|
| 64 |
-
Ultralytics built-in box metrics on the YOLO-formatted WIDER FACE validation split used for this run. Peak selected by **mAP50-95**:
|
| 65 |
|
| 66 |
-
|
|
| 67 |
-
|------
|
| 68 |
-
|
|
| 69 |
-
|
|
| 70 |
-
|
|
| 71 |
-
| mAP50-95 | 0.331 | **0.455** |
|
| 72 |
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
|
|
|
| 88 |
|
| 89 |
-
## Limitations
|
| 90 |
|
| 91 |
-
-
|
| 92 |
-
-
|
| 93 |
-
-
|
|
|
|
| 94 |
|
| 95 |
## Acknowledgements
|
| 96 |
|
|
|
|
| 10 |
- object-detection
|
| 11 |
- face-detection
|
| 12 |
- widerface
|
| 13 |
+
- onnx
|
| 14 |
pipeline_tag: object-detection
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# YOLO26l face detector (WiderFace)
|
| 18 |
|
| 19 |
+
Single-class **face** detector: [Ultralytics YOLO26l](https://docs.ultralytics.com/models/yolo26/) fine-tuned on [WIDER FACE](http://shuoyang1213.me/WIDERFACE/).
|
| 20 |
|
| 21 |
+
| | |
|
| 22 |
+
|---|---|
|
| 23 |
+
| Classes | `face` (`0`) |
|
| 24 |
+
| Params | ~24.7M (fused) |
|
| 25 |
+
| Weights | `best.pt` β 151 MB |
|
| 26 |
+
| Train size | 1280 |
|
| 27 |
+
| Ultralytics | 8.4.114+ (YOLO26) |
|
| 28 |
+
| License | AGPL-3.0 |
|
| 29 |
|
| 30 |
+
> Base: [YOLO26 docs](https://docs.ultralytics.com/models/yolo26/) Β· Dataset: [WIDER FACE](http://shuoyang1213.me/WIDERFACE/)
|
|
|
|
| 31 |
|
| 32 |
+
## Examples (val images)
|
| 33 |
|
| 34 |
+

|
| 35 |
+

|
| 36 |
+

|
| 37 |
+

|
| 38 |
|
| 39 |
## Quick start
|
| 40 |
|
| 41 |
```bash
|
| 42 |
+
pip install "ultralytics>=8.4.0" huggingface_hub
|
|
|
|
| 43 |
```
|
| 44 |
|
| 45 |
```python
|
| 46 |
+
from huggingface_hub import hf_hub_download
|
| 47 |
from ultralytics import YOLO
|
| 48 |
|
| 49 |
+
weights = hf_hub_download("uralman/yolo26l-widerface", "best.pt")
|
| 50 |
+
model = YOLO(weights)
|
| 51 |
+
|
| 52 |
+
results = model.predict(
|
| 53 |
+
"image.jpg",
|
| 54 |
+
imgsz=1280, # match training
|
| 55 |
+
conf=0.25, # lower (e.g. 0.15) for recall; raise for fewer FPs
|
| 56 |
+
iou=0.7,
|
| 57 |
+
max_det=300,
|
| 58 |
+
)
|
| 59 |
+
for r in results:
|
| 60 |
+
print(r.boxes.xyxy, r.boxes.conf) # face boxes
|
| 61 |
+
r.save("out.jpg")
|
| 62 |
```
|
| 63 |
|
| 64 |
+
### Recommended defaults
|
| 65 |
+
|
| 66 |
+
| Setting | Value | Notes |
|
| 67 |
+
|---------|------:|-------|
|
| 68 |
+
| `imgsz` | **1280** | Trained at 1280; smaller sizes are faster but can miss tiny faces |
|
| 69 |
+
| `conf` | 0.25 | Start here; try 0.15β0.35 per domain |
|
| 70 |
+
| `iou` | 0.7 | NMS IoU |
|
| 71 |
+
| `max_det` | 300 | Crowds / parades need headroom |
|
| 72 |
+
|
| 73 |
+
Approximate latency (PyTorch, `imgsz=1280`, conf=0.25): **~14 ms/image on NVIDIA H100** (single image, warmed). Expect slower on smaller GPUs / CPU.
|
| 74 |
+
|
| 75 |
+
## When to use this vs nano face models
|
| 76 |
+
|
| 77 |
+
- Prefer this **L** checkpoint when you care about **small / crowded faces** and can afford ~25M params / ~150MB.
|
| 78 |
+
- Prefer a **nano** face YOLO when you need max FPS on edge or CPU and faces are relatively large in frame.
|
| 79 |
+
|
| 80 |
+
## Validation metrics
|
| 81 |
+
|
| 82 |
+
Ultralytics COCO-style box metrics on the **YOLO-formatted WIDER FACE val** split used in this run (~3.2k images). Peak by **mAP50-95** (epoch 71; training stopped ~epoch 73):
|
| 83 |
+
|
| 84 |
+
| Metric | Best |
|
| 85 |
+
|--------|-----:|
|
| 86 |
+
| Precision | 0.896 |
|
| 87 |
+
| Recall | 0.725 |
|
| 88 |
+
| **mAP50** | **0.801** |
|
| 89 |
+
| **mAP50-95** | **0.455** |
|
| 90 |
+
|
| 91 |
+
**Not** the official WIDER FACE Easy/Medium/Hard protocol. Numbers depend on label conversion, `imgsz`, and NMS β use them to reproduce *this* setup, not as a leaderboard claim.
|
| 92 |
|
| 93 |
+
## Training (short)
|
| 94 |
|
| 95 |
| Item | Value |
|
| 96 |
|------|-------|
|
| 97 |
+
| Base | Ultralytics `yolo26l.pt` |
|
| 98 |
+
| Data | WIDER FACE β YOLO labels (~12.9k train / ~3.2k val), 1 class |
|
| 99 |
+
| Setup | imgsz 1280, batch 8, AMP, cosine LR, mosaic + multi-scale |
|
| 100 |
+
| Hardware | 2Γ H100, DDP |
|
| 101 |
+
| Stop | Early (~73 / 200) near plateau |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
+
## Files
|
|
|
|
|
|
|
| 104 |
|
| 105 |
+
| File | Description |
|
| 106 |
+
|------|-------------|
|
| 107 |
+
| `best.pt` | Ultralytics PyTorch weights |
|
| 108 |
+
| `model.onnx` | ONNX export (`imgsz=1280`, dynamic) |
|
| 109 |
+
| `assets/pred_*.jpg` | Example predictions on WIDER FACE val |
|
|
|
|
| 110 |
|
| 111 |
+
### ONNX
|
| 112 |
|
| 113 |
+
```bash
|
| 114 |
+
pip install onnxruntime # or onnxruntime-gpu
|
| 115 |
+
```
|
| 116 |
|
| 117 |
+
```python
|
| 118 |
+
from huggingface_hub import hf_hub_download
|
| 119 |
+
from ultralytics import YOLO
|
| 120 |
|
| 121 |
+
onnx_path = hf_hub_download("uralman/yolo26l-widerface", "model.onnx")
|
| 122 |
+
model = YOLO(onnx_path)
|
| 123 |
+
model.predict("image.jpg", imgsz=1280, conf=0.25)
|
| 124 |
+
```
|
| 125 |
|
| 126 |
+
Or export yourself from `best.pt`:
|
| 127 |
|
| 128 |
+
```python
|
| 129 |
+
YOLO("best.pt").export(format="onnx", imgsz=1280, dynamic=True, simplify=True)
|
| 130 |
+
```
|
| 131 |
|
| 132 |
+
## Limitations & ethics
|
| 133 |
|
| 134 |
+
- Face **detection only** (boxes) β not recognition / identity.
|
| 135 |
+
- Domain shift expected outside WIDER FACE-like photos (strong blur, unusual cameras, etc.).
|
| 136 |
+
- False positives/negatives can affect privacy pipelines; validate on your data before production.
|
| 137 |
+
- Ultralytics / YOLO26 are **AGPL-3.0** β see [license](https://www.ultralytics.com/license).
|
| 138 |
|
| 139 |
## Acknowledgements
|
| 140 |
|