{ "info": { "author": "Domnan Diretnan, Victor Afolabi", "author_email": "diretnandomnan@gmail.com, javafolabi@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Simple GAN\n\nThis is my attempt to make a wrapper class for a GAN in keras which can be used to abstract the whole architecture process.\n\n[![Build Status](https://travis-ci.org/deven96/Simple_GAN.svg?branch=master)](https://travis-ci.com/deven96/Simple_GAN)\n\n- [Simple GAN](#simple-gan)\n - [Overview](#overview)\n - [Flow Chart](#flow-chart)\n - [Installation](#installation)\n - [Example](#example)\n - [Credits](#credits)\n - [Contribution](#contribution)\n - [License (MIT)](#license-mit)\n\n## Overview\n\n![alt text](assets/mnist_gan.png \"GAN network using the MNIST dataset\")\n\n## Flow Chart\n\nSetting up a Generative Adversarial Network involves having a discriminator and a generator working in tandem, with the ultimate goal being that the generator can come up with samples that are indistinguishable from valid samples by the discriminator.\n\n![alt text](assets/flow.jpg \"High level flowchart\")\n\n## Installation\n\n```bash\n pip install adversarials\n```\n\n## Example \n\n```python\nimport numpy as np\nfrom keras.datasets import mnist\n\nfrom adversarials.core import Log\nfrom adversarials import SimpleGAN\n\nif __name__ == '__main__':\n (X_train, _), (_, _) = mnist.load_data()\n\n # Rescale -1 to 1\n X_train = (X_train.astype(np.float32) - 127.5) / 127.5\n X_train = np.expand_dims(X_train, axis=3)\n\n Log.info('X_train.shape = {}'.format(X_train.shape))\n\n gan = SimpleGAN(save_to_dir=\"./assets/images\",\n save_interval=20)\n gan.train(X_train, epochs=40)\n```\n\n\n## Credits\n\n- [Understanding Generative Adversarial Networks](https://towardsdatascience.com/understanding-generative-adversarial-networks-4dafc963f2ef) - Noaki Shibuya\n- [Github Keras Gan](https://github.com/osh/KerasGAN)\n- [Simple gan](https://github.com/daymos/simple_keras_GAN/blob/master/gan.py)\n\n## Contribution\n\nYou are very welcome to modify and use them in your own projects.\n\nPlease keep a link to the [original repository](https://github.com/deven96/Simple_GAN). If you have made a fork with substantial modifications that you feel may be useful, then please [open a new issue on GitHub](https://github.com/deven96/Simple_GAN/issues) with a link and short description.\n\n## License (MIT)\n\nThis project is opened under the [MIT 2.0 License](https://github.com/deven96/Simple_GAN/blob/master/LICENSE) which allows very broad use for both academic and commercial purposes.\n\nA few of the images used for demonstration purposes may be under copyright. These images are included under the \"fair usage\" laws.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/deven96/Simple_GAN", "keywords": "keras GAN GANs networks adversarial", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Adversarials", "package_url": "https://pypi.org/project/Adversarials/", "platform": "", "project_url": "https://pypi.org/project/Adversarials/", "project_urls": { "Homepage": "https://github.com/deven96/Simple_GAN" }, "release_url": "https://pypi.org/project/Adversarials/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "easy wrapper for initializing several GAN networks in keras", "version": "1.0.1" }, "last_serial": 4623707, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "e88588b10bce2cc3e3eec41e221f7f15", "sha256": "5b30961614808e3f7c8783c90d5e1ec1a541945d729d3cc2db7af20707e1fb31" }, "downloads": -1, "filename": "Adversarials-1.0.1-py3.6.egg", "has_sig": false, "md5_digest": "e88588b10bce2cc3e3eec41e221f7f15", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 28407, "upload_time": "2018-12-21T06:08:18", "url": "https://files.pythonhosted.org/packages/12/2b/d6efadb7e2a7025231ddda581b917dc49de1ec93e78bab4f589fcd0e0554/Adversarials-1.0.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "dc144ac8b3405147c8a3bec66adaa7ec", "sha256": "c18012f5a1e458f9675ef69ab0df89c6fa625f837ef7beca0aa8981cf8a350d9" }, "downloads": -1, "filename": "Adversarials-1.0.1.tar.gz", "has_sig": false, "md5_digest": "dc144ac8b3405147c8a3bec66adaa7ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10081, "upload_time": "2018-12-21T02:05:53", "url": "https://files.pythonhosted.org/packages/b5/97/e8a2248a23c0c08176a57693eb5646cc869c652b8b90089a9ef620b63f91/Adversarials-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e88588b10bce2cc3e3eec41e221f7f15", "sha256": "5b30961614808e3f7c8783c90d5e1ec1a541945d729d3cc2db7af20707e1fb31" }, "downloads": -1, "filename": "Adversarials-1.0.1-py3.6.egg", "has_sig": false, "md5_digest": "e88588b10bce2cc3e3eec41e221f7f15", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 28407, "upload_time": "2018-12-21T06:08:18", "url": "https://files.pythonhosted.org/packages/12/2b/d6efadb7e2a7025231ddda581b917dc49de1ec93e78bab4f589fcd0e0554/Adversarials-1.0.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "dc144ac8b3405147c8a3bec66adaa7ec", "sha256": "c18012f5a1e458f9675ef69ab0df89c6fa625f837ef7beca0aa8981cf8a350d9" }, "downloads": -1, "filename": "Adversarials-1.0.1.tar.gz", "has_sig": false, "md5_digest": "dc144ac8b3405147c8a3bec66adaa7ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10081, "upload_time": "2018-12-21T02:05:53", "url": "https://files.pythonhosted.org/packages/b5/97/e8a2248a23c0c08176a57693eb5646cc869c652b8b90089a9ef620b63f91/Adversarials-1.0.1.tar.gz" } ] }