DiscoGAN in Pytorch
Study Friendly Implementation of DiscoGAN in Pytorch
More Information: Original Paper
Implemenation based on Official Implementation, but Simplified.
1. Environments
2. Code Description
discogan.py
: Main Code
discogan_test.py
: Test Code after Training
network.py
: Generator and Discriminator
db/download.sh
: DB Downloader (Edges/Shoes/Handbags)
db/download.py
: DB Downloader (Facescrub)
3. Networks and Parameters
3.1 Hyper-Parameters
3.2 Generator Networks (network.py)
3.3 Discriminator Networks (network.py)
4. DB Download
4.1 Edges2Shoes / Edges2Handbags / Handbags2Shoes
./db/download.sh dataset_name
dataset_name can be one of [edges2shoes, edges2handbags]
You can do handbags2shoes using both datasets.
edges2shoes
: 600x500, 1096 for Train, 1098 for Val
edges2handbags
: 256x256, 138567 for Train, 200 for Val
4.2 Facescrubs
python ./db/download.py
This code downloads face image independently. So there are some problems.
After download images 10~20k,
You should remove some broken images MANUALLY. :<
5. Train
5.1 edges2shoes (or handbags)
python discogan.py --task edges2shoes #(or handbags)
5.2 Handbags2Shoes
python discogan.py --task handbags2shoes --starting_rate 0.5
5.3 Facescrubs
python discogan.py --task facescrubs
6. Test
After finish training, saved models are in the ./models
directory.
python discogan_test.py --task taskname --num_epochs N --batctSize M
Test results will be saved in ./test_result
7. Results
[Input A | A to B | A to B to A]
[Input B | B to A | B to A to B]
Edges to Shoes, Shoes to Edges (20 Epochs)
Handbags to Shoes, Shoes to Handbags (30 Epochs)
Face: Men to Women, Women to Men (150 Epochs)