{ "info": { "author": "Beranger Dumont", "author_email": "beranger.dumont@rakuten.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Image Recognition" ], "description": "\nstAdv: Spatially Transformed Adversarial Examples with TensorFlow\n=================================================================\n\nDeep neural networks have been shown to be vulnerable to\n`adversarial examples `_:\nvery small perturbations of the input having a dramatic impact on the\npredictions. In this package, we provide a\n`TensorFlow `_ implementation for a new type of\nadversarial attack based on local geometric transformations:\n*Spatially Transformed Adversarial Examples* (stAdv).\n\n.. image:: illustration-stadv-mnist.png\n\nOur implementation follows the procedure from the original paper:\n\n | Spatially Transformed Adversarial Examples\n | Chaowei Xiao, Jun-Yan Zhu, Bo Li, Warren He, Mingyan Liu, Dawn Song\n | `ICLR 2018 (conference track) `_, `arXiv:1801.02612 `_\n\nIf you use this code, please cite the following paper for which this\nimplementation was originally made:\n\n | Robustness of Rotation-Equivariant Networks to Adversarial Perturbations\n | Beranger Dumont, Simona Maggio, Pablo Montalvo\n | `ICML 2018 Workshop on \"Towards learning with limited labels: Equivariance, Invariance, and Beyond\" `_, `arXiv:1802.06627 `_\n\nInstallation\n------------\n\nFirst, make sure you have `installed TensorFlow `_ (CPU or GPU version).\n\nThen, to install the ``stadv`` package, simply run\n\n.. code-block:: bash\n\n $ pip install stadv\n\nUsage\n-----\n\nA typical use of this package is as follows:\n\n1. Start with a trained network implemented in TensorFlow.\n2. Insert the ``stadv.layers.flow_st`` layer in the graph immediately after the\n input layer. This is in order to perturb the input images according to local\n differentiable geometric perturbations parameterized with input flow tensors.\n3. In the end of the graph, after computing the logits, insert the computation\n of an adversarial loss (to fool the network) and of a flow loss (to enforce\n local smoothness), e.g. using ``stadv.losses.adv_loss`` and\n ``stadv.losses.flow_loss``, respectively. Define the final loss to be\n optimized as a combination of the two.\n4. Find the flows which minimize this loss, e.g. by using an L-BFGS-B optimizer\n as conveniently provided in ``stadv.optimization.lbfgs``.\n\nAn end-to-end example use of the library is provided in the notebook\n``demo/simple_mnist.ipynb`` (`see on GitHub `_).\n\nDocumentation\n-------------\n\nThe documentation of the API is available at\nhttp://stadv.readthedocs.io/en/latest/stadv.html.\n\nTesting\n-------\n\nYou can run all unit tests with\n\n.. code-block:: bash\n\n $ make init\n $ make test\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rakutentech/stAdv", "keywords": "tensorflow adversarial examples CNN deep learning", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "stadv", "package_url": "https://pypi.org/project/stadv/", "platform": "", "project_url": "https://pypi.org/project/stadv/", "project_urls": { "Documentation": "http://stadv.readthedocs.io/en/latest/stadv.html", "Homepage": "https://github.com/rakutentech/stAdv", "Source": "https://github.com/rakutentech/stAdv", "Tracker": "https://github.com/rakutentech/stAdv/issues" }, "release_url": "https://pypi.org/project/stadv/0.2.1/", "requires_dist": [ "numpy", "scipy" ], "requires_python": ">=2.7", "summary": "Spatially Transformed Adversarial Examples with TensorFlow", "version": "0.2.1" }, "last_serial": 4447490, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d1f37ba109b8331e8b598e81089c8b91", "sha256": "aa0b3d0e029c448372abc8884fb6bee433f8a6d8c0da7d130259ea2ecfdafefa" }, "downloads": -1, "filename": "stadv-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1f37ba109b8331e8b598e81089c8b91", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 8276, "upload_time": "2018-05-11T16:01:56", "url": "https://files.pythonhosted.org/packages/b8/ed/c34ae4375887598a0020802ef81a6619ef69de52c8c2b162b6a7cc04c092/stadv-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43a5d35e0b1f0835bccdfeabf1cd87bd", "sha256": "28c2df01e51d71cc3de401f25d11d48672e5f2561b0d354ed4e03b79ffbb5240" }, "downloads": -1, "filename": "stadv-0.1.0.tar.gz", "has_sig": false, "md5_digest": "43a5d35e0b1f0835bccdfeabf1cd87bd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 7549, "upload_time": "2018-05-11T16:01:57", "url": "https://files.pythonhosted.org/packages/60/70/a57cc88ee753e4ae6945ffba6854a84ddfbca856dd865b78bf9b7a6ef1f1/stadv-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6ccaeb623f745e80c6ce25ad252c0ea9", "sha256": "fa5a2cd3e6709b48d06bab25686765859c32c08bf9dff0674b113caec3d870c8" }, "downloads": -1, "filename": "stadv-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6ccaeb623f745e80c6ce25ad252c0ea9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 8331, "upload_time": "2018-10-14T20:39:34", "url": "https://files.pythonhosted.org/packages/c8/fe/ba8187a26ff44f0197fe6182b071dcfc942fda94f32da931e06f599f7638/stadv-0.2.0-py2.py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d692be39999a53c26df46bad1e0b1a56", "sha256": "d35a9ff88b8214e839d8fd0bb5d8ee0dca3c7c8986218060f547f3d7e7da2b88" }, "downloads": -1, "filename": "stadv-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d692be39999a53c26df46bad1e0b1a56", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 9208, "upload_time": "2018-11-03T14:10:57", "url": "https://files.pythonhosted.org/packages/bf/95/3b46127eb17498a1ab90f7c6bbb6cc7ff0602d08a3992b041f6b86b3b4be/stadv-0.2.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d692be39999a53c26df46bad1e0b1a56", "sha256": "d35a9ff88b8214e839d8fd0bb5d8ee0dca3c7c8986218060f547f3d7e7da2b88" }, "downloads": -1, "filename": "stadv-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d692be39999a53c26df46bad1e0b1a56", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 9208, "upload_time": "2018-11-03T14:10:57", "url": "https://files.pythonhosted.org/packages/bf/95/3b46127eb17498a1ab90f7c6bbb6cc7ff0602d08a3992b041f6b86b3b4be/stadv-0.2.1-py2.py3-none-any.whl" } ] }