FUN is the best! It's always thrilling.
Since the purpose of the project was to give pleasure to my friends, I needed a model that was appropriate to Koreans. So I collected Korean Celebrities Images as Dataset. I crawled images with Selenium and used Face Recognition to crop the face in the images.
Man : 3667 Images
Woman : 4272 Images
You can install this repository using git clone
git clone https://github.com/myoons/CycleGAN-Gender-Changer.git
Download the dataset from Google Drive
Then build the dataset by setting up the following the directory structure.
├── datasets
| ├── <dataset_name> # i.e. genderchange
| | ├── train # Training
| | | ├── A # Contains domain A images (i.e. Man)
| | | └── B # Contains domain B images (i.e. Woman)
| | └── test # Testing
| | | ├── A # Contains domain A images (i.e. Man)
| | | └── B # Contains domain B images (i.e. Woman)
python train.py --dataroot datasets/<dataset_name> --cuda
This command will start a training session using the images under the dataroot/train directory with the hyperparameters that showed best results according to CycleGAN authors.
If you don't own a GPU remove the --cuda option, although I advise you to get one!
tensorboard --logdir ./logs
You can watch your experiments' progress by runing tensorboard
* Default : 400
* Type : Int
* Default : 10
* Type : Int
* Default : 256
* Type : Int
* Default : Input as Arugment
* Type : Str
* Default : 3
* Type : Int
* Foreign_Crawling : Crawling foreign person images
* Format_Change : PNG2JPG & File Renaming
* Korean_Crawling : Crawling Korean Celebrities images
* chromedriver : Selenium Chrome Driver
* face_detector : Croping face from images
* discriminator : Discriminator model
* generator : Generator Model
* utils : training utils
1. Paper
2. Base Code
3. Face Recognition
4. Project Description
5. CycleGAN Home Page
6. CycleGAN Description Video