README.md
September 28, 2021 ยท View on GitHub
Solving Linear Inverse Problems using GANs
Code for the paper: Solving Linear Inverse Problems Using GAN Priors: An Algorithm with Provable Guarantees.
Requirements
To run this code, you require Python 2.7, Tensorflow 1.0.1 (preferably with GPU support), Scipy and PyPNG.
Instructions
-
Clone the repository, and run all the commands from the parent directory,
pgdgan/. -
Download the datasets with the script*:
$ ./setup/download_data.sh[update] I noticed that the download links for the data and the model no longer works. Since I used the same dataset and model as Bora et al., kindly visit their github repo and follow the updated download instructions from there.
-
To train the DCGAN on celebA from scratch, please visit https://github.com/carpedm20/DCGAN-tensorflow, and follow the instructions. Else, pretrained GAN model is available, courtesy Bora et al. To download it, please run the following script*:
$ ./setup/download_models.shMake sure the model is located at
./models/celebA_64_64/ -
Run following to run the experiment:
$ python ./src/pgdgan.pyYou can also use the script available in
./exp_scripts/
* replicated from https://github.com/AshishBora/csgm .