{ "info": { "author": "The ShowmaxLab & Showmax teams", "author_email": "oss+conveiro@showmax.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Conveiro\n\nConveiro (convolutional + oneiro, Greek for \"dream\") is an open source library for feature visualization in deep convolutional networks. It implements multiple techniques for visualization, such as laplace, multiscale, deep dream and CDFS.\n\nAll of these methods are based on:\n\n### Deep dream\n\nDeep dream is implementation of technique based on\n\n* https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb\n* https://ai.googleblog.com/2015/06/inceptionism-going-deeper-into-neural.html\n\nHow it works:\n* We create random image (or we can use seed image)\n* We feed this image to network and optimize it based on calculated gradients\n* We employ few clever tricks based on scaling and frequencies\n\nThere are few more steps but this is the essence of this technique. \n\n### CDFS\nCDFS (color-decorrelated fourier space) is custom implementation of technique based on\n* https://distill.pub/2017/feature-visualization/\n* https://github.com/tensorflow/lucid\n\nHow it works:\n* We generate random complex coefficient\n* We use said coefficients to generate image by inverse fourier transformation\n* After we feed this image to network we can calculate gradients and use gradient descent to optimize these coefficient\n\nThere are few more steps but this is the essence of this technique.\n\n## Requirements\n\n* Python 3.4 and above\n* Tensorflow (CPU or GPU variant)\n* Numpy\n* Matplotlib\n* click, tensornets, pillow, graphviz (if you want to use the command-line tool with examples)\n\n## Installation\n\n```\npip install conveiro\n```\n\nDevelopment version\n\n```\npip install -e . # from cloned repository\n```\n\n## Command-line usage\n\nThis library comes with a command-line tool called `conveiro`\nthat can visualize and hallucinate networks from `tensornets` library.\n\n```\nUsage: conveiro COMMAND [OPTIONS] [ARGS]...\n\nCommands:\n graph Create a graph of the network architecture.\n layers List available layers (operations) in a network.\n networks List available network architectures (from tensornets).\n render Hallucinate an image for a layer / neuron.\n```\n\nRun `conveiro --help` or `conveiro [command-name] --help` to \nshow the list of capabilities and options.\n\n## Examples\n\nFor examples how to use this library please take a look at jupyter notebooks in `docs/` folder:\n\n* https://github.com/Showmax/conveiro/tree/master/docs/deep_dream.ipynb\n* https://github.com/Showmax/conveiro/tree/master/docs/cdfs.ipynb\n\nSimplest example:\n\n```python\nimport tensorflow as tf\nimport tensornets as nets\nfrom conveiro import cdfs\n\ninput_t, decorrelated_image_t, coeffs_t = cdfs.setup(224)\n\nmodel = nets.Inception1(input_t)\ngraph = tf.get_default_graph()\n\nwith tf.Session() as sess:\n sess.run(model.pretrained())\n\n objective = graph.get_tensor_by_name(\"inception1/block3b/concat:0\")\n image = cdfs.render_image(sess, decorrelated_image_t, coeffs_t, objective[..., 55], 0.01)\n cdfs.show_image(cdfs.process_image(image))\n```\n\n![CDFS output](docs/example.png)\n\n**Note** The API is preliminary and may change in future versions.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/showmax/conveiro", "keywords": "CNN", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "conveiro", "package_url": "https://pypi.org/project/conveiro/", "platform": "any", "project_url": "https://pypi.org/project/conveiro/", "project_urls": { "Homepage": "https://github.com/showmax/conveiro" }, "release_url": "https://pypi.org/project/conveiro/0.2/", "requires_dist": null, "requires_python": "", "summary": "Visualization of filters in convolutional neural networks", "version": "0.2" }, "last_serial": 5735349, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7febfecbd0d4ddf0a897be3349041824", "sha256": "04ff1816c941cd68ba67c7ae3cdf9054da79be209c6bf412d32707b832c8a83f" }, "downloads": -1, "filename": "conveiro-0.1.tar.gz", "has_sig": false, "md5_digest": "7febfecbd0d4ddf0a897be3349041824", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12681, "upload_time": "2018-10-09T09:09:41", "url": "https://files.pythonhosted.org/packages/cd/5a/593241b725834e057dcf85e3b3ad99db9ef6fa5e5565c52d03eff6934ded/conveiro-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0a60f9d37ad1eff641ff64c0a98fbb62", "sha256": "3791d3200ba52630c8fdb9dbefddc1549c4be4e418a754cc780c2f7a59fdb430" }, "downloads": -1, "filename": "conveiro-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0a60f9d37ad1eff641ff64c0a98fbb62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9360, "upload_time": "2019-01-14T12:10:52", "url": "https://files.pythonhosted.org/packages/e7/aa/88c523bff8edb84ffe174bfa482b5ca1b2db3db11f0285b55d4dfc4e471e/conveiro-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5ded7b9c1848fd601aae5112b37eead8", "sha256": "08f17147856724fbfd85650f90dbed1ea4e408a6dab2f921869458a4009c4a02" }, "downloads": -1, "filename": "conveiro-0.2.tar.gz", "has_sig": false, "md5_digest": "5ded7b9c1848fd601aae5112b37eead8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13221, "upload_time": "2019-04-10T15:31:08", "url": "https://files.pythonhosted.org/packages/cb/48/87d47a9e6fe4404d23f45d220a934cb02d995980a733c38de68497a3ec42/conveiro-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ded7b9c1848fd601aae5112b37eead8", "sha256": "08f17147856724fbfd85650f90dbed1ea4e408a6dab2f921869458a4009c4a02" }, "downloads": -1, "filename": "conveiro-0.2.tar.gz", "has_sig": false, "md5_digest": "5ded7b9c1848fd601aae5112b37eead8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13221, "upload_time": "2019-04-10T15:31:08", "url": "https://files.pythonhosted.org/packages/cb/48/87d47a9e6fe4404d23f45d220a934cb02d995980a733c38de68497a3ec42/conveiro-0.2.tar.gz" } ] }