Skip to content

This repository contains our experiments in reproducing Lang et.al's "Explaining in Style: Training a GAN to explain a classifier in StyleSpace".

License

Notifications You must be signed in to change notification settings

irenepap2/Re_StylEx

Repository files navigation

Reproducibility study for "Explaining in Style: Training a GAN to explain a classifier in StyleSpace"

This repository contains our experiments in reproducing Lang et.al's "Explaining in Style: Training a GAN to explain a classifier in StyleSpace".

Original Paper Material: Website GitHub

Requirements

If case you want to run our code locally, you need to activate the following environment in anaconda.

We strongly recommend running both our notebooks in Colab, since this is the environment we used.

conda env create -f environment.yml

Training

To train our implementation of the StylEx model in the PyTorch, run the StylEx.ipynb (inside train folder) notebook:

Open In Colab

Pre-trained Models

To save time we provide our pre-trained models and .py files needed in a .zip file in Google Drive and load them in the following Colab notebook to reproduce our results.

Results

To reproduce the results shown in our paper, run the Att_Find.ipynb notebook:

Open In Colab

Top 4 attributes for the perceived age classifier
drawing


Independent selection strategy - Top-5 detected attributes
drawing


Classification study results
drawing


Verbal description study results
drawing


The files legacy_modified.py and mobilenet_pytorch.py can be used to transfer the original paper's pre-trained models from TensorFlow to Pytorch. For this, the pre-trained models provided in the authors' notebook (GitHub) are needed.

Contributing

All contributions are welcome. All content in this repository is licensed under the MIT license.

License: MIT

About

This repository contains our experiments in reproducing Lang et.al's "Explaining in Style: Training a GAN to explain a classifier in StyleSpace".

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •