Skip to main content
QUICK REVIEW

[Paper Review] YOLO5Face: Why Reinventing a Face Detector

Delong Qi, Weijun Tan|arXiv (Cornell University)|May 27, 2021
Face recognition and analysisComputer Science47 references39 citations
TL;DR

This paper treats face detection as general object detection and adapts YOLOv5 to create YOLO5Face, adding landmark regression and various backbones to achieve state-of-the-art performance on WiderFace, including mobile-friendly models.

ABSTRACT

Tremendous progress has been made on face detection in recent years using convolutional neural networks. While many face detectors use designs designated for detecting faces, we treat face detection as a generic object detection task. We implement a face detector based on the YOLOv5 object detector and call it YOLO5Face. We make a few key modifications to the YOLOv5 and optimize it for face detection. These modifications include adding a five-point landmark regression head, using a stem block at the input of the backbone, using smaller-size kernels in the SPP, and adding a P6 output in the PAN block. We design detectors of different model sizes, from an extra-large model to achieve the best performance to a super small model for real-time detection on an embedded or mobile device. Experiment results on the WiderFace dataset show that on VGA images, our face detectors can achieve state-of-the-art performance in almost all the Easy, Medium, and Hard subsets, exceeding the more complex designated face detectors. The code is available at \url{https://github.com/deepcam-cn/yolov5-face}

Motivation & Objective

  • Reframe face detection as a general object detection task to leverage standard detectors without reinventing architecture.
  • Develop a family of YOLOv5-based face detectors with landmark regression and tailored components for varying deployment needs.
  • Improve detection of both small and large faces through architectural modifications and training strategies.
  • Evaluate performance on the WiderFace benchmark and cross-domain datasets to establish state-of-the-art results across subsets.

Proposed method

  • Redesign YOLOv5 into YOLO5Face by adding a five-point landmark regression head using Wing loss.
  • Replace the Focus layer with a Stem block to improve generalization and reduce computation.
  • Use a smaller-kernel SPP block (7x7, 5x5, 3x3) to boost small-face detection.
  • Add a P6 output block (stride 64) to enhance large-face detection.
  • Introduce two lightweight backbones based on ShuffleNetV2 to create ultra-compact models for embedded devices.
  • Train with VGA-res inputs and scale the longer edge to 640, aligning shorter edge with the largest SPP stride, with ablations on data augmentation (excluding up-down flip; Mosaic varied) and landmark supervision.

Experimental results

Research questions

  • RQ1Can face detection be effectively achieved using a general object detector framework without dedicated face-specific architectures?
  • RQ2Do modifications like landmark regression, Stem blocks, smaller SPP kernels, and a P6 head improve mAP on WiderFace across Easy/Medium/Hard?
  • RQ3Do mobile- and embedded-focused backbones (ShuffleNetV2) provide competitive accuracy with significantly reduced compute?
  • RQ4How do data augmentation choices (e.g., removal of up-down flipping, mosaic) affect face detector performance?
  • RQ5Do landmark-based supervision and alignment improve downstream face recognition benchmarks?

Key findings

  • YOLO5Face achieves state-of-the-art mAP on Easy, Medium, and Hard subsets of WiderFace with large models (e.g., YOLOv5x6).
  • Smaller kernels in SPP (7x7,5x5,3x3) yield notable mAP gains across Easy, Medium, Hard (0.9%, 1.49%, 1.41%).
  • Adding a P6 output block provides mAP improvements on Easy and Medium (~1% each) with a minor drop on Hard.
  • Stem block improves mAP over Focus by up to 0.57% on Easy (0.33% Medium, 0.23% Hard).
  • Two ShuffleNetV2-based backbones enable ultra-compact detectors (YOLOv5n, YOLOv5n0.5) with competitive performance for embedded devices.
  • On WiderFace validation, YOLOv5x6-Face reaches 96.9% (Easy), 96.0% (Medium), 91.6% (Hard); on test, 95.8%, 94.9%, 90.5%.
  • YOLO5Face variants can outperform RetinaFace in face recognition tasks on Webface with landmark supervision.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.