Skip to content

Fodark/anonygan

Repository files navigation

License CC BY-NC-SA 4.0 Python 3.6 Packagist

Contents

AnonyGAN

| Paper |
Graph-based Generative Face Anonymisation with Pose Preservation
Nicola Dall'Asen12, Yiming Wang3, Hao Tang4, Luca Zanella3, Elisa Ricci23.
1University of Pisa, Italy, 2University of Trento, Italy, 3Fondazione Bruno Kessler, Italy, 4ETH Zürich, Switzerland.
In ICIAP 2021.
The repository offers the official implementation of our paper in PyTorch.

Installation

Clone this repo.

git clone git@github.com:Fodark/anonygan.git
cd anonygan/

Needed libraries are provided in the requirements.txt file.

pip install -r requirements.txt should suffice.

Dataset Preparation

  • Download aligned CelebA here
  • Extract aligned version
  • Compute landmarks and mask with the code provided in preparation (modify paths accordingly)

Generating Images Using Pretrained Model

  • Download pretrained model here
  • Place it in ckpts/anonygan.ckpt
  • Preprocess your images with the files in preparation
  • Prepare a .csv files with columns [from, to] with condition and source images names
  • Run test.sh modifying paths accordingly

Train and Test New Models

  • Same as using the pretrained model, for training modify train.sh accordingly

Evaluation

evaluation/automatic_evaluation is the entry point, modify paths accordingly

Acknowledgments

Graph reasoning inspired by BiGraphGAN

Citation

If you use this code for your research, please consider giving a star and citing our paper!

@inproceedings{dallasen2021anonygan,
  title={Graph-based Generative Face Anonymisation with Pose Preservation},
  author={Dall'Asen, Nicola and Wang, Yiming and Tang, Hao and Zanella, Luca and Ricci, Elisa},
  booktitle={International Conference on Image analysis and Processing},
  year={2021}
}

Contributions

If you have any questions/comments/bug reports, feel free to open a github issue or pull a request or e-mail to the author Nicola Dall'Asen (nicola.dallasen@phd.unipi.it).

About

Official PyTorch implementation of the paper "Graph-based Generative Face Anonymisation with Pose Preservation" in ICIAP 2021

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published