Skip to content

An implementation of one personal project to gain experience with Generative Adversarial Network models and in particular on Wasserstrein GAN with gradient penalty. The final application's purpose is to generate synthetic images given a food category.

License

Notifications You must be signed in to change notification settings

MrCosta57/food_gan

Repository files navigation


Pytorch logo Fabric logo

Food GAN project

WGAN-GP for conditional food generation!
View Demo · Report Bug · Request Feature

LinkedIn


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage / Demo
  4. Roadmap / Future work
  5. References

About The Project

Product Name Screen Shot

This project refers to the implementation of one personal project for approaching the Generative AI field. The idea is to gain experience with Generative Adversarial Network models and in particular on Wasserstrein GAN with gradient penalty. This variant allows a more stable training procedure, get rids of some problems like mode collapse and provides a meaningful loss function interpretation. The final application's purpose is to generate synthetic images given a food category.
In details the NN architectures and the hyperparameters used are taken from different popular parers cited in References section while instead, the developement is realized with famous frameworks like Pytorch and Lighting Fabric written also in Built With section.

(back to top)

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

  • Pytorch
  • NumPy
  • Pandas
  • Matplotlib
  • Fabric

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

pip install torch torchvision torchaudio #--index-url https://download.pytorch.org/whl/cu117
pip install lightning
pip install matplotlib
pip install pandas
pip install numpy
pip install streamlit

Installation

  1. Clone the repo

    git clone https://github.com/MrCosta57/food_gan.git
  2. Enter your configuration in config.py

  3. Before run the streamlit GUI you must place some model checkpoint in checkpoints/ directory or train the model from scratch

(back to top)

Usage / Demo

You can run one .ipynb file or

streamlit run app.py

(back to top)

Roadmap / Future work

  • Base project structure
  • GAN implementation using parameters and convolutional architectures from different papers
  • Train model for more epochs and trying different parameters
  • Trying other discriminator/generator architecture or model

See the open issues for a full list of proposed features (and known issues).

(back to top)

References

@misc{goodfellow2014generative,
    title={Generative Adversarial Networks}, 
    author={Ian J. Goodfellow and Jean Pouget-Abadie and Mehdi Mirza and Bing Xu and David Warde-Farley and Sherjil Ozair and Aaron Courville and Yoshua Bengio},
    year={2014},
    eprint={1406.2661},
    archivePrefix={arXiv},
    primaryClass={stat.ML}
}

@misc{radford2016unsupervised,
    title={Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks}, 
    author={Alec Radford and Luke Metz and Soumith Chintala},
    year={2016},
    eprint={1511.06434},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

@misc{arjovsky2017wasserstein,
    title={Wasserstein GAN}, 
    author={Martin Arjovsky and Soumith Chintala and Léon Bottou},
    year={2017},
    eprint={1701.07875},
    archivePrefix={arXiv},
    primaryClass={stat.ML}
}

@misc{gulrajani2017improved,
    title={Improved Training of Wasserstein GANs}, 
    author={Ishaan Gulrajani and Faruk Ahmed and Martin Arjovsky and Vincent Dumoulin and Aaron Courville},
    year={2017},
    eprint={1704.00028},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

(back to top)

About

An implementation of one personal project to gain experience with Generative Adversarial Network models and in particular on Wasserstrein GAN with gradient penalty. The final application's purpose is to generate synthetic images given a food category.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published