bibtex
@inproceedings{upchurch2017deep,
title={{D}eep {F}eature {I}nterpolation for Image Content Changes},
author={Upchurch, Paul and Gardner, Jacob and Pleiss, Geoff and Pless, Robert and Snavely, Noah and Bala, Kavita and Weinberger, Kilian},
booktitle={Computer Vision and Pattern Recognition (CVPR)},
year={2017}
}
## 1.1 Requirements
You will need Linux and at least 9 GB of main memory and a recent GPU with at least 3 GB of memory to transform high-resolution images.
The Caffe and Torch deep learning software should be installed so that `import caffe` and `th` work.
Python packages:
```bash
pip install numpy scikit-image Pillow opencv-python scipy dlib lutorpy execnet torch torchvision protobuf
```
# 2 Demonstrations
## 2.1 Demo1

This script produces six kinds of transformations (older, mouth open, eyes open, smiling, moustache, eyeglasses) on LFW faces.
```bash
python demo1.py
# ~1.3 minutes to reconstruct each image (using 1 Titan-X)
# Total time: 9.0 minutes
```
## 2.2 Demo2
  
This script ages or adds facial hair to a front-facing portrait at resolutions up to 1000x1000.
### Preparing an Images Database
This demo requires a database of high resolution images, which is used to select source and target
images for the transformation. Follow the instructions at
[datasets/facemodel/README.md](datasets/facemodel/README.md) to collect the database.
Our method requires that your database contains at least 400 source/target images that match
the gender and facial expression of the input photo. A warning message will be printed if there
are not enough images.
### Test images
The source of each test image and our test masks are in [datasets/test/](datasets/test/). We find that DFI works well on photographs of natural faces which are: un-occluded, front-facing, and lit by natural or office-environment lighting.
```bash
python demo2.py