Skip to content
Deep Mixture of Linear Inverse Regressions
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Deep Mixture of Linear Inverse Regressions


This is a Keras implementation of the work : Deep Mixture of Linear Inverse Regressions Applied to Head-Pose Estimation, Stéphane Lathuilière, Rémi Juge, Pablo Mesejo, Rafael Muñoz Salinas, Radu Horaud, CVPR 2017

For more details Project or pdf

Tested with keras 1.1.0 with theano backend and python 2.7.12 Requieres the installation of scikit-learn.

How to run:

trainingAnnotations.txt must contain the list of the training images followed by the targets:

img_name_1.jpg y1 y2 y3
img_name_2.jpg y1 y2 y3 

testAnnotations.txt must contain the list of the test images with the same format

Download the VGG16 weights

Run the following command:

THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32,exception_verbosity='high' python  $rootpathData trainingAnnotations.txt testAnnotations.txt $JOB_ID

where JOB_ID is a job id used to save the network weights. You can give any number. $rootpathData is the path to your dataset folder. The file vgg16_weights.h5 must be moved in the $rootpathData folder.

Synthetic dataset:

You can find the synthetic dataset here.


In the zip file, 4 python scripts are included. The files select*.py are used to down-sample the dataset in order to obtain the desired target distribution as detailed in the paper. We advise you to use the function getlist() of these files to load the data or at least to see how to read the ground truth. The last file ( can be used to display the pose distribution of the dataset.


For any question, please contact Stéphane Lathuilière.

You can’t perform that action at this time.