Skip to content

AlirezaBaqery/GAN-Flower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GAN Flower

In this project, we want to produce images of flowers using a DCGAN (Deep Convolutional Generative Adversarial Network) model. For this purpose, we use the tf_flower dataset, the link of which is given below.

https://www.tensorflow.org/datasets/catalog/tf_flowers

Table of Contents

About the Project

Generative Adversarial Networks (GANs) are one of the most interesting ideas in computer science today. Two models are trained simultaneously by an adversarial process. A generator ("the artist") learns to create images that look real, while a discriminator ("the art critic") learns to tell real images apart from fakes.

During training, the generator progressively becomes better at creating images that look real, while the discriminator becomes better at telling them apart. The process reaches equilibrium when the discriminator can no longer distinguish real images from fakes.

Built With

The following libraries are used in this project.

  • Python 3.8.10
  • Keras 2.11.0
  • Tensorflow 2.11.0
  • Jupyter Notebook

How To Run

Install Requirements

  • If you want to run the project on your local machine, follow the steps below:
  1. It is recommended to create a conda environment. conda create -n [your-env-name] python=3.8
  2. Go to the project directory
  3. Install requirements by running pip install -r requirements.txt
  • If you want to run the project on Google Colab, Run the following codes to install the required libraries to generate the gif file:
!pip install imageio
!pip install git+https://github.com/tensorflow/docs

Run Code

Run the cells of the "GAN_Flower.ipynb" file in order to generate the flower images and train the implemented GAN model.

Please read the "GAN_Flower_Report_fa.pdf" file in the report folder before running the code to familiarize with the implemented model.

Note that in order to download the latest checkpoint and restore the trained model, you must download it using the link in the ckpt-10.txt file in the model_checkpoints folder. (GitHub does not allow uploading files larger than 100 MB!)

Result

Flower images generated by the implemented DCGAN model:

dcgan

License

This project is licensed under the MIT License.

Contact

If you have any questions about the implementation of the project, you can send your questions to this email: [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published