Constrained Clustering and Its Application to Face Clustering in Videos

Baoyuan Wu, Yifan Zhang, Bao-Gang Hu, Qiang JiCVPR 2013

Introduction

Clustering faces in video sequences—the task of grouping all instances of the same individual without prior labels—presents significant challenges due to extreme variations in lighting, pose, expression, and motion blur. Traditional clustering algorithms often struggle with these high-dimensional, noisy data points. However, video data contains inherent structural information that can be exploited: temporal continuity within a single trajectory (face track) and spatial exclusivity within a single frame. This paper proposes a robust probabilistic framework that incorporates these "must-link" and "cannot-link" constraints into a Hidden Markov Random Field (HMRF) model to improve clustering accuracy and computational efficiency.

Methodology

The core of the proposed approach is a generative model based on Hidden Markov Random Fields (HMRFs). The clustering problem is represented as a graph where nodes correspond to individual faces and edges represent their relationships. The model optimizes a balance between unary potentials (appearance-based likelihood) and pairwise potentials (label consistency). Optimization is performed using a Simulated Field Algorithm, an iterative approach that makes complex probability calculations tractable by updating node states based on their neighbors.

Constraint-Level Smoothness

A key innovation is the use of constraint propagation. Beyond simple visual similarity, the model leverages two types of constraints:

  1. Must-link: Faces detected within the same continuous track are assumed to belong to the same person.
  2. Cannot-link: Two faces appearing in the same video frame must belong to different individuals.
Illustration of must-link and cannot-link constraints in video face tracks.

By propagating these constraints through the similarity graph, the model can infer relationships between distant faces, effectively using sparse labels to guide the global clustering process.

Efficient Sampling Strategy

To address the computational burden of processing thousands of faces in feature-length films, the authors implement a sub-sampling strategy. Instead of clustering every face, a representative subset is sampled from each track. The HMRF model clusters this subset, and the resulting labels are then propagated back to the remaining faces in the track. This significantly reduces processing time without compromising accuracy.

Experimental Setup

The framework was evaluated on two benchmark datasets: BF0502 (derived from the TV show Buffy the Vampire Slayer) and Notting-Hill (from the eponymous film). Both "whole" and "subset" versions of these datasets were used to test the efficiency of the sampling approach.

Statistics of the BF0502 and Notting-Hill datasets used for evaluation.

Results and Discussion

The proposed HMRF-com model demonstrated superior performance compared to standard algorithms like K-means and specialized methods such as ULDML. On the Notting-Hill dataset, HMRF-com achieved an accuracy of 84.39%, compared to 69.16% for K-means and 73.18% for ULDML.

Furthermore, the model exhibited high robustness, showing lower variance in results across different initializations. In terms of efficiency, the sampling framework allowed the model to process the BF0502 dataset in approximately 119 seconds, whereas competing methods required over 400 seconds.

Conclusion

By treating temporal and spatial constraints as primary features, the HMRF-based framework achieves state-of-the-art results in video face clustering. While the model currently requires a pre-defined number of clusters ($K$) and depends on the quality of initial face tracking, it provides a powerful foundation for robust, large-scale video analysis. Future work will focus on automatic cluster number estimation and scaling to web-scale datasets.

Summary updated

BibTeX
@inproceedings{wu2013constrained,
  author = {Baoyuan Wu and Yifan Zhang and Bao-Gang Hu and Qiang Ji},
  title = {{Constrained Clustering and Its Application to Face Clustering in Videos}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2013},
  doi = {10.1109/cvpr.2013.450},
}
Figure