All Projects → VITA-Group → AGD

VITA-Group / AGD

Licence: MIT license
[ICML2020] "AutoGAN-Distiller: Searching to Compress Generative Adversarial Networks" by Yonggan Fu, Wuyang Chen, Haotao Wang, Haoran Li, Yingyan Lin, Zhangyang Wang

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to AGD

torchprune
A research library for pytorch-based neural network pruning, compression, and more.
Stars: ✭ 133 (+35.71%)
Mutual labels:  compression, neural-architecture-search
deep-learning-roadmap
my own deep learning mastery roadmap
Stars: ✭ 40 (-59.18%)
Mutual labels:  generative-adversarial-network, neural-architecture-search
SDGym
Benchmarking synthetic data generation methods.
Stars: ✭ 177 (+80.61%)
Mutual labels:  generative-adversarial-network
Cross-Domain-Image-Translation-Using-CycleGAN
CycleGAN based neural network architecture to change the gender of a person’s face
Stars: ✭ 15 (-84.69%)
Mutual labels:  generative-adversarial-network
DeepEcho
Synthetic Data Generation for mixed-type, multivariate time series.
Stars: ✭ 44 (-55.1%)
Mutual labels:  generative-adversarial-network
salvador
A free, open-source compressor for the ZX0 format
Stars: ✭ 35 (-64.29%)
Mutual labels:  compression
supersnappy
Dependency-free and performant Nim Snappy implementation.
Stars: ✭ 55 (-43.88%)
Mutual labels:  compression
bristol
Parallel random matrix tools and complexity for deep learning
Stars: ✭ 25 (-74.49%)
Mutual labels:  neural-architecture-search
Articles-Bookmarked
No description or website provided.
Stars: ✭ 30 (-69.39%)
Mutual labels:  generative-adversarial-network
GraphCNN-GAN
Graph-convolutional GAN for point cloud generation. Code from ICLR 2019 paper Learning Localized Generative Models for 3D Point Clouds via Graph Convolution
Stars: ✭ 50 (-48.98%)
Mutual labels:  generative-adversarial-network
adversarial-networks
Material de la charla "The bad guys in AI - atacando sistemas de machine learning"
Stars: ✭ 15 (-84.69%)
Mutual labels:  generative-adversarial-network
TranscodingStreams.jl
Simple, consistent interfaces for any codec.
Stars: ✭ 71 (-27.55%)
Mutual labels:  compression
compressstream-explainer
Compression Streams Explained
Stars: ✭ 22 (-77.55%)
Mutual labels:  compression
Neural-Architecture-Search
This repo is about NAS
Stars: ✭ 26 (-73.47%)
Mutual labels:  neural-architecture-search
AutoSTR
H. Zhang, Q. Yao, M. Yang, Y. Xu, X. Bai. AutoSTR: Efficient Backbone Search for Scene Text Recognition. European Conference on Computer Vision (ECCV). 2020.
Stars: ✭ 77 (-21.43%)
Mutual labels:  neural-architecture-search
MGARD
MGARD: MultiGrid Adaptive Reduction of Data
Stars: ✭ 16 (-83.67%)
Mutual labels:  compression
DUN
Code for "Depth Uncertainty in Neural Networks" (https://arxiv.org/abs/2006.08437)
Stars: ✭ 65 (-33.67%)
Mutual labels:  neural-architecture-search
VszLib
7-zip VB6 Helper
Stars: ✭ 35 (-64.29%)
Mutual labels:  compression
SSVEP-Neural-Generative-Models
Code to accompany our International Joint Conference on Neural Networks (IJCNN) paper entitled - Simulating Brain Signals: Creating Synthetic EEG Data via Neural-Based Generative Models for Improved SSVEP Classification
Stars: ✭ 37 (-62.24%)
Mutual labels:  generative-adversarial-network
charls
CharLS, a C++ JPEG-LS library implementation
Stars: ✭ 134 (+36.73%)
Mutual labels:  compression

AutoGAN-Distiller: Searching to Compress Generative Adversarial Networks

Yonggan Fu, Wuyang Chen, Haotao Wang, Haoran Li, Yingyan Lin, Zhangyang Wang

Accepted at ICML 2020 [Paper Link].

Overview

We propose AutoGAN-Distiller (AGD) Framework, among the first AutoML frameworks dedicated to GAN compression, and is also among a few earliest works that explore AutoML for GANs.

Method

  • AGD is established on a specifically designed search space of efficient generator building blocks, leveraging knowledge from state-of-the-art GANs for different tasks.
  • It performs differentiable neural architecture search under the target compression ratio (computational resource constraint), which preserves the original GAN generation quality via the guidance of knowledge distillation.
  • We demonstrate AGD on two representative mobile-based GAN applications: unpaired image translation (using a CycleGAN), and super resolution (using an encoder-decoder GAN).

Visualization Results

Unpaired image translation:

unpair-image-translation

Super Resolution:

super-resolution

Datasets

Unpaired Image Translation

horse2zebra, zebra2horse, summer2winter, winter2summer: Unpaired-dataset

Super Resolution

Training (DIV2K+Flickr2K): SR-training-dataset

Evaluation (Set5, Set14, BSD100, Urban100): SR-eval-dataset

Usage

Overview

AGD_ST and AGD_SR are the source codes for unpaired image translation task and super resolution task respectively. The codes for pretrain, search, train from scratch and eval are in the AGD_ST/search and AGD_SR/search directory.

We use AGD_ST/search as an example. All the configurations during pretrain, search, train from scratch, eval are in config_search.py, config_train.py and config_eval.py respectively. Please specify the target dataset C.dataset and change the dataset path C.dataset_path in the three config files to the real paths on your PC.

Prerequisites

See env.yml for the complete conda environment. Create a new conda environment:

conda env create -f env.yml
conda activate pytorch

In partiqular, if the thop package encounters some version conflicts, please specify the thop version:

pip install thop==0.0.31.post1912272122

Step 1: Pretrain the Supernet

  • Switch to the search directory:
cd AGD_ST/search
  • Set C.pretrain = True in config_search.py.

  • Start to pretrain:

python train_search.py

The checkpoints during pretraining are saved at ./ckpt/pretrain.

Step 2: Search

  • Set C.pretrain = 'ckpt/pretrain' in config_search.py.

  • Start to search:

python train_search.py

Step 3: Train the derived network from scratch

  • Set C.load_path = 'ckpt/search' in config_train.py.

  • Start to train from scratch:

python train.py

Step 4: Eval

  • Set C.load_path = 'ckpt/search' and C.ckpt = 'ckpt/finetune/weights.pt' in config_eval.py.
  • Start to evaluate on the testing dataset:
python eval.py

The result images are saved at ./output/eval/.

Two differences in Super Resolution tasks

1st Difference

Please download the checkpoint of original ESRGAN (teacher model) from pretrained ESRGAN and move it to the directory AGD_SR/search/ESRGAN/.

2nd Difference

The step 3 is splitted into two steps, i.e., first pretrain the derived architecture with only content loss and then finetune with perceptual loss:

  • Pretrain: Set C.pretrain = True in config_train.py.

  • Finetune: Set C.pretrain = 'ckpt/finetune_pretrain/weights.pt' in config_train.py.

Pretrained Models

Pretrained models are provided at pretrained AGD.

To evaluate the pretrained models, please copy the network architecture definition and pretrained weights to the corresponding directories:

cp arch.pt ckpt/search/
cp weights.pt ckpt/finetune/

then do the evaluation following step 4.

Our Related Work

Please also check our concurrent work on a unified optimization framework combining model distillation, channel pruning and quantization for GAN compression:

Haotao Wang, Shupeng Gui, Haichuan Yang, Ji Liu, and Zhangyang Wang. "All-in-One GAN Compression by Unified Optimization." ECCV, 2020. (Spotlight) [pdf] [code]

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].