yolo11face

[ultralytics v8.3.75][yolov8/yolo11-pose][WIDER FACE]Upgrade YOLO5Face to YOLO8Face and YOLO11Face

https://github.com/zjykzj/yolo11face

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.2%) to scientific vocabulary

Keywords

landmark-detection landmarks python pytorch ultralytics widerface yolo yolo11 yolo11-pose yolo11face yolo5face yolo8face yolov8 yolov8-pose
Last synced: 6 months ago · JSON representation ·

Repository

[ultralytics v8.3.75][yolov8/yolo11-pose][WIDER FACE]Upgrade YOLO5Face to YOLO8Face and YOLO11Face

Basic Info
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 3
Topics
landmark-detection landmarks python pytorch ultralytics widerface yolo yolo11 yolo11-pose yolo11face yolo5face yolo8face yolov8 yolov8-pose
Created about 1 year ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License Citation

README.md

«YOLO11Face» combined YOLO5Face and YOLOv8/YOLO11 for face and keypoint detection

This warehouse has attempted to train two model architectures in total. The first one is to train and validate the WIDERFACE dataset using only the yolov5/yolov8/yolo11 detection model architecture.

| | ARCH | GFLOPs | Easy | Medium | Hard | |:---------------------:|:------------:|:------:|:-----:|:------:|:-----:| | zjykzj/YOLO11Face | yolov5nu | 7.1 | 93.86 | 91.70 | 80.37 | | zjykzj/YOLO11Face | yolov5su | 23.8 | 95.13 | 93.47 | 84.33 | | zjykzj/YOLO11Face | yolov8s | 28.4 | 95.77 | 94.18 | 84.54 | | zjykzj/YOLO11Face | yolo11s | 21.3 | 95.55 | 93.91 | 84.85 |

The second method uses Ultralytics' pose model for joint training of faces and keypoints, and finally evaluates only the facial performance of the validation set in the original way.

Note that the facial keypoint annotation here comes from RetinaFace, which only annotated facial keypoints on the original training set. Therefore, when training the pose model, the training part of the original WIDERFACE train dataset is divided into training/validation datasets in an 8:2 ratio, and the val dataset is evaluated after training is completed.

| | ARCH | GFLOPs | Easy | Medium | Hard | |:---------------------:|:------------:|:------:|:-----:|:------:|:-----:| | zjykzj/YOLO5Face | yolov5n-v7.0 | 4.2 | 93.25 | 91.11 | 80.33 | | zjykzj/YOLO5Face | yolov5s-v7.0 | 15.8 | 94.84 | 93.28 | 84.67 | | | | | | | | | zjykzj/YOLO11Face | yolov8n-pose | 8.3 | 94.61 | 92.46 | 80.98 | | zjykzj/YOLO11Face | yolov8s-pose | 29.4 | 95.50 | 93.95 | 84.65 | | | | | | | | | zjykzj/YOLO11Face | yolo11n-pose | 6.6 | 94.62 | 92.56 | 81.02 | | zjykzj/YOLO11Face | yolo11s-pose | 22.3 | 95.72 | 94.19 | 85.24 |

During the eval phase, using VGA resolution input images (the longer edge of the input image is scaled to 640, and the shorter edge is scaled accordingly)

Table of Contents✨

News🚀

  • 2025/03/01: Training and evaluation of WIDERFACE using the detection and pose model architecture of yolov5/yolov8/yolo11.
  • 2025/02/21: Upgrade the baseline version of the repository to ultralytics v8.3.75.
  • 2025/02/15: Trains a face and landmarks detector based on YOLOv8-pose and the WIDERFACE dataset.
  • 2023/02/03: Trains a face detector based on YOLOv8 and the WIDERFACE dataset.
  • 2025/01/09: Initialize this repository using ultralytics v8.2.103.

Background🏷

According to the YOLO5Face implementation, it adds Landmarks-HEAD to YOLOv5 to achieve synchronous detection of faces and keypoints. The YOLOv8/YOLO11 is an upgraded version of YOLOv5, which naturally improves the performance of face and keypoint detection by combining YOLO5Face and YOLOv8/YOLO11.

