Official code for paper "Non-Adversarial Image Synthesis with Generative Latent Nearest Neighbors" by Yedid Hoshen, Ke Li and Jitendra Malik, CVPR'19
This repository contains Python3 implementations of:
- Generative Latent Optimization (GLO)
- Implicit Maximum Likelihood Estimation (IMLE)
- Generative Latent Nearest Neighbors (GLANN)
Install dependencies:
pip install numpy scipy pytorch torchvision python-mnist fbpca faiss
Edit prepare_mnist.py with the correct path to the data.
Prepare a dataset:
python prepare_mnist.py
Train GLO on a particular config:
python train_glo.py configs/mnist.yaml
Train IMLE based on the trained GLO model:
python train_icp.py configs/mnist.yaml
Evaluate the FID of the trained GLANN model:
python test_fid.py configs/mnist.yaml
Please cite [1] if you found the resources in this repository useful.
[1] Y. Hoshen, K. Li, J. Malik, Non-Adversarial Image Synthesis with Generative Latent Nearest Neighbors
@inproceedings{hoshen2019non,
title={Non-Adversarial Image Synthesis with Generative Latent Nearest Neighbors},
author={Hoshen, Yedid and Li, Ke and Malik, Jitendra},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages={5811--5819},
year={2019}
}