/ Модель

Характеристики

Лицензия
AGPL 3.0
Базовая модель
YOLO26
Библиотека
ultralytics
Опубликована
13 ноя 2026

YOLO-face-detection320-LeakyReLU

Поиск объектовИзображение → bounding_boxes3 профессии

Набор наноразмерных моделей YOLO с LeakyReLU(0.1) для обнаружения лиц на изображениях 320×320.

220скачиваний за 30 дней0лайковвеса обновлены13 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

wesjos выпустил набор наноразмерных детекторов лиц на архитектурах YOLOv5nu, YOLOv8n, YOLO11n и YOLO26n. Это экспериментальное сравнение активаций: по сравнению с базовым набором YOLO-face-detection320 здесь заменили SiLU на LeakyReLU(0.1), сохранив данные, гиперпараметры, исходные веса и seed. Модели принимают изображения фиксированного размера 320×320 и обнаруживают один класс объектов — лицо.

Модели рассчитаны на портреты, аватары, фотографии документов и кадры контроля доступа, где лицо занимает заметную часть изображения. На описанных в карточке тестах замена SiLU снизила mAP50–95 в среднем на 0,28 процентного пункта, а ускорения на RTX 4090 не дала. Возможное применение — целевые NPU или INT8-конвейеры, где SiLU недоступна; автор отмечает, что в таком случае стоит сначала рассмотреть ReLU.

Для нескольких весов указаны размеры от 5,24 до 6,18 МБ; формат файлов — PyTorch. Карточка не сообщает о поддержке текстового ввода или других модальностей. Весам назначено имя класса `item`, поэтому приложения, ожидающие строку `face`, должны сопоставить названия классов самостоятельно. Лицензия — AGPL-3.0.

Сценарии применения

  • поиск лица на фотографии документа
  • обнаружение лица на аватаре или портрете
  • детекция лица в кадре камеры контроля доступа
  • оценка замены SiLU на LeakyReLU в детекторе YOLO
  • запуск детекции лиц на целевой NPU или в INT8-конвейере

Ограничения

На тестах карточки LeakyReLU снизила mAP50–95 относительно SiLU в среднем на 0,28 процентного пункта и не ускорила инференс на RTX 4090. Модели рассчитаны на вход 320×320 и лучше подходят для крупных лиц; для очень маленьких и удалённых лиц результаты могут быть ненадёжными, а имя класса в весах задано как `item`.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

YOLO-face-detection320-LeakyReLU(0.1)

Four nano-scale YOLO face detectors with a fixed 320×320 input and a single class. This repo is the SiLU → LeakyReLU(0.1) single-variable ablation of wesjos/YOLO-face-detection320: dataset, hyperparameters, initial weights and seed are identical — only the activation differs.

TL;DR — do not swap SiLU out for this

ComparisonΔ mAP50-95Significanceb32 latency
SiLU − LeakyReLU(0.1)SiLU +0.28 pp3/4 architectures significantno difference
SiLU − ReLUSiLU +0.41 pp4/4 significantno difference
ReLU − LeakyReLU(0.1)only +0.12 pp0/4 significantno difference
  1. The loss is real. All four architectures get worse, and the 95% CI from a 1000-round paired bootstrap does not cross zero for three of them.
  2. Changing the activation buys no speed here. On an RTX 4090 the activation is not the bottleneck — b1 / b32 / b64 all tie. "Use LeakyReLU because it's faster" does not hold on this machine.
  3. The only legitimate use case is a target platform (NPU / INT8 pipeline) that cannot evaluate exp(), so SiLU has to go. And in that case plain ReLU is enough: LeakyReLU's "recover the negative side" story buys +0.12 pp over ReLU with zero statistical support (0/4 significant). Reach for ReLU first.

Demo images

Each panel is one image: the output of yolov8n-face320-leaky.pt, the number on the box is the confidence. Params: imgsz=320, conf=0.25, iou=0.5, run on CPU with ultralytics 8.3.51 — no cherry-picking, no post-processing.

iu 188×268 · 1 face · conf 0.95

iu · 188×268 · 1 face · box covers 13.4% of the frame · conf 0.952

images 556×552 · 1 face · conf 0.92

