Detecting Faces Using Inside Cascaded Contextual CNN

Kaipeng Zhang, Zhanpeng Zhang, Hao Wang, Zhifeng Li, Yu Qiao, Wei Liu

Introduction

Face detection in unconstrained environments—often referred to as detection "in the wild"—remains a significant challenge in computer vision. Factors such as extreme pose variations, lighting conditions, and partial occlusions frequently degrade the performance of standard detectors. While Convolutional Neural Networks (CNNs) have significantly advanced the state-of-the-art, they often suffer from computational inefficiency, as every input window must typically pass through the entire network depth, regardless of whether it contains a simple background patch or a complex face.

This paper introduces a novel framework that addresses these challenges through two primary innovations: an Inside Cascaded Structure (ICS) for computational efficiency and a Two-Stream Contextual CNN that adaptively leverages body context to improve detection in difficult scenarios.

Proposed Methodology

Inside Cascaded Structure (ICS) and Data Routing

Traditional cascaded detectors rely on a sequence of separate networks to filter out easy negative samples. However, these disjoint networks fail to share features effectively. The proposed ICS embeds the cascade directly within a single CNN architecture by inserting Early Rejection Classifiers (ERC) after the initial pooling layers.

The overall detection pipeline (a) and the detailed internal architecture of the proposed Inside Cascaded Contextual CNN (b).

As shown in the architecture above, a Data Routing (DR) layer monitors the probability $p$ generated by the ERC. If $p$ falls below a predefined threshold $ heta$, the sample is rejected immediately. This mechanism ensures that deeper, more computationally expensive layers focus exclusively on "hard" samples, effectively specializing the network's filters for complex face patterns and difficult non-face distractors.

Contextual Learning via Body Part Sensitivity

To improve detection under heavy occlusion, the framework utilizes a two-stream architecture consisting of a Face CNN and a Body CNN. Simply expanding the receptive field to include context can often introduce noise if the body itself is occluded. To mitigate this, the authors implement Body Part Sensitive Learning (BPSL). The body stream includes a deconvolutional layer that predicts "body part score maps" (identifying regions like the shoulders or chest). This forces the network to learn a structural understanding of the human body, ensuring that contextual information is only utilized when it is valid and present.

Experimental Evaluation

The model was trained using the WIDER FACE dataset for primary detection and the COCO dataset for body part keypoints. Evaluation on the FDDB and WIDER FACE benchmarks demonstrated that the framework achieves state-of-the-art accuracy, particularly on the "Hard" subset of WIDER FACE, where contextual information is most critical.

Performance and Efficiency

A key finding of the study is the impact of the rejection threshold $ heta$. Setting $ heta = 0$ makes the architecture behave like a Deeply Supervised Network. However, increasing $ heta$ to a small positive value (e.g., 0.01) actually improves classification accuracy by allowing deeper layers to specialize on difficult cases while rejecting nearly 70% of negative samples early.

Classification accuracy as a function of the rejection threshold $\theta$, demonstrating that early rejection can optimize model specialization.

In terms of speed, the optimized data flow allows the model to run at 40 FPS on a Titan Black GPU and 12 FPS on a CPU, making it suitable for real-time applications.

Conclusion

The Inside Cascaded Contextual CNN successfully unifies the efficiency of cascaded architectures with the representational power of deep contextual networks. By specializing internal layers through data routing and enforcing structural body context through score maps, the model provides a robust solution for face detection in complex, real-world scenes. Future work may involve optimizing the implementation in C++ to further enhance inference speeds and applying the "Inside Cascade" logic to other object detection domains such as pedestrian or vehicle tracking.

Summary updated

BibTeX
@inproceedings{zhang2017detecting,
  author = {Kaipeng Zhang and Zhanpeng Zhang and Hao Wang and Zhifeng Li and Yu Qiao and Wei Liu},
  title = {{Detecting Faces Using Inside Cascaded Contextual CNN}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2017},
  doi = {10.1109/iccv.2017.344},
}
Figure