Code to reproduce results from the paper "AmbientGAN: Generative models from lossy measurements"

Overview

AmbientGAN: Generative models from lossy measurements

This repository provides code to reproduce results from the paper AmbientGAN: Generative models from lossy measurements.

The training setup is as in the following diagram:

Here are a few example results:

Measured Baseline AmbientGAN (ours)

Few more samples from AmbientGAN models trained with 1-D projections:

Pad-Rotate-Project Pad-Rotate-Project-theta

The rest of the README describes how to reproduce the results.

Requirements

  • Python 2.7
  • Tensorflow >= 1.4.0
  • matplotlib
  • scipy
  • numpy
  • cvxpy
  • scikit-learn
  • tqdm
  • opencv-python
  • pandas

For pip installation, use $ pip install -r requirements.txt

Get the data

  • MNIST data is automatically downloaded
  • Get the celebA dataset here and put the jpeg files in ./data/celebA/
  • Get the CIFAR-10 python data from here and put it in ./data/cifar10/cifar-10-batches-py/*

Get inference models

We need inference models for computing the inception score.

  • For MNIST, you can train your own by

    cd ./src/mnist/inf
    python train.py
    

    [TODO]: Provide a pretrained model.

  • Inception model for use with CIFAR-10 is automatically downloaded.

Create experiment scripts

Run ./create_scripts/create_scripts.sh

This will create scripts for all the experiments in the paper.

[Optional] If you want to run only a subset of experiments you can define the grid in ./create_scripts/DATASET_NAME/grid_*.sh or if you wish to tweak a lot of parameters, you can change ./create_scripts/DATASET_NAME/base_script.sh. Then run ./create_scripts/create_scripts.sh as above to create the corresponding scripts (remember to remove any previous files from ./scripts/)

Run experiments

We provide scripts to train on multiple GPUs in parallel. For example, if you wish to use 4 GPUs, you can run: ./run_scripts/run_sequentially_parallel.sh "0 1 2 3"

This will start 4 GNU screens. Each program within the screen will attempt to acquire and run experiments from ./scripts/, one at a time. Each experiment run will save samples, checkpoints, etc. to ./results/.

See results as you train

Samples

You can see samples for each experiment in ./results/samples/EXPT_DIR/

EXPT_DIR is defined based on the hyperparameters of the experiment. See ./src/commons/dir_def.py to see how this is done.

Quantitative plots

Run

python src/aggregator_mnist.py
python src/aggregator_cifar.py

This will create pickle files in ./results/ with the relevant data in a Pandas dataframe.

Now use the ipython notebooks ./plotting_mnist.ipynb and ./plotting_cifar.ipynb to get the relevant plots. The generated plots are also saved to ./results/plots/ (make sure this directory exists)

Owner
Ashish Bora
Ashish Bora
Training, generation, and analysis code for Learning Particle Physics by Example: Location-Aware Generative Adversarial Networks for Physics

Location-Aware Generative Adversarial Networks (LAGAN) for Physics Synthesis This repository contains all the code used in L. de Oliveira (@lukedeo),

Deep Learning for HEP 57 Oct 22, 2022
SAPIEN Manipulation Skill Benchmark

ManiSkill Benchmark SAPIEN Manipulation Skill Benchmark (abbreviated as ManiSkill, pronounced as "Many Skill") is a large-scale learning-from-demonstr

Hao Su's Lab, UCSD 107 Jan 08, 2023
:hot_pepper: R²SQL: "Dynamic Hybrid Relation Network for Cross-Domain Context-Dependent Semantic Parsing." (AAAI 2021)

R²SQL The PyTorch implementation of paper Dynamic Hybrid Relation Network for Cross-Domain Context-Dependent Semantic Parsing. (AAAI 2021) Requirement

huybery 60 Dec 31, 2022
Custom implementation of Corrleation Module

Pytorch Correlation module this is a custom C++/Cuda implementation of Correlation module, used e.g. in FlowNetC This tutorial was used as a basis for

Clément Pinard 361 Dec 12, 2022
Novel Instances Mining with Pseudo-Margin Evaluation for Few-Shot Object Detection

Novel Instances Mining with Pseudo-Margin Evaluation for Few-Shot Object Detection (NimPme) The official implementation of Novel Instances Mining with

12 Sep 08, 2022
Converts given image (png, jpg, etc) to amogus gif.

Image to Amogus Converter Converts given image (.png, .jpg, etc) to an amogus gif! Usage Place image in the /target/ folder (or anywhere realistically

Hank Magan 1 Nov 24, 2021
SberSwap Video Swap base on deep learning

SberSwap Video Swap base on deep learning

Sber AI 431 Jan 03, 2023
Semi-supevised Semantic Segmentation with High- and Low-level Consistency

Semi-supevised Semantic Segmentation with High- and Low-level Consistency This Pytorch repository contains the code for our work Semi-supervised Seman

123 Dec 30, 2022
Solutions and questions for AoC2021. Merry christmas!

Advent of Code 2021 Merry christmas! 🎄 🎅 To get solutions and approximate execution times for implementations, please execute the run.py script in t

Wilhelm Ågren 5 Dec 29, 2022
Pytorch implementation of MixNMatch

MixNMatch: Multifactor Disentanglement and Encoding for Conditional Image Generation [Paper] Yuheng Li, Krishna Kumar Singh, Utkarsh Ojha, Yong Jae Le

910 Dec 30, 2022
Official implementation of NeuralFusion: Online Depth Map Fusion in Latent Space

NeuralFusion This is the official implementation of NeuralFusion: Online Depth Map Fusion in Latent Space. We provide code to train the proposed pipel

53 Jan 01, 2023
As-ViT: Auto-scaling Vision Transformers without Training

As-ViT: Auto-scaling Vision Transformers without Training [PDF] Wuyang Chen, Wei Huang, Xianzhi Du, Xiaodan Song, Zhangyang Wang, Denny Zhou In ICLR 2

VITA 68 Sep 05, 2022
NAS-FCOS: Fast Neural Architecture Search for Object Detection (CVPR 2020)

NAS-FCOS: Fast Neural Architecture Search for Object Detection This project hosts the train and inference code with pretrained model for implementing

Ning Wang 180 Dec 06, 2022
Source code of SIGIR2021 Paper 'One Chatbot Per Person: Creating Personalized Chatbots based on Implicit Profiles'

DHAP Source code of SIGIR2021 Long Paper: One Chatbot Per Person: Creating Personalized Chatbots based on Implicit User Profiles . Preinstallation Fir

ZYMa 32 Dec 06, 2022
A new GCN model for Point Cloud Analyse

Pytorch Implementation of PointNet and PointNet++ This repo is implementation for VA-GCN in pytorch. Classification (ModelNet10/40) Data Preparation D

12 Feb 02, 2022
Official Implementation of Neural Splines

Neural Splines: Fitting 3D Surfaces with Inifinitely-Wide Neural Networks This repository contains the official implementation of the CVPR 2021 (Oral)

Francis Williams 56 Nov 29, 2022
PyTorch implementation of SmoothGrad: removing noise by adding noise.

SmoothGrad implementation in PyTorch PyTorch implementation of SmoothGrad: removing noise by adding noise. Vanilla Gradients SmoothGrad Guided backpro

SSKH 143 Jan 05, 2023
Clockwork Variational Autoencoder

Clockwork Variational Autoencoders (CW-VAE) Vaibhav Saxena, Jimmy Ba, Danijar Hafner If you find this code useful, please reference in your paper: @ar

Vaibhav Saxena 35 Nov 06, 2022
The code repository for "PyCIL: A Python Toolbox for Class-Incremental Learning" in PyTorch.

PyCIL: A Python Toolbox for Class-Incremental Learning Introduction • Methods Reproduced • Reproduced Results • How To Use • License • Acknowledgement

Fu-Yun Wang 258 Dec 31, 2022
HomeAssitant custom integration for dyson

HomeAssistant Custom Integration for Dyson This custom integration is still under development. This is a HA custom integration for dyson. There are se

Xiaonan Shen 232 Dec 31, 2022