All Projects → val-iisc → Nag

val-iisc / Nag

[CVPR 2018] Tensorflow implementation of NAG : Network for Adversary Generation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nag

Adversarial video generation
A TensorFlow Implementation of "Deep Multi-Scale Video Prediction Beyond Mean Square Error" by Mathieu, Couprie & LeCun.
Stars: ✭ 662 (+2658.33%)
Mutual labels:  gan
Instagan
InstaGAN: Instance-aware Image Translation (ICLR 2019)
Stars: ✭ 761 (+3070.83%)
Mutual labels:  gan
Xdf Gan
A GAN for the generation of mock astronomical surveys
Stars: ✭ 17 (-29.17%)
Mutual labels:  gan
Machine Learning
머신러닝 입문자 혹은 스터디를 준비하시는 분들에게 도움이 되고자 만든 repository입니다. (This repository is intented for helping whom are interested in machine learning study)
Stars: ✭ 705 (+2837.5%)
Mutual labels:  gan
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (+3016.67%)
Mutual labels:  gan
Musegan
An AI for Music Generation
Stars: ✭ 794 (+3208.33%)
Mutual labels:  gan
Pggan Pytorch
🔥🔥 PyTorch implementation of "Progressive growing of GANs (PGGAN)" 🔥🔥
Stars: ✭ 653 (+2620.83%)
Mutual labels:  gan
Advanced Deep Learning With Keras
Advanced Deep Learning with Keras, published by Packt
Stars: ✭ 917 (+3720.83%)
Mutual labels:  gan
Anime Inpainting
An application tool of edge-connect, which can do anime inpainting and drawing. 动漫人物图片自动修复,去马赛克,填补,去瑕疵
Stars: ✭ 761 (+3070.83%)
Mutual labels:  gan
Lightning Bolts
Toolbox of models, callbacks, and datasets for AI/ML researchers.
Stars: ✭ 829 (+3354.17%)
Mutual labels:  gan
Fewshot Face Translation Gan
Generative adversarial networks integrating modules from FUNIT and SPADE for face-swapping.
Stars: ✭ 705 (+2837.5%)
Mutual labels:  gan
Adversarialnetspapers
Awesome paper list with code about generative adversarial nets
Stars: ✭ 6,219 (+25812.5%)
Mutual labels:  gan
Generative Models
Collection of generative models, e.g. GAN, VAE in Pytorch and Tensorflow.
Stars: ✭ 6,701 (+27820.83%)
Mutual labels:  gan
Passgan
A Deep Learning Approach for Password Guessing (https://arxiv.org/abs/1709.00440)
Stars: ✭ 704 (+2833.33%)
Mutual labels:  gan
Began Tensorflow
Tensorflow implementation of "BEGAN: Boundary Equilibrium Generative Adversarial Networks"
Stars: ✭ 904 (+3666.67%)
Mutual labels:  gan
Segan
Speech Enhancement Generative Adversarial Network in TensorFlow
Stars: ✭ 661 (+2654.17%)
Mutual labels:  gan
Pytorch Pretrained Biggan
🦋A PyTorch implementation of BigGAN with pretrained weights and conversion scripts.
Stars: ✭ 779 (+3145.83%)
Mutual labels:  gan
Unsupnts
Unsupervised Neural Text Simplification
Stars: ✭ 23 (-4.17%)
Mutual labels:  gan
Csmri Refinement
Code for "Adversarial and Perceptual Refinement Compressed Sensing MRI Reconstruction"
Stars: ✭ 21 (-12.5%)
Mutual labels:  gan
Tensorlayer
Deep Learning and Reinforcement Learning Library for Scientists and Engineers 🔥
Stars: ✭ 6,796 (+28216.67%)
Mutual labels:  gan

NAG - Network for Adversary Generation

Code for the paper NAG - Network for Adversary Generation.

Konda Reddy Mopuri*, Utkarsh Ojha*, Utsav Garg, R. Venkatesh Babu.

CVPR 2018

This work is an attempt to explore the manifold of perturbations that can cause CNN based classifiers to behave absurdly. At present, this repository provides the facility to train the generator that can produce perturbations to fool VGG F, VGG 16, VGG 19, GoogleNet, CaffeNet, ResNet 50, ResNet 152. The generator architecture has been modified from here.

Architecture

Sample perturbations

Generalizability of universal adversarial perturbations

The table below shows the fooling rate achieved for different networks. The rows represent the network for which the perturbation is crafted, and the column indicates the netwrok on which the strength of perturbation is tested. Testing is done on the 50k validation set of ILSVRC.

Dependencies

Python 2.7.1, Tensorflow 1.0.1, h5py

Setting up the dataset

Our major results have been obtained by training our model on a dataset consisting of 10k images, 10 random images from each of the 1000 classes from ILSVRC dataset. Testing has been done on the standard 50k validation images of ILSVRC. To speed up the training and testing of the model, data in .hdf5 format has been used. utilities/ folder provides the relevant scripts to convert a folder of images in a suitable format (.jpg, .png etc.) into a single .hdf5 file.

For example, train_hdf5.py does the necessary pre-processing on a folder of images and creates ilsvrc_train.hdf5 file.

Caution: .hdf5 files created will be of large sizes. ilsvrc_test.hdf5 will be ~30gb.

Training your own generator

Once the .hdf5 files are done, we can begin training the generator for a given classifier. Set the target classifier in classify.py (currently the default network is ResNet 50) from any one of the mentioned networks.

For training the generator, run: python train_generator.py The code saves the evolving perturbations by saving them in running_perturbatin.npy in case one wants to visualize them.

Testing on clean images

Run python uap_generate.py to obtain the perturbations from the saved generator in the form of either .png images or .npy files. Simple add the perturbations to the clean images and test their classification results of clean and corrupted image using classify_image.py. As a word of caution, make sure you set the classifier in classify_image.py according to the loaded checkpoint file in uap_generate.py, unless you want to check the transferability of perturbations.

Sample fooling

Reference

@inproceedings{nag-cvpr-2018,
  title={NAG: Network for Adversary Generation},
  author={Mopuri, Konda Reddy and Ojha, Utkarsh and Garg, Utsav and Babu, R Venkatesh},
 booktitle = {Proceedings of the IEEE Computer Vision and Pattern Recognition ({CVPR})},
 year = {2018}
}

Contact Utkarsh Ojha in case you have any questions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].