Skip to content

WeizmannVision/DropTheGAN

Repository files navigation

Drop The GAN:
In Defense of Patches Nearest Neighbors as Single Image Generative Models

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).

A few examples of Drop the GAN applications.

Setup

Please create environment as follows:

conda create -f environment.yml

Run

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

Parameters

  • 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, or cpu for CPU)2.

Footnotes

  1. A fixed set of parameters was used for the quantitative experiments in the paper.

  2. The runtime reported in the paper (2 seconds per generation) is for 250x180 images, running the generation application on a Tesla-V100 GPU.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published