Skip to content
Learning Facial Action Units from Web Images with Scalable Weakly Supervised Clustering (CVPR18)
Branch: master
Clone or download
Kaili Zhao
Kaili Zhao Update
Latest commit b723969 Jul 23, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Init commit Jul 23, 2018
func Fix output directory Jul 23, 2018
images Init commit Jul 23, 2018 Update Jul 23, 2018
addpaths.m Init commit Jul 23, 2018
demo_toy.m Init commit Jul 23, 2018


This repository provides the Matlab implementation for the CVPR18 paper, "Learning Facial Action Units From Web Images With Scalable Weakly Supervised Clustering". This code has two goals:

  1. Learn a weakly-supervised spectral embedding (WSE), which considers the coherence between visual similarity and weak annotations (Sec 3.1 in the paper).

  2. Re-annotate noisy images using rank-order clustering and majority voting (Sec 3.2 in the paper). We also provide uMQI metric to automatically determine the number of clusters. This part will be released soon.


We use the FLANN library to compute K nearest neighbors to construct the affinity matrix for WSE and rank-order clustering. Before using this code, please download FLANN library and add the path to addpaths.m.

Getting started

To run the toy demo (as Fig. 2 in the paper). Run the command in Matlab:

>> demo_toy

Then you should be able to see the results from the classical clustering problem: demo_toy

More info

  • Contact: Please send comments or bugs to Kaili Zhao (
  • Citation: If you use this code in your paper, please cite the following:
  title={Learning Facial Action Units From Web Images With Scalable Weakly Supervised Clustering},
  author={Zhao, Kaili and Chu, Wen-Sheng and Martinez, Aleix M.},
  booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition},
You can’t perform that action at this time.