Accepted to CVPR 2022 (oral)
Niv Granot Ben Feinstein Assaf Shocher Shai Bagon Michal Irani
This is the official repository for "Drop The GAN: In Defense of Patches Nearest Neighbors as Single Image Generative Models" (paper, project page).
Please create environment as follows:
conda create -f environment.yml
To run the code, please do as follows:
conda activate dropthegan
python main.py <application> [<options>]
For example:
python main.py generation \
--input-path="data/generation/balloons.png" \
--output-path="out/generation/balloons.png"
You can list the applications by running:
python main.py --help
and to list the options for a given application by:
python main.py <application> --help
- Consider tuning parameters such as pyramid depth, alpha (i.e., completeness level), and noise standard-deviation for optimal results1.
- By default, the first GPU in the machine will be used, unless there are no GPUs and then it will run on CPU. You can override this default by providing the
--device
flag (cuda:X
for GPU #X, orcpu
for CPU)2.