images · 556×552 · 1 face · box covers 22.8% of the frame · conf 0.924

licensed-image 2048×1365 · 1 face · conf 0.93

licensed-image · 2048×1365 · 1 face · box covers 22.9% of the frame · conf 0.926 (downscaled to 320 for inference; the face still spans ~23% of the frame — the model's comfort zone)

lyf 381×524 · 1 face · conf 0.96

lyf · 381×524 · 1 face · box covers 15.5% of the frame · conf 0.960

talyor 452×678 · 1 face · conf 0.95

talyor · 452×678 · 1 face · box covers 12.7% of the frame · conf 0.948

Every image holds a single face. Re-running the same five images at conf=0.10 returned one box each for yolov8n, yolo11n and yolov5nu; yolo26n adds one extra low-confidence box (0.16) on licensed-image — a genuine extra candidate, not a rendering artifact.

When to use it

These weights are built for small inputs where the face takes up a large share of the frame. The input is a fixed 320×320 and the intended subject is one face (or a head-and-shoulders shot) filling most of the image: ID photos, avatars, access-control / gate captures, cropped portraits. The demos above sit in the 13%–23% box-to-frame range, which is where the model is most reliable.

Conversely, tiny distant faces (ground-truth box < 0.4% of the frame) only reach ~0.73 recall — that is not what these weights are for. Tile large images and run 320 on each tile, or train a 640 model.

Results

Same val set as the SiLU baseline (5,797 images / 6,146 boxes), imgsz=320, conf=0.001, COCO-style 101-point interpolated AP:

FileParamsGFLOPsSizemAP50mAP50-95vs SiLU
yolov5nu-face320-leaky.pt2.636 M1.935.25 MB0.98790.9058−0.0040
yolov8n-face320-leaky.pt3.138 M2.196.18 MB0.98740.9074−0.0025
yolo11n-face320-leaky.pt2.605 M1.635.24 MB0.98690.9074−0.0020
yolo26n-face320-leaky.pt2.534 M1.355.20 MB0.98690.9064−0.0037
  • Accuracy: 101-point interpolated COCO AP computed in numpy — the same estimator as the baseline repo, so the two tables are directly comparable.
  • Params / GFLOPs / Size were re-measured on the released checkpoints here (ultralytics 8.4.211, .info(imgsz=320)), not copied from the ModelScope card. The one number that disagrees is yolo26n: this table says 1.35 GFLOPs, the ModelScope card said 1.48 — both 8.3.51 and 8.4.211 report 1.347 on the released file, so 1.35 is what the shipped weights actually cost.
  • Latency (in the TL;DR) is the source ablation run's measurement — RTX 4090, FP16, full predict path including pre/post-processing and NMS, median of 7 runs. It was not re-measured when publishing this repo.
  • The SiLU baseline column behind vs SiLU is the control group of this same ablation run (0.9098 / 0.9098 / 0.9094 / 0.9101). It sits 0.3–0.4 pp below the numbers published in the SiLU repo (0.9138–0.9147), i.e. the two are not the same training run — compare deltas within this table, not absolute values across repos.
  • yolov5nu is Ultralytics' port of YOLOv5n (2.64 M params), not the 1.77 M model from the original YOLOv5 repo.

Inference

from ultralytics import YOLO

model = YOLO("yolo26n-face320-leaky.pt")
results = model.predict("image.jpg", imgsz=320, conf=0.25, iou=0.5)
for b in results[0].boxes:
    print(b.xyxy.tolist(), float(b.conf))
python inference.py image.jpg          # bundled script, no config needed
yolo predict model=yolo26n-face320-leaky.pt source=./images imgsz=320 conf=0.25

Caveats

  • Input must be 320. Running a 320-trained model at 640 drops mAP50-95 from ~0.91 to 0.775 — do not upscale the input.
  • The box is the face region (hairline to chin), excluding the back of the head and neck. If downstream needs a full-head box, redefine it there.
  • The class name inside these checkpoints is item, not face (model.names == {0: 'item'}, inherited from the training data yaml). It is a single-class model so nothing breaks, but if your code keys off the string face, map it yourself — this is what makes Ultralytics' built-in plot() label the boxes item.
  • Weak on small targets: recall ~0.73 for GT boxes < 0.4% of the frame, ~0.77 for 0.4–2%, 0.998 above 10%. For distant small faces, tile the image or train a 640 model.
  • The training set is dominated by single-face images (only 5.5% have multiple faces); dense crowds are out of distribution.
  • Weights are inference-only (optimizer and EMA state stripped, epoch=-1).

Training setup

Identical to the SiLU baseline except for the one row in bold.

ItemValue
epochs / batch / imgsz150 / 256 / 320
optimizerauto → MuSGD (iterations > 10000), lr0 0.01, cos_lr
augmentationmosaic 1.0 / scale 0.5 / fliplr 0.5, mosaic off for the last 10 epochs
seed / deterministic0 / True
cacheram (single process, serial)
activationnn.LeakyReLU(0.1, inplace=True) — the only variable
stackUltralytics 8.4.211 / torch 2.11.0+cu130
Per-model training time≈41 min (RTX 4090)

Training data: 23,150 train images / 24,575 boxes, 5,797 val images / 6,146 boxes, 30,721 boxes total, natively 320×320, labels produced by an automatic detector and not hand-verified box by box.

Reproducing this is less obvious than it looks

Setting model.yaml['activation'], or only changing Conv.default_act in ultralytics/nn/modules/conv.py, both produce a mixed model: when DetectionModel.load() transfers the detection head it deep-copies the source model's cv3 / one2one_cv3 wholesale, and that source model was deserialized by YOLO(pt) — it never goes through parse_model, so its activations are still SiLU. The log only prints Transferred 696/708 items and reports no error.

The reliable way is to walk the already-built module tree and replace in place:

for mod in model.modules():
    for cname, child in list(mod.named_children()):
        if isinstance(child, (nn.SiLU, nn.ReLU, nn.LeakyReLU)):
            setattr(mod, cname, nn.LeakyReLU(0.1, inplace=True))

What that gives, verified on the released files (zero SiLU left in any of them):

FileLeakyReLU slotsnn.Identity totalof which activation slots
yolov5nu-face320-leaky.pt6900
yolov8n-face320-leaky.pt5700
yolo11n-face320-leaky.pt7744
yolo26n-face320-leaky.pt105109 (the 10th is the DFL module)

The nn.Identity slots come from the source code's explicit act=False and cannot be replaced.

Files in this repo

FileSizePurpose
yolov5nu-face320-leaky.pt5.25 MBYOLOv5nu port, LeakyReLU(0.1)
yolov8n-face320-leaky.pt6.18 MBYOLOv8n, LeakyReLU(0.1) (the demo model)
yolo11n-face320-leaky.pt5.24 MBYOLO11n, LeakyReLU(0.1)
yolo26n-face320-leaky.pt5.20 MBYOLO26n, LeakyReLU(0.1) (default in inference.py)
inference.py1.2 KBself-contained predict script
metrics.json997 Bper-file byte size + activation counts
demo/*.jpg5 filesthe panels above

中文摘要

wesjos/YOLO-face-detection320 的 SiLU → LeakyReLU(0.1) 单变量消融:数据、超参、预训练权重、种子全同,只换激活。

  • 别用它替代 SiLU:4 个架构全部掉点,平均 0.28 pp,其中 3/4 配对 bootstrap 95% CI 不跨 0;RTX 4090 上延迟无差异,换激活换不来速度。
  • 唯一正当用途:目标平台(NPU / INT8 管线)不支持 exp,必须去掉 SiLU。但此时直接用更简单的 ReLU 就够了——LeakyReLU 相对 ReLU 只高 0.12 pp、0/4 显著,没有统计依据。
  • 与 ReLU 版的关系:本仓是 LeakyReLU(0.1),姊妹仓是 YOLO-face-detection320-ReLU。
  • 坑:权重里 model.names 是 item 而不是 face,单类不影响使用,但依赖类别字符串的下游要自己映射。

License

AGPL-3.0 (inherited from Ultralytics).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · ultralytics

Нельзя запустить

Модели Ultralytics YOLO требуют отдельного рантайма.

Ревизия весов
b47f99d

0 моделей