{ "info": { "author": "Jason Garber", "author_email": "jason@sixtwothree.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics", "Topic :: Scientific/Engineering :: Image Recognition", "Topic :: Utilities" ], "description": "# python-nsfw\n\n**A Python package for analyzing images using [Caffe](https://github.com/BVLC/caffe) and [Yahoo's open_nsfw](https://github.com/yahoo/open_nsfw) models.**\n\n[![PyPI](https://img.shields.io/pypi/v/nsfw.svg?style=for-the-badge)][pypi]\n[![Python](https://img.shields.io/pypi/pyversions/nsfw.svg?style=for-the-badge)][pypi]\n\n## Prerequisites\n\npython-nsfw requires Python 3 and runs on Caffe-compatible systems.\n\n### Caffe\n\nIf you're using macOS and [Homebrew](https://brew.sh), the easiest way to install [Caffe](https://github.com/BVLC/caffe) is with Homebrew:\n\n```sh\nbrew install caffe\n```\n\nAlternatively, you could use a [Docker](https://www.docker.com) Linux image (e.g. [`debian:stretch-slim`](https://hub.docker.com/_/debian/)) and install the necessary dependencies:\n\n```sh\napt update && apt install caffe-cpu python3 python3-pip wget\n```\n\n## Installation\n\npython-nsfw may be installed using [pip](https://pip.pypa.io):\n\n```python\npip3 install nsfw\n```\n\n## Usage\n\n```python\nimport PIL.Image as Image\n\nfrom nsfw import classify\n\nimage = Image.open(\"/path/to/image.jpg\")\nsfw, nsfw = classify(image)\n\nprint(\"SFW Probability: {}\".format(sfw))\nprint(\"NSFW Probability: {}\".format(nsfw))\n```\n\n## License\n\npython-nsfw is freely available under the [MIT License](https://opensource.org/licenses/MIT). Use it, learn from it, fork it, improve it, change it, tailor it to your needs.\n\npython-nsfw ships with copies of Yahoo's [open_nsfw Caffe models](https://github.com/yahoo/open_nsfw/tree/master/nsfw_model) (`nsfw/deploy.prototxt` and `nsfw/resent_50_1by2_nsfw.caffemodel`) which are licensed under the [BSD 2-Clause License](https://github.com/BVLC/caffe/blob/master/LICENSE).\n\n[pypi]: https://pypi.org/project/nsfw", "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/jgarber623/python-nsfw", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "nsfw", "package_url": "https://pypi.org/project/nsfw/", "platform": "any", "project_url": "https://pypi.org/project/nsfw/", "project_urls": { "Homepage": "https://github.com/jgarber623/python-nsfw" }, "release_url": "https://pypi.org/project/nsfw/0.3.2/", "requires_dist": null, "requires_python": ">=3", "summary": "A Python package for analyzing images using Caffe and Yahoo's open_nsfw models.", "version": "0.3.2" }, "last_serial": 3884032, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "edefbaeb8e5588eea127b193ebd7461d", "sha256": "50ee022f2bede186638b71f343036cf7a62fae1c4730adc3b8907872db599628" }, "downloads": -1, "filename": "nsfw-0.2.0.tar.gz", "has_sig": false, "md5_digest": "edefbaeb8e5588eea127b193ebd7461d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3127, "upload_time": "2018-05-18T16:27:06", "url": "https://files.pythonhosted.org/packages/d5/ce/80fd890bb8da45a1160ca0185d564e0000427795f3020249f73c6e727146/nsfw-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "ff74c6fd432dc8d57e6ae86c985fb0b1", "sha256": "9194771c455e00164a22e420444a2d87a5cff085446bc3ba697ae7baf2b9ae61" }, "downloads": -1, "filename": "nsfw-0.3.0.tar.gz", "has_sig": false, "md5_digest": "ff74c6fd432dc8d57e6ae86c985fb0b1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 22145553, "upload_time": "2018-05-21T15:22:53", "url": "https://files.pythonhosted.org/packages/11/cd/06ed2eb60bbf3ffd39de9711092c120d2d74b1ee42d262cadf2177114ae2/nsfw-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "b68e2f098b7b0dd4310ae78e150c95c9", "sha256": "1c09fe70579786a067f179373d3948ff73471d9423d6bcc5f901470ad80a547c" }, "downloads": -1, "filename": "nsfw-0.3.1.tar.gz", "has_sig": false, "md5_digest": "b68e2f098b7b0dd4310ae78e150c95c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 22145593, "upload_time": "2018-05-21T15:40:33", "url": "https://files.pythonhosted.org/packages/5d/49/e311e28c2f4e6042307f86a1138bd78f4e2b4b4628c1c57660ca6bac72b3/nsfw-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "d23534f9255478d5951f19188e839cc2", "sha256": "2bc5dd5695a330f8f0425ec63e14cee44ad7ec962a654e00e743e95e7b812e6f" }, "downloads": -1, "filename": "nsfw-0.3.2.tar.gz", "has_sig": false, "md5_digest": "d23534f9255478d5951f19188e839cc2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 22145525, "upload_time": "2018-05-21T16:06:08", "url": "https://files.pythonhosted.org/packages/8e/d4/10d1d44d84d73ff032506ef3ec88f9bbd1350c06ddf8056d8e78096c2898/nsfw-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d23534f9255478d5951f19188e839cc2", "sha256": "2bc5dd5695a330f8f0425ec63e14cee44ad7ec962a654e00e743e95e7b812e6f" }, "downloads": -1, "filename": "nsfw-0.3.2.tar.gz", "has_sig": false, "md5_digest": "d23534f9255478d5951f19188e839cc2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 22145525, "upload_time": "2018-05-21T16:06:08", "url": "https://files.pythonhosted.org/packages/8e/d4/10d1d44d84d73ff032506ef3ec88f9bbd1350c06ddf8056d8e78096c2898/nsfw-0.3.2.tar.gz" } ] }