Through experiments, it was found that using YOLOv8-pose/YOLO11-pose can simultaneously detect faces and facial keypoints. Thank to ultralytics !!!

Note: the latest implementation of YOLO11Face in our warehouse is entirely based on ultralytics/ultralytics v8.3.75

Installation

See INSTALL.md

Usage✨

Train⭐

shell $ python3 pose_train.py --model yolo11s-pose.pt --data ./yolo11face/cfg/datasets/widerface-landmarks.yaml --epochs 300 --imgsz 800 --batch 8 --device 0

Eval⭐

```shell

python posewiderface.py --model yolo11s-posewiderface.pt --source ../datasets/widerface/images/val/ --folderpict ../datasets/widerface/widerfacesplit/widerfacevalbbxgt.txt --savetxt true --imgsz 640 --conf 0.001 --iou 0.6 --max_det 1000 --batch 1 --device 7

args: Namespace(data=None, device=[7], folderpict='../datasets/widerface/widerfacesplit/widerfacevalbbxgt.txt', model='yolo11s-posewiderface.pt', source='../datasets/widerface/images/val/') - unknown: ['--savetxt', 'true', '--imgsz', '640', '--conf', '0.001', '--iou', '0.6', '--maxdet', '1000', '--batch', '1'] {'model': 'yolo11s-posewiderface.pt', 'data': None, 'device': [7], 'source': '../datasets/widerface/images/val/', 'folderpict': '../datasets/widerface/widerfacesplit/widerfacevalbbxgt.txt', 'savetxt': True, 'imgsz': 640, 'conf': 0.001, 'iou': 0.6, 'maxdet': 1000, 'batch': 1, 'mode': 'predict'} 3226

Ultralytics 8.3.75 🚀 Python-3.8.19 torch-1.12.1+cu113 CUDA:7 (NVIDIA GeForce RTX 3090, 24268MiB) YOLO11s-pose summary (fused): 257 layers, 9,700,560 parameters, 0 gradients, 22.3 GFLOPs ... ... Speed: 2.0ms preprocess, 14.4ms inference, 1.4ms postprocess per image at shape (1, 3, 640, 448) Results saved to /data/zj/YOLO11Face/runs/detect/predict3 0 label saved to /data/zj/YOLO11Face/runs/detect/predict3/labels

cd widerface_evaluate/

python3 evaluation.py -p ../runs/detect/predict3/labels/ -g ./ground_truth/

Reading Predictions : 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 61/61 [00:00<00:00, 115.26it/s] Processing easy: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 61/61 [00:19<00:00, 3.20it/s] Processing medium: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 61/61 [00:18<00:00, 3.22it/s] Processing hard: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 61/61 [00:18<00:00, 3.21it/s] ==================== Results ==================== Easy Val AP: 0.9572097672239526 Medium Val AP: 0.9419027051471077

Hard Val AP: 0.8523522955677869

```

Predict⭐

```shell

python3 posepredict.py --model yolo11s-posewiderface.pt --source ./yolo11face/assets/widerface_val/ --imgsz 640 --device 0

args: Namespace(data=None, device=[0], model='yolo11s-posewiderface.pt', source='./yolo11face/assets/widerfaceval/') - unknown: ['--imgsz', '640']

Ultralytics 8.3.75 🚀 Python-3.8.19 torch-1.12.1+cu113 CUDA:0 (NVIDIA GeForce RTX 3090, 24268MiB) YOLO11s-pose summary (fused): 257 layers, 9,700,560 parameters, 0 gradients, 22.3 GFLOPs image 1/2 /data/zj/YOLO11Face/yolo11face/assets/widerfaceval/39IceSkatingiceskiing39351.jpg: 640x640 3 faces, 22.8ms image 2/2 /data/zj/YOLO11Face/yolo11face/assets/widerfaceval/9PressConferencePressConference9_632.jpg: 640x640 1 face, 22.8ms Speed: 3.1ms preprocess, 22.8ms inference, 1.8ms postprocess per image at shape (2, 3, 640, 640) Results saved to /data/zj/YOLO11Face/runs/detect/predict10 ```

