GAN Deep Learning CUDA

GAN Anime
Face Generator

Generating Anime Art using GANs. This project implements DCGAN and CGAN to generate anime faces. DCGAN creates random faces, while CGAN generates faces conditioned on hair and eye color. Both models are trained on the Anime Face Dataset and integrated into a Streamlit app for real-time interactive generation.

Project Overview

This project focuses on generating realistic images using Generative Adversarial Networks (GANs). The system implements two different GAN architectures: Deep Convolutional GAN (DCGAN) and Conditional GAN (CGAN) to generate images automatically. The goal of the project is to explore how generative deep learning models can learn patterns from datasets and create new synthetic images that resemble the original data.

The DCGAN model is used to generate artistic images by learning visual patterns from a dataset of art-style images. The generator network learns to create new images from random noise, while the discriminator network learns to distinguish between real and generated images. Through adversarial training, the generator gradually improves and produces visually realistic images.

The CGAN model extends this concept by allowing users to control the generated output using conditions. In this project, the conditions include hair color and eye color of anime characters. By selecting these attributes, the model generates anime faces that match the chosen features. A Streamlit-based user interface was developed to allow interactive image generation.

Key Features

  • Implementation of DCGAN for art-style image generation
  • Implementation of Conditional GAN (CGAN) for controlled anime face generation
  • Ability to generate images based on user-defined attributes such as hair and eye color
  • Interactive Streamlit web interface for generating images
  • Image generation using latent noise vectors
  • Model training using deep convolutional neural networks
  • Support for multiple GAN models in a single application
  • Real-time image visualization within the UI
  • Efficient model loading using Streamlit caching

Technical Approach

The project begins with preparing the anime image dataset and extracting relevant labels such as hair color and eye color from metadata. Images are resized and normalized to make them suitable for deep learning training. These labels are converted into one-hot encoded condition vectors, which are used by the Conditional GAN during training.

The DCGAN architecture consists of a generator and a discriminator built using convolutional layers. The generator takes random noise as input and uses transposed convolution layers to generate images. The discriminator uses convolutional layers to classify images as real or fake. Both networks are trained together in an adversarial process where the generator tries to fool the discriminator.

For the Conditional GAN, additional information (hair color and eye color) is introduced as a condition vector. The generator receives both noise and condition input, enabling it to produce images that match the specified attributes. A Streamlit application integrates both DCGAN and CGAN models, allowing users to select the model type and generate images interactively through a web interface.