Downloads · 30 days
0
trupti123/gan_generative_adversial_networks
gan_generative_adversial_networks is a machine learning model from trupti123. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This project demonstrates the use of a Generative Adversarial Network (GAN) to generate diverse textures for fashion items using the Fashion-MNIST dataset. GANs consist of a Generator and a Discriminator that compete…
Downloads · 30 days
0
Access
Public
Updated Nov 7, 2024
Repo size
—
Likes
1
Public
Click a slice to open those files.
.ipynb209 KB · 59%
From the Hugging Face model README
This project demonstrates the use of a Generative Adversarial Network (GAN) to generate diverse textures for fashion items using the Fashion-MNIST dataset. GANs consist of a Generator and a Discriminator that compete with each other, resulting in realistic generated images. The generator creates new textures, while the discriminator attempts to distinguish between real and generated images.
GenAI_project.ipynb - Main code for training the GAN.generated_images/ - Folder where generated sample images from each epoch will be saved.final_generated_images.png - Sample of generated images after the last training epoch.README.md - Project documentation.Install the required libraries before running the project:
pip install torch torchvision transformers datasets matplotlib
The Fashion-MNIST dataset, hosted on Hugging Face, contains grayscale images of 10 classes of clothing items. For this project:
The dataset is automatically loaded from Hugging Face's dataset repository.
Generator:
z) of size 100 as input.Tanh activation for the output, resulting in values between [-1, 1].Discriminator:
Loading Data:
Training Loop:
Logging and Saving:
After training, the GAN generates images similar to Fashion-MNIST textures. These images demonstrate the generator's ability to create diverse fashion patterns.
This will:
generated_images/ after every 5 epochs.final_generated_images.png.