Skip to content

FashionGAN utilizes Generative Adversarial Networks (GANs) and TensorFlow to create hyper-realistic fashion images, combining AI techniques with diverse style elements. This innovative approach aims to revolutionize the fashion industry by empowering users to explore new frontiers of creativity and expressiveness.

Notifications You must be signed in to change notification settings

Nargesmohammadi/Fashion-Gan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A-Generative-Adversarial-Neural-Network

Fashion GAN is a Python code repository that implements a Generative Adversarial Network (GAN) for generating fashion images using TensorFlow. GANs are a type of deep learning model composed of two competing networks: a generator and a discriminator. The generator learns to create realistic images, while the discriminator learns to distinguish between real and generated images. This adversarial training process leads to the generation of high-quality images.

## Installation

 Install the required dependencies:

```bash
pip install tensorflow tensorflow_datasets matplotlib

Usage

  1. Import the required libraries:
import tensorflow as tf
import tensorflow_datasets as tfds
import numpy as np
from matplotlib import pyplot as plt
  1. Set up GPU memory growth:
gpus = tf.config.experimental.list_physical_devices('GPU')
for gpu in gpus:
    tf.config.experimental.set_memory_growth(gpu, True)
  1. Load the Fashion MNIST dataset:
ds = tfds.load('fashion_mnist', split='train')
  1. Perform data transformations:
def scale_images(data): 
    image = data['image']
    return image / 255

ds = ds.map(scale_images)
  1. Build the generator model:
def build_generator():
    # Model architecture here

generator = build_generator()
  1. Build the discriminator model:
def build_discriminator():
    # Model architecture here

discriminator = build_discriminator()
  1. Train the FashionGAN model:
class FashionGAN(Model):
    # Model implementation here

fashgan = FashionGAN(generator, discriminator)
fashgan.compile(g_opt, d_opt, g_loss, d_loss)
hist = fashgan.fit(ds, epochs=20, callbacks=[ModelMonitor()])
  1. Generate images using the trained generator:
imgs = generator.predict(tf.random.normal((16, 128, 1)))

About

FashionGAN utilizes Generative Adversarial Networks (GANs) and TensorFlow to create hyper-realistic fashion images, combining AI techniques with diverse style elements. This innovative approach aims to revolutionize the fashion industry by empowering users to explore new frontiers of creativity and expressiveness.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published