Giter Site home page Giter Site logo

keepgallop / upconv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cc-hpc-itwm/upconv

0.0 1.0 0.0 2.98 MB

Repo for our CVPR Paper: Watch your Up-Convolution: CNN Based Generative Deep Neural Networks areFailing to Reproduce Spectral Distributions

License: GNU General Public License v3.0

Jupyter Notebook 91.50% Python 8.50%

upconv's Introduction

This repository provides the official Python implementation of Watch your Up-Convolution: CNN Based Generative Deep Neural Networks are Failing to Reproduce Spectral Distributions (Paper: https://arxiv.org/abs/2003.01826).

Common up-convolution methods are inducing heavy spectral distortions into generated images. (Left) Statistics (mean and variance) after azimuthal integration over the power-spectrum of real and GAN generated images. (Right) Results of the same experiments as above, adding our proposed spectral loss during GAN training.

Spectral Regularization

Since common generative network architectures are mostly exclusively using image-space based loss functions, it is not possible to capture and correct spectral distortions directly. Hence, we extend existing GAN architectures in two ways:

  • Spectral loss term
  • Replace last last up-convolution unit.

Dependencies

Tested on Python 3.6.x.

Downloading Dataset

Link to download CelebA dataset.

Training Netwroks

Training vanilla models

We train different GAN models using this repo. Then, we employ our Visualization script to analyse the frequency behaviour.

Training Spectral Regularization models

Make the following changes to incorporate the regularizer. Then, train the model.

  • Substitue train.py for train_spectrum.py
  • Substitue module.py for module_spectrum.py

Click here to go the Regularization implementation.

Deepfake detection

Experiments and code for the deepfake detection parts of the paper can be found in the repository of our prior Arxiv pre-print.

Citation

If this work is useful for your research, please cite our paper:

@misc{durall2020upconv,
    title={Watch your Up-Convolution: CNN Based Generative Deep Neural Networks are Failing to Reproduce Spectral Distributions},
    author={Ricard Durall and Margret Keuper and Janis Keuper},
    year={2020},
    eprint={2003.01826},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

upconv's People

Contributors

ricarddurall avatar keuperj avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.