Anime Face Generation
TODO
● Train your own anime face generator using Generative Adversarial Networks.
|
Dataset |
Crypko
https://crypko.ai/#
Data Collections
●
Thanks to Arvin Liu for collecting this dataset.
Data Format
- ● The download link is in the sample code.
- ● Unzip cripko_data.zip, the data format is as below:
- ● faces/
○ 0.jpg○ 1.jpg ○…
- ● Total 71314 .jpg files in a folder.
- ● DO NOT use any extra data and
pretrained models.
|
Submission |
JudgeBoi – Submission Format
● You should generate 1000 images, and name each image <number>.jpg ○ e.g. 1.jpg, 2.jpg, … , 1000.jpg
● Use tar to compress your images, and name the file with .tgz as extension.
○ e.g. images.tgz
- ● The untarred files should not contain the folder.
- ● The compressing code is provided in the sample code.
- ● To create such a compressed file by yourself, follow the 2 steps below:
- ○ cd <the folder containing your generated images>
- ○ tar -zcvf ../images.tgz *.jpg
- ● The folder containing your generated images should only contain 1000 images.
JudgeBoi
- ● 5 submission quota per day, reset at midnight.
- ● Users not in whitelist will have no quota.
- ● Only *.tgz file is allowed, file size should be smaller than 2MB.
- ● The countdown timer on the homepage is for reference only.
- ● We do limit the number of connections and request rate for each ip. If you
cannot access the website temporarily, please wait patiently.
- ● Please do not attempt to attack JudgeBoi, thank you.
- ● Every Wednesday and Saturday from 0:00 to 3:00 is our system
maintenance time. If the website cannot be used during this time, please wait patiently for the completion of the maintenance.
JudgeBoi
- ● Since the evaluation metric in this homework requires GPU computation, the JudgeBoi server cannot serve too many submissions at the same time.
- ● Under normal circumstances, JudgeBoi will complete the evaluation within one minute. If pending conditions are encountered, it may be longer. Please wait patiently after you submit.
- ● However, if you have waited more than two minutes for the progress bar to finish, please refresh the page and try to upload again.
- ● Please DO NOT upload at the last minute; no one knows if you can upload successfully.
NTU Cool
● Upload your code to NTU Cool.
○ TAs will check your code if necessary.
● If you beat the boss baseline in JudgeBoi, you may submit a report named report.pdf to explain the method you use to obtain the extra 0.5 pt.
NTU Cool – Submission Format
● Zip your code and name the compressed file <student_id>_hw6.zip ○ e.g. b06901234_hw6.zip
- ● Do not submit your model checkpoints and the dataset!!!
- ● Do not submit your generated images (images.tgz)!!!
- ● We can only see your last submission before the deadline.
|
Grading |
Evaluation Metrics
● FID (Frechet Inception Distance) score
- ○ We use the FID score as one of the evaluation metrics.
- ○ The FID score assesses the similarity between two datasets of images, which is the lower
the better in this task.
Evaluation Metrics
● AFD (anime face detection) rate
- ○ To detect whether an anime face is in a given image.
- ○ The detection rate is the higher the beter.
Grading (10pt + 0.5pt)
- ● Code 4 pt
- ● Simple Baseline 2 pt
○ FID ≤ 30000 AND AFD ≥ 0.00 ● Medium Baseline 2 pt
○ FID ≤ 11800 AND AFD ≥ 0.43 ● Strong Baseline 1 pt
○ FID ≤ 9300 AND AFD ≥ 0.53 ● Boss Baseline 1 pt
○ FID ≤ 8200 AND AFD ≥ 0.68
● Bonus 0.5 pt
○ Submit a PDF report to explain your method (< 100 words in English) if you beat the Boss
Baseline.
Regulation
- ● Do NOT submit the training data to JudgeBoi directly.
- ● Data Augmentation (shifting, flipping, …,etc.) on training data is allowed,
while it is forbidden to submit these processed images to JudgeBoi.
Regulation (cont’d)
- ● You should NOT plagiarize, if you use any other resource, you should cite it in the reference. (*)
- ● You should NOT modify the generated images manually.
- ● Do NOT share codes or generated images with any living creatures.
- ● Do NOT use any approaches to submit your results more than 5 times
per day.
- ● Do NOT search or use additional data or pre-trained models.
- ● Your final grade x 0.9 if you violate any of the above rules.
- ● Prof. Lee & TAs preserve the rights to change the rules & grades.
(*) Academic Ethics Guidelines for Researchers by the Ministry of Science and Technology
|
Hints |
DCGAN (Sample code)
● Weight initialization ● Generator
○ ConvTranspose + BatchNorm + ReLU ● Discriminator
○ Conv + BatchNorm + LeakyReLU
DCGAN
WGAN-GP
●
Wasserstein GAN (WGAN)
- ○ Remove the last sigmoid layer from the discriminator.
- ○ Do not take the logarithm when calculating the loss.
- ○ Clip the weights of the discriminator to a constant.
- ○ Use RMSProp or SGD as the optimizer.
Gradient penalty (GP)
- ○ Use gradient penalty instead of weight clipping.
- ○ Use Adam instead of RMSProp as the optimizer.
●
WGAN WGAN-GP
Spectral Normalization GAN (SNGAN)
● Discriminator
○ Perform spectral normalization on the weights of each layer.
SNGAN
Baseline Guide
● Simple
○ Random submission
● Medium
- ○ DCGAN + WGAN
- ○ 2~6 hr
● Strong
- ○ DCGAN + SNGAN
- ○ 2~6 hr
● Boss
○ AutoGAN, BigGAN, Progressive GAN, Self-Attention GAN, StyleGAN, StyleGAN2 ○ 6~16 hr
|
Links |
Links
● Colab





