This is the reference implementation of the dating experiments from the updated version of https://arxiv.org/abs/1511.02575:
A Century of Portraits: A Visual Historical Record of American High School Yearbooks
Shiry Ginosar, Kate Rakelly, Sarah M. Sachs, Brian Yin, Crystal Lee, Philipp Krähenbühl and Alexei A. Efros
arXiv: Coming soon!
Contents
src
: net, solver, and data layer specifications to train Yearbook dating modelsyearbook_layers.py
: a Python data layer that loads images and feeds them into a Caffe networksolver.py
: set solver parameters in Pythonnet.py
: NetSpec defines the network architecturesolve.py
: training script
notebooks
: visualize training curves, evaluate trained networks and reproduce paper figuresdata
: data splitscaffe
: the Caffe framework, included as a git submodule pointing to a compatible version
This project is licensed for open non-commercial distribution under the UC Regents license; see LICENSE. Its dependencies, such as Caffe, are subject to their own respective licenses.
Caffe, Python, and Jupyter are necessary for all of the experiments. Any installation or general Caffe inquiries should be directed to the caffe-users mailing list.
- After cloning this repository, do
git submodule init
andgit submodule update
inside the Caffe directory to clone the caffe submodule. - Install Caffe dependencies. See the installation guide and try Caffe through Docker (recommended). Make sure to configure pycaffe, the Caffe Python interface, too.
- Follow Caffe installation instructions to install required Python packages. Miniconda comes with many of the requirements (recommended).
- Install Jupyter, the interface for viewing, executing, and altering the notebooks.
- Configure your
PYTHONPATH
as indicated by the included.envrc
so that this project dir and pycaffe are included. - Download the Yearbook dataset from the project page. Place the women dataset in
data/faces/women/images
and the men dataset indata/faces/men/images
.
If you don't want to train your own model, the Python notebooks can be used for inference with our trained dating models
To train a dating model, download the model weights for VGG-16 pre-trained on ILSVRC and place them in a directory called models
.
Configure training settings in train_example.sh
, then call this script to train a dating network.