Maintainers🔥

  • zhujian - Initial work - zjykzj

Thanks♥️

Contributing🌞

Anyone's participation is welcome! Open an issue or submit PRs.

License✒️

Apache License 2.0 © 2025 zjykzj

Owner

  • Name: zhujian
  • Login: zjykzj
  • Kind: user
  • Location: Hangzhou
  • Company: yoyo

computer vision & deep learning

Citation (CITATION.cff)

# This CITATION.cff file was generated with https://bit.ly/cffinit

cff-version: 1.2.0
title: Ultralytics YOLO
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Glenn
    family-names: Jocher
    affiliation: Ultralytics
    orcid: 'https://orcid.org/0000-0001-5950-6979'
  - family-names: Qiu
    given-names: Jing
    affiliation: Ultralytics
    orcid: 'https://orcid.org/0000-0003-3783-7069'
  - given-names: Ayush
    family-names: Chaurasia
    affiliation: Ultralytics
    orcid: 'https://orcid.org/0000-0002-7603-6750'
repository-code: 'https://github.com/ultralytics/ultralytics'
url: 'https://ultralytics.com'
license: AGPL-3.0
version: 8.0.0
date-released: '2023-01-10'

GitHub Events

Total
  • Create event: 5
  • Issues event: 2
  • Release event: 1
  • Watch event: 5
  • Delete event: 2
  • Issue comment event: 13
  • Push event: 15
  • Pull request event: 5
Last Year
  • Create event: 5
  • Issues event: 2
  • Release event: 1
  • Watch event: 5
  • Delete event: 2
  • Issue comment event: 13
  • Push event: 15
  • Pull request event: 5

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 85
  • Total Committers: 1
  • Avg Commits per committer: 85.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 85
  • Committers: 1
  • Avg Commits per committer: 85.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
zjkjzj w****j@1****m 85
Committer Domains (Top 20 + Academic)
163.com: 1

Dependencies

.github/workflows/ci.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • codecov/codecov-action v4 composite
  • conda-incubator/setup-miniconda v3 composite
  • slackapi/slack-github-action v1.27.0 composite
.github/workflows/cla.yml actions
  • contributor-assistant/github-action v2.5.2 composite
.github/workflows/codeql.yaml actions
  • actions/checkout v4 composite
  • github/codeql-action/analyze v3 composite
  • github/codeql-action/init v3 composite
.github/workflows/docker.yaml actions
  • actions/checkout v4 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
  • jlumbroso/free-disk-space v1.3.1 composite
  • nick-invision/retry v3 composite
  • slackapi/slack-github-action v1.27.0 composite
.github/workflows/docs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/format.yml actions
  • ultralytics/actions main composite
.github/workflows/links.yml actions
  • actions/checkout v4 composite
  • nick-invision/retry v3 composite
.github/workflows/merge-main-into-prs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/publish.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • slackapi/slack-github-action v1.27.0 composite
.github/workflows/stale.yml actions
  • actions/stale v9 composite
examples/YOLOv8-ONNXRuntime-Rust/Cargo.toml cargo
docker/Dockerfile docker
  • pytorch/pytorch 2.3.1-cuda12.1-cudnn8-runtime build
pyproject.toml pypi
  • matplotlib >=3.3.0
  • numpy >=1.23.0,<2.0.0
  • opencv-python >=4.6.0
  • pandas >=1.1.4
  • pillow >=7.1.2
  • psutil *
  • py-cpuinfo *
  • pyyaml >=5.3.1
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • torch >=1.8.0
  • torch >=1.8.0,!=2.4.0; sys_platform == 'win32'
  • torchvision >=0.9.0
  • tqdm >=4.64.0
  • ultralytics-thop >=2.0.0