This project involves using Generative Adversarial Networks (GANs) to generate fashion images. It employs TensorFlow to build and train a GAN model on the Fashion MNIST dataset. The project showcases the construction of both the generator and discriminator models, training these models, and then using the trained generator to produce new, synthetic fashion images.
Before you begin, ensure you meet the following requirements:
- Python 3.8 or higher
- TensorFlow 2.x
- TensorFlow Datasets
- Matplotlib
- Numpy
Follow these steps to get your development environment running:
- Clone the repository:
git clone <repository-url>
- Install the required Python packages:
pip install tensorflow tensorflow_datasets matplotlib numpy
To use this project, follow these steps:
-
Load the dataset and preprocess it:
- Scale the images to a range between 0 and 1.
- Shuffle and batch the dataset for training.
-
Build the neural network models:
- Construct the generator and discriminator models using TensorFlow's Sequential API.
-
Compile and train the GAN:
- Set up loss functions and optimizers for both the generator and discriminator.
- Train the model using custom training loops.
- Monitor the training process and save generated images after each epoch.
-
Generate fashion images:
- Use the trained generator model to produce fashion images.
-
Save and load the generator model for future use.
After training, the generator will be capable of producing images like the ones shown below (example images should be included in the project repository under an images/
directory).
This project was inspired by the TensorFlow and Keras documentation, and the Fashion MNIST dataset provided by Zalando Research.
For help or questions about this project, please contact [Arabambi Akinyemi] at [yemiarabambi@gmail.com].