Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aakashjhawar/avatargan
Generate Cartoon Images using Generative Adversarial Network
https://github.com/aakashjhawar/avatargan
ai artificial-intelligence avatar avatar-generator deep-learning deep-networks emoji-generator gan gans generate-image generative-adversarial-network generative-ai generative-art image-generation-ai machine-learning neural-networks tensorflow
Last synced: about 1 month ago
JSON representation
Generate Cartoon Images using Generative Adversarial Network
- Host: GitHub
- URL: https://github.com/aakashjhawar/avatargan
- Owner: aakashjhawar
- Created: 2021-05-14T16:20:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-14T12:23:42.000Z (over 1 year ago)
- Last Synced: 2024-05-28T18:53:31.805Z (8 months ago)
- Topics: ai, artificial-intelligence, avatar, avatar-generator, deep-learning, deep-networks, emoji-generator, gan, gans, generate-image, generative-adversarial-network, generative-ai, generative-art, image-generation-ai, machine-learning, neural-networks, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 16 MB
- Stars: 62
- Watchers: 5
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AvatarGAN ✨
_Generate Cartoon Images using [DC-GAN](https://arxiv.org/abs/1511.06434)_
Deep Convolutional GAN is a generative adversarial network architecture. It uses a couple of guidelines, in particular:
- Replacing any pooling layers with strided convolutions (discriminator) and fractional-strided convolutions (generator).
- Using batchnorm in both the generator and the discriminator.
- Removing fully connected hidden layers for deeper architectures.
- Using ReLU activation in generator for all layers except for the output, which uses tanh.
- Using LeakyReLU activation in the discriminator for all layer.Checkout the detailed explanation of AvatarGAN in the article [AvatarGAN](https://aakashjhawar.medium.com/avatargan-generate-cartoon-images-using-gan-1ffe7d33cfbb)
![DCGAN](https://github.com/aakashjhawar/AvatarGAN/blob/master/assets/images/DCGAN.png)
### GAN Model
1. Define Generator and Discriminator network architecture
2. Train the Generator model to generate the fake data that can fool Discriminator
3. Train the Discriminator model to distinguish real vs fake data
4. Continue the training for several epochs and save the Generator model![Model](https://github.com/aakashjhawar/AvatarGAN/blob/master/assets/images/GAN-architecture.png)
### Dataset Setup
[Cartoon Set](https://google.github.io/cartoonset/) which is a collection of random 2D cartoon avatar images.
Download the dataset using the shell script.```
sh download-dataset.sh
```This will download the dataset in `data/` directory.
If you want to train the model in Google Colab, upload the dataset folder to Google Drive. The destination path should be `projects/cartoons/`.### Model Training
Check out the model being trained to generate cartoon images.
![Training](https://github.com/aakashjhawar/AvatarGAN/blob/master/assets/images/GAN-training.gif)### Model Prediction
![Model](https://github.com/aakashjhawar/AvatarGAN/blob/master/assets/images/GAN-output.png)