Factorized-Spatial-Embeddings
February 19, 2019 ยท View on GitHub
Tensorflow implementation of Unsupervised learning of object landmarks by factorized spatial embeddings by Thewlis el al. for unsupervised landmark detection.
Sample results
Test results on LFW with 8 landmarks (K=8, M=4), trained on CelebA dataset for 2 epochs.
Test results on LFW with 16 landmarks (K=16, M=4), trained on CelebA dataset for 2 epochs.

Setup
Prerequisites
- Tensorflow 1.4
Getting Started
First download the CelebA dataset or the UT Zappos50k shoes dataset, extract images and use them to train the model.
# clone this repo
https://github.com/alldbi/Factorized-Spatial-Embeddings.git
cd Factorized-Spatial-Embeddings
# train the model
python main.py \
--mode train \
--input_dir (directory containing CelebA dataset) \
--K 8 \ #number of landmarks to be learned
# test the model
python main.py \
--mode test \
--input_dir (directory containing testing images)
--checkpoint (address of the trained model, which is /OUTPUT as default)
--K 8