- Zhi-Yi Chin: joycenerd.cs09@nycu.edu.tw
- Chieh-Ming Jiang: nax1016.cs10@nycu.edu.tw
This repository is the implementation of final project for 5003 Deep Learning and Practice course in 2021 summer semester at National Yang Ming Chiao Tung University.
In this final project we use GAN steerability as an data augmentation technique. The inspiration is coming from GAN steerability, and GenRep these two papers. In this project, we investigate image transformation by exploring walks in the latent space of GAN. And we conclude that GAN steerability is a better data augmentation technique compare to transformation done in the data space
You can download a copy of all the files in this repository by cloning this repository:
git clone https://github.com/joycenerd/genrep_aug.git
You need to have Anaconda or Miniconda already installed in your environment. To install requirements:
cd GenRep
conda env create -f environment.yml
cd GenRep/utils
python biggan_steer_train.py
cd GenRep/utils
python generate_dataset_biggan_steer.py
cd GenRep/utils
python extract_data.py
cd GenRep/utils
python merge_real_gen.py
cd GenRep
CUDA_VISIBLE_DEVICES=0,1 python main_unified.py --method SupCon --cosine \
--dataset path_to_your_dataset --walk_method my_steer \
--cache_folder your_ckpts_path >> log_train_supcon.txt &
cd GenRep
CUDA_VISIBLE_DEVICES=0,1 python mylinear.py --learning_rate 0.3 \
--ckpt path_to_your_encoder --data_folder path_to_imagenet \
>> log_test_your_model_name.txt &
We thank the authors of these repositories:
If you find our work useful in your project, please cite:
@misc{
title = {Generative Models as a Data Augmentation for Classification},
author = {Zhi-Yi Chin, Chieh-Ming Jiang},
url = {https://github.com/joycenerd/genrep_aug.git},
year = {2021}
}
If you'd like to contribute, or have any suggestions, you can contact us at joycenerd.cs09@nycu.edu.tw or open an issue on this GitHub repository.
All contributions welcome! All content in this repository is licensed under the MIT license.