Source-linked AI summary
YOLO-FaceV2: A Scale and Occlusion Aware Face Detector
Ziping Yu, Hongbo Huang, Weijun Chen, Yongxin Su, Yahui Liu, Xiuying Wang
TL;DR
Detecting faces across scale variation and occlusion remains challenging, with small-face features easily lost and one-stage training imbalanced toward easy samples. YOLO-FaceV2 extends YOLOv5 with mechanisms targeting these issues. It achieves close to or exceeding state-of-the-art performance on WiderFace validation Easy and Medium subsets.
Problem
Face detection remains challenging across scale and occlusion, while small-face features can be lost through multi-layer convolutions and one-stage training is imbalanced toward easy samples.
Source: §1 · p. 2Method
YOLO-FaceV2 builds on YOLOv5, combining P2 feature fusion, RFE, NWD Loss, SEAM, Repulsion Loss, and Slide to address small faces, occlusion, and sample imbalance.
Source: §1 · pp. 3–4, §3.4 · p. 8, §3.7 · p. 10Results
YOLO-FaceV2 achieves close to or exceeding state-of-the-art performance on WiderFace validation Easy and Medium subsets.
Source: §5 · p. 15Takeaways & Limitations
The paper concludes that YOLO-FaceV2 is a real-time face detector with close-to-or-exceeding state-of-the-art performance on WiderFace validation Easy and Medium subsets.
Source: §5 · p. 15Current hard-sample-mining methods require many hyperparameters, making them inconvenient in practice.
Source: §1 · p. 3
Abstract
from arXiv · showhide
In recent years, face detection algorithms based on deep learning have made great progress. These algorithms can be generally divided into two categories, i.e. two-stage detector like Faster R-CNN and one-stage detector like YOLO. Because of the better balance between accuracy and speed, one-stage detectors have been widely used in many applications. In this paper, we propose a real-time face detector based on the one-stage detector YOLOv5, named YOLO-FaceV2. We design a Receptive Field Enhancement module called RFE to enhance receptive field of small face, and use NWD Loss to make up for the sensitivity of IoU to the location deviation of tiny objects. For face occlusion, we present an attention module named SEAM and introduce Repulsion Loss to solve it. Moreover, we use a weight function Slide to solve the imbalance between easy and hard samples and use the information of the effective receptive field to design the anchor. The experimental results on WiderFace dataset show that our face detector outperforms YOLO and its variants can be find in all easy, medium and hard subsets. Source code in https://github.com/Krasjet-Yu/YOLO-FaceV2
1 Introduction
The introduction proposes YOLO-FaceV2, a YOLOv5-based face detector designed to address small and varying-scale faces, occlusion, and imbalance between easy and hard samples. Its contributions combine feature-pyramid and receptive-field changes with occlusion handling, sample weighting, anchor redesign, and a regression-loss modification.
- YOLO-FaceV2 fuses P2 features to retain pixel-level information for small faces and adds dilated-convolution RFE at P5 to enlarge the receptive field.The paper notes that adding P2 can slightly reduce accuracy on medium and large targets, which RFE is intended to ameliorate.Source: §1 · pp. 2–3
- The detector redesigns anchor sizes and proportions using the effective receptive field and face proportions to better suit bounding-box regression.The introduction explains that the theoretical receptive field can exceed the effective receptive field, making anchors based on it harder to regress.Source: §1 · p. 3
- The regression loss incorporates Normalized Wasserstein Distance to mitigate IoU’s sensitivity to small-face localization deviations.The introduction states that slight position deviations can sharply reduce IoU for small targets.Source: §1 · p. 3
- For occlusion, Repulsion Loss discourages predicted boxes from shifting toward other ground truths and reduces NMS-threshold sensitivity, while SEAM enhances face-feature learning when objects cause feature disappearance.The introduction distinguishes occlusion between faces from occlusion by other objects.Source: §1 · pp. 3–4
- Slide weights samples by IoU, uses the mean IoU of candidate positive samples as the positive-negative dividing line, and gives harder samples greater weight.This design addresses easy-sample dominance while reducing the hyperparameter-tuning burden of prior hard-sample methods.Source: §1 · pp. 2–4
2 Related Works
The section surveys face-detection architectures and three recurring challenges: scale variation, occlusion, and imbalance between easy and hard samples. It outlines prior approaches to each and motivates further work on sample balancing.
Face Detection
- Early face detectors used cascades, landmark alignment, or angle correction, while later methods adapted generic detectors such as Faster R-CNN, SSD, and RetinaNet.Examples include CascadeCNN, MTCNN, PCN [3], CMS-RCNN [34], FaceBoxes [25], and SRN [35]; the paper notes early methods’ drawbacks, including slow detection and low accuracy.Source: §2 · p. 4
Scale-invariance
- Scale variation is addressed through scale-invariant features, fewer down-sampling layers, dilated convolution, denser anchors, multi-scale training, and fusion of deep semantics with shallow features.The discussion also cites SNIP [43] and TridentNet [12] as approaches to the multi-scale problem.Source: §2 · pp. 4–5
Occlusion problem
- Contextual features are a recurring approach to occlusion, used by SSH [37], FAN [13], PyramidBox [44], and RetinaFace [45] to strengthen information around partially visible faces.Occlusion can cause missed detections and low recall when face regions are invisible or boundaries blurred.Source: §2 · p. 5
3 YOLO-FaceV2
YOLO-FaceV2 adapts YOLOv5 for face detection by changing its architecture and adding modules, losses, weighting, and anchor design to address scale, occlusion, and sample imbalance.
3.1 Network Architecture
- CSPDarknet53 uses RFE in P5, P2 features join the SPP/PAN neck, and an occlusion-focused SEAM branch follows the neck.The heads classify faces and regress their locations.Source: §3.1 · p. 5, Figure 1 · p. 6
3.2 Scale-Aware RFE Model
- RFE combines dilated-convolution branches with shared weights, residual connection, and a gathering-and-weighting layer to fuse multi-scale features and expand the receptive field.It replaces the Bottleneck in the P5 CSP block.Source: §3.2 · p. 6, Figure 2 · p. 7
3.3 Occlusion-Aware Repulsion Loss
- Repulsion Loss uses RepGT to push a predicted box away from the nearest other ground-truth face and RepBox to reduce overlap between predictions for different faces.RepBox aims to prevent NMS from suppressing one of two faces represented by overlapping predictions.Source: §3.3 · pp. 7–8
3.4 Occlusion-Aware Attention Network
- SEAM combines depthwise separable convolutions, pointwise convolutions, and channel-wise fully connected layers to emphasize face regions and use learned channel relationships to recover occluded features.Exponentially normalized attention is multiplied by the original features and is designed to be more tolerant to position error.Source: §3.4 · p. 8
3.5 Sample weighting function
- Slide weighting divides samples at the mean IoU threshold µ and assigns higher weights near the boundary to focus training on difficult samples.The authors identify boundary samples as having unclear classifications and relatively large losses.Source: §3.5 · p. 8, Figure 4 · p. 10
3.6 Anchor Design Strategy
- Anchors use a 1:1.2 width-to-height ratio and sizes based on each layer’s effective receptive field, which is smaller than its theoretical receptive field.The three detection heads are associated with anchor scales designed according to the P2, P3, and P4 strides.Source: §3.6 · p. 9, Figure 5 · p. 10
3.7 Normalized Gaussian Wasserstein Distance
- NWD Loss supplements IoU loss for small-target regression because its Gaussian-distribution similarity measure is less sensitive to target scale, while IoU remains for large targets.NWD measures similarity between predicted and real targets whether or not they overlap.Source: §3.7 · p. 10
4 Experiments
The experiments evaluate the proposed method through ablations of its attention module, multi-scale fusion pyramid, and loss design, and compare the detector with other state-of-the-art face detectors.
- The experiments compare the proposed detector’s performance with other state-of-the-art face detectors.Source: §4 · p. 11
- Ablations assess the effectiveness of the proposed attention module.Source: §4 · p. 11
- Ablations assess the multi-scale fusion pyramid structure.Source: §4 · p. 11
- Ablations assess the proposed loss function design.Source: §4 · p. 11
4.1 Dataset
YOLO-FaceV2 was evaluated on WiderFace, a 32,203-image dataset containing more than 400,000 faces and divided into easy, medium, and hard subsets.
4.1 Dataset
- WiderFace contains 32,203 images and more than 400,000 faces, split into 40% training, 10% verification, and 50% test data.The model was trained on the training set and evaluated on the validation and test sets.Source: §4.1 · p. 11
- The hard subset is the most challenging and is described as better reflecting face-detector effectiveness.The dataset is divided into easy, medium, and hard subsets.Source: §4.1 · p. 11
4.2 Training
The authors fine-tuned a PyTorch YOLOv5 baseline using SGD, reporting the learning-rate and momentum schedule, NMS IoU, hardware, and training duration.
4.2 Training
- Training used SGD with learning rates of 1e-2 initially and 1e-3 finally, weight decay 5e-3, and momentum 0.8 for three warm-up epochs then 0.937.The NMS IoU was 0.5; training ran on a 1080ti with four CPU workers for 100 iterations at batch size 16.Source: §4.2 · p. 11
4.3 Ablation Study
The ablation study evaluates each module and loss on WiderFace, then combines modules one by one. The findings describe gains from attention, feature fusion, Slide, anchor design, and Repulsion Loss, while NWD alone does not improve results.
4.3.1 SEAM Block
- SEAM increases accuracy by 0.88, 0.82, and 1.06 on the easy, medium, and hard validation subsets, respectively.The attention block compensates for occluded-face response loss by strengthening responses to unobstructed faces.Source: §4.3.1 · p. 11, Table 2 · p. 12
4.3.2 Multi-scale feature fusion
- RFE increases accuracy by 0.5, 0.6, and 2.17, respectively, while adding P2 features raises the hard-subset result by 0.57.P2 fusion adds small-target information; RFE uses dilated convolutions with rates 1, 2, and 3 to improve long-range dependency.Source: §4.3.2 · p. 12, Table 2 · p. 12
4.3.3 Slide Loss
- Slide slightly improves results on the medium and hard subsets by focusing the model more on hard samples.Source: §4.3.3 · p. 12, Table 2 · p. 12
4.3.4 Anchor Design
- Designed anchors improve results by 0.24, 0.75, and 0.9 on the easy, medium, and hard datasets, respectively.Anchor ratios and sizes are designed using effective receptive field and face-shape characteristics to recall more small faces.Source: §4.3.4 · p. 12, Table 2 · p. 12
4.3.5 NWD Loss
- Replacing IoU with NWD alone does not improve results, so the study retains IoU and adjusts its proportion relative to NWD.The rationale is that IoU performs better for large and medium targets, while NWD can improve detection accuracy for small targets.Source: §4.3.5 · p. 12
4.3.6 Balance of RepGT and RepBox
- Repulsion Loss improves accuracy by 0.71, 0.63, and 0.5 on the easy, medium, and hard subsets, respectively.The study varies face-occlusion thresholds to adapt the loss to face detection.Source: Table 2 · p. 12, §4.3.6 · p. 13
4.4 Comparisons with Existing Face Detectors
The section compares YOLO-FaceV2 with recent face detectors on the WiderFace validation dataset, using a detector-family-classified table and precision-recall curves.
4.4 Comparisons with Existing Face Detectors
- Table 4 compares YOLO-FaceV2 with existing face detectors on WiderFace validation, grouped by underlying detector family and using data from the dataset’s official website.The listed families include Fast R-CNN, SSD, and YOLO.Source: Table 4 · p. 13, §4.4 · p. 15
- Figure 6 shows precision-recall curves for YOLO-FaceV2 and competing detectors on the Easy, Medium, and Hard WiderFace validation subsets.Source: Figure 6 · p. 14, §4.4 · p. 15
5 Conclusion
YOLO-FaceV2 combines scale-aware, sample-balance, and occlusion components in a YOLOv5-based face detector, achieving close to or exceeding SOTA performance on WiderFace validation Easy and Medium subsets.
- YOLO-FaceV2 achieves close to or exceeding SOTA performance on the WiderFace validation Easy and Medium subsets.Source: §5 · p. 15
- For varying face scales, it fuses the P2 layer into the feature pyramid, uses RFE to enhance receptive field, and applies NWD Loss for robust small-target detection.Source: §5 · p. 15
- Slide alleviates easy-hard sample imbalance, while SEAM and Repulsion Loss address occlusion; effective receptive field information guides anchor design.Source: §5 · p. 15
Related papers
This paper cites
- SSD: Single Shot MultiBox Detector2015
- You Only Look Once: Unified, Real-Time Object Detection2015
- EfficientDet: Scalable and Efficient Object Detection2019
- Scale-Aware Trident Networks for Object Detection2019
- Receptive Field Block Net for Accurate and Fast Object Detection2017
- Patches Are All You Need?2022