{ "info": { "author": "Austin Blanton", "author_email": "imaus10@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2 :: Only" ], "description": "# thumbor_extras\n\nSome useful extensions to [thumbor](https://thumbor.readthedocs.io/en/latest/index.html) - extra filters and detectors.\n\n```\npip install thumbor_extras\n```\n\n## Detectors\n\nAdd these detectors to your `thumbor.conf`:\n\n```\nDETECTORS = [\n 'thumbor_extras.detectors.dnn_face_detector',\n 'thumbor_extras.detectors.dnn_object_detector'\n]\n```\n\n### dnn_face_detector\n\n![example of face detector on a lemur](images/face_lemur.jpg)\n\n```\nhttp://localhost:8888/unsafe/smart/filters:draw_center_of_mass():draw_focal_points(2,.25)/https://farm2.static.flickr.com/1098/998604755_c2155161b3.jpg\n```\n\nAn improved face detector that uses a deep neural network. More specifically, it uses the [SSD object detection model](https://arxiv.org/abs/1512.02325), trained specifically on faces. According to [the OpenCV repo](https://github.com/opencv/opencv/blob/master/samples/dnn/face_detector/how_to_train_face_detector.txt), it was trained with \"some huge and available online dataset.\" :/\n\nFor more information on how the normal thumbor face detector compares to this one in both accuracy and efficiency, see [this comparison script](https://github.com/imaus10/compare_face_detection).\n\n### dnn_object_detector\n\n![example of object detector on two cats](images/object_cats.jpg)\n\n```\nhttp://localhost:8888/unsafe/smart/filters:draw_center_of_mass():draw_focal_points(2)/https://farm2.static.flickr.com/1308/562554257_53f458e042.jpg\n```\n\nThe full SSD object detection model, trained on the [COCO dataset](http://cocodataset.org). It was built as a [MobileNet](https://arxiv.org/abs/1704.04861), a class of efficient, light weight deep neural network models meant to work well in mobile and embedded applications.\n\n## Filters\n\nAdd these filters to your available filters in `thumbor.conf`:\n\n```\nFILTERS = [\n ...other filters,\n 'thumbor_extras.filters.draw_center_of_mass',\n 'thumbor_extras.filters.draw_focal_points'\n]\n```\n\n### draw_center_of_mass\n\nDraws a circle at the calculated center of mass, according to the focal points.\n\nUsage: `draw_center_of_mass([r, g, b])`\n\nExamples:\n- `draw_center_of_mass()`: draws a circle with default red color.\n- `draw_center_of_mass(0,0,255)`: draws a blue circle.\n\n### draw_focal_points\n\nDraws a box around the focal points, for displaying the results of the detectors on a given image. Takes optional arguments for box color and line width.\n\nUsage: `draw_focal_points([line_width, label_height_percentage, show_heatmap, show_labels, show_rainbow, r, g, b])`\n\nArguments:\n\n- `line_width`: the width of the box lines\n- `label_height_percentage`: the height of the class label as a percentage of the box\n- `show_heatmap`: make the box more opaque for higher-confidence detections, more transparent for less confident detections\n- `show_labels`: print the class label at the top of the box\n- `show_rainbow`: use a different color for each focal point box; pass false to provide a single color RGB value for all boxes\n- `r`: R component of RGB color of box, default 0\n- `g`: G component of RGB color of box, default 255\n- `b`: B component of RGB color of box, default 0\n\nExamples:\n- `draw_focal_points()`: draws boxes with defaults (each box a different color, with opacity according to the detection confidence).\n- `draw_focal_points(5,0,false,false,false,255,0,0)`: draws solid red boxes with 5 pixel line width, and no class labels.\n\n## TODO\n\n- Choose thresholds empirically\n\n## Development\n\nBecause I will definitely forget. Python development can be a pain.\n\n```\n# -- ENV --\n# use python 2 - thumbor doesn't support 3 yet.\nvirtualenv thumbor_env --python=/path/to/python2\nsource thumbor_env/bin/activate\n\n# -- DEVELOP --\npip install -e .\n\n# -- TEST --\n# i don't know why setup.py can't install pytest...but it fails without manual install.\n# it could be a python2 / mac thing.\npip install pytest\npython setup.py test\n\n# -- DISTRIBUTE --\npython setup.py sdist\n# make a wheel from the source tarball (to use manifest correctly)\npip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz\npip install twine\n# make sure pip URLs are configured per https://truveris.github.io/articles/configuring-pypirc/\npython -m twine upload --repository pypi dist/*\n```\n\n\n", "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/imaus10/thumbor_extras", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "thumbor-extras", "package_url": "https://pypi.org/project/thumbor-extras/", "platform": "", "project_url": "https://pypi.org/project/thumbor-extras/", "project_urls": { "Homepage": "https://github.com/imaus10/thumbor_extras" }, "release_url": "https://pypi.org/project/thumbor-extras/1.0.2/", "requires_dist": [ "opencv-python", "thumbor" ], "requires_python": "", "summary": "Some useful extensions to thumbor - extra filters and detectors.", "version": "1.0.2" }, "last_serial": 5807043, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7a2f8c63c92e0604e15f44d3e1144a31", "sha256": "5ccff289a1b4ff13399cb40083e786d4587b275eedbe5a660a896f0e4f415ac7" }, "downloads": -1, "filename": "thumbor_extras-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "7a2f8c63c92e0604e15f44d3e1144a31", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7125, "upload_time": "2019-04-25T19:50:15", "url": "https://files.pythonhosted.org/packages/b2/60/120a47727b1d98e790a20843f852bbda3c7a5d3e48b05237e8c705251c8c/thumbor_extras-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "580fee41b329d053b6e9d96ceca5c32b", "sha256": "9dbd2db77d9e2e2a41041b3201fc610838ef31b1b33cc65f991dae55a9f54425" }, "downloads": -1, "filename": "thumbor_extras-0.1.0.tar.gz", "has_sig": false, "md5_digest": "580fee41b329d053b6e9d96ceca5c32b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5461, "upload_time": "2019-04-25T19:50:20", "url": "https://files.pythonhosted.org/packages/a6/d4/86cb0c7f353dfa924dc74b062dee99f71259a557dba609496e296ec20084/thumbor_extras-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "da437cf3f3f566f52e28b583ac694a57", "sha256": "107fec1f8dc09a903b8604df575d7d139c884a07f3213c299af71b53b48b4b24" }, "downloads": -1, "filename": "thumbor_extras-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "da437cf3f3f566f52e28b583ac694a57", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 64290131, "upload_time": "2019-04-26T16:47:51", "url": "https://files.pythonhosted.org/packages/d0/37/e563b26d329610382c4b3cad5b1e7f5ec05615b7756b2e70375c89e11333/thumbor_extras-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6eb48f06f6aa22db57c8c2d1e655de3d", "sha256": "b9e5509917565a3c966444e460146de3a250eb6bd5a5ba49d7691a0028a7d42d" }, "downloads": -1, "filename": "thumbor_extras-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6eb48f06f6aa22db57c8c2d1e655de3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64276591, "upload_time": "2019-04-26T16:48:07", "url": "https://files.pythonhosted.org/packages/f8/05/d91bb06c24e2b0434e7e8642ddaabc7918db97f68ea3c86564531ce98b2a/thumbor_extras-0.1.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "94c84b6ebeddb143d831e7704f7937a7", "sha256": "c796df4ba092f4b9ae162a564e8fd97c87f781fdcd7e0163ecc2725c1b34fe30" }, "downloads": -1, "filename": "thumbor_extras-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "94c84b6ebeddb143d831e7704f7937a7", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 64290884, "upload_time": "2019-09-10T03:59:46", "url": "https://files.pythonhosted.org/packages/8b/7d/78ca14849835919bfca79240c02774da0da030bfa847650a37c683d33f44/thumbor_extras-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da19f150d37e71875721edae22284cef", "sha256": "c562513d1b6ac355f50706e52e007575db43a14ef5e26c4cdd165577ea518741" }, "downloads": -1, "filename": "thumbor_extras-1.0.0.tar.gz", "has_sig": false, "md5_digest": "da19f150d37e71875721edae22284cef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64277567, "upload_time": "2019-09-10T04:00:20", "url": "https://files.pythonhosted.org/packages/80/8b/251ca751c024acf33df2f497100df691caaef11fd7a64e32e6b17da09db9/thumbor_extras-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2ede86923aa8b9643f98a1130c6f5f20", "sha256": "e1f2005f6d7800d4e9c636ae10c32ccf478034ebe1efb920493c1b0abc6b24f5" }, "downloads": -1, "filename": "thumbor_extras-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "2ede86923aa8b9643f98a1130c6f5f20", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 64291041, "upload_time": "2019-09-10T04:12:35", "url": "https://files.pythonhosted.org/packages/7f/39/b2200ffe7d67b56aad49e3f3444e36d315f36b82e07d0c38f4aefb532615/thumbor_extras-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b845ed407d7209775f21e79418a83533", "sha256": "6a2df4c8c6241d28e310f878669f140b3c73813340cc384617b6bc3259730c10" }, "downloads": -1, "filename": "thumbor_extras-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b845ed407d7209775f21e79418a83533", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64277760, "upload_time": "2019-09-10T04:12:47", "url": "https://files.pythonhosted.org/packages/da/46/f45a57af00c64fb3a1307e59f92bb1dbc78726ec9c2d9075f24e152d0e95/thumbor_extras-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "d3b37067561f797d45429b8f3ac633e1", "sha256": "4907345fc32998f5d464535ec6a007546054b70a1d407ef6c0de10bdbaffd5d5" }, "downloads": -1, "filename": "thumbor_extras-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "d3b37067561f797d45429b8f3ac633e1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 64291371, "upload_time": "2019-09-10T05:49:12", "url": "https://files.pythonhosted.org/packages/41/92/ac85f838aef2130746415a2447f0f0916299b44429acb037a1b2afdeb01e/thumbor_extras-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9acdbe645419a2a61e70b0d26325a542", "sha256": "385c60a91ca88bb2bf8a47470f86a7194b0479f6ed3a789546c12d2719f3946f" }, "downloads": -1, "filename": "thumbor_extras-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9acdbe645419a2a61e70b0d26325a542", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64278146, "upload_time": "2019-09-10T05:49:30", "url": "https://files.pythonhosted.org/packages/15/23/5a3f125dd3bd525b09f75e13e3abd39e614cd867105a8336a751288ef13a/thumbor_extras-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d3b37067561f797d45429b8f3ac633e1", "sha256": "4907345fc32998f5d464535ec6a007546054b70a1d407ef6c0de10bdbaffd5d5" }, "downloads": -1, "filename": "thumbor_extras-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "d3b37067561f797d45429b8f3ac633e1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 64291371, "upload_time": "2019-09-10T05:49:12", "url": "https://files.pythonhosted.org/packages/41/92/ac85f838aef2130746415a2447f0f0916299b44429acb037a1b2afdeb01e/thumbor_extras-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9acdbe645419a2a61e70b0d26325a542", "sha256": "385c60a91ca88bb2bf8a47470f86a7194b0479f6ed3a789546c12d2719f3946f" }, "downloads": -1, "filename": "thumbor_extras-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9acdbe645419a2a61e70b0d26325a542", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64278146, "upload_time": "2019-09-10T05:49:30", "url": "https://files.pythonhosted.org/packages/15/23/5a3f125dd3bd525b09f75e13e3abd39e614cd867105a8336a751288ef13a/thumbor_extras-1.0.2.tar.gz" } ] }