gunicorn main:app --bind=[ip์ฃผ์]:[ํฌํธ๋ฒํธ] -w [worker process ์] -k sync
worker process ์๋ ์คํํ๋ ๋จธ์ ์ ๋ฌผ๋ฆฌ์ ์ฝ์ด์์ ๋ง๊ฒ ์ค์ ํ๋๊ฒ ์ข๋ค.
pip install -r requirements.txt
conda activate stargan
python main.py
StarGAN v2: Diverse Image Synthesis for Multiple Domains
Yunjey Choi*, Youngjung Uh*, Jaejun Yoo*, Jung-Woo Ha
In CVPR 2020. (* indicates equal contribution)
Paper: https://arxiv.org/abs/1912.01865
Video: https://youtu.be/0EVh5Ki4dIY
Abstract: A good image-to-image translation model should learn a mapping between different visual domains while satisfying the following properties: 1) diversity of generated images and 2) scalability over multiple domains. Existing methods address either of the issues, having limited diversity or multiple models for all domains. We propose StarGAN v2, a single framework that tackles both and shows significantly improved results over the baselines. Experiments on CelebA-HQ and a new animal faces dataset (AFHQ) validate our superiority in terms of visual quality, diversity, and scalability. To better assess image-to-image translation models, we release AFHQ, high-quality animal faces with large inter- and intra-domain variations. The code, pre-trained models, and dataset are available at clovaai/stargan-v2.
The TensorFlow implementation of StarGAN v2 by our team member junho can be found at clovaai/stargan-v2-tensorflow.
Install the dependencies:
conda create -n stargan-v2 python=3.6.7
conda activate stargan-v2
conda install -y pytorch=1.4.0 torchvision=0.5.0 cudatoolkit=10.0 -c pytorch
conda install x264=='1!152.20180717' ffmpeg=4.0.2 -c conda-forge
pip install opencv-python==4.1.2.30 ffmpeg-python==0.2.0 scikit-image==0.16.2
pip install pillow==7.0.0 scipy==1.2.1 tqdm==4.43.0 munch==2.5.0
We provide a script to download datasets used in StarGAN v2 and the corresponding pre-trained networks. The datasets and network checkpoints will be downloaded and stored in the data
and expr/checkpoints
directories, respectively.
CelebA-HQ. To download the CelebA-HQ dataset and the pre-trained network, run the following commands:
bash download.sh wing
To train StarGAN v2 from scratch, run the following commands. Generated images and network checkpoints will be stored in the expr/samples
and expr/checkpoints
directories, respectively. Training takes about three days on a single Tesla V100 GPU. Please see here for training arguments and a description of them.