{ "info": { "author": "Iv\u00e1n de Paz Centeno", "author_email": "ipazc@unileon.es", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "Natural Language :: English", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "MTCNN\n#####\n\n.. image:: https://badge.fury.io/py/mtcnn.svg\n :target: https://badge.fury.io/py/mtcnn\n.. image:: https://travis-ci.org/ipazc/mtcnn.svg?branch=master\n :target: https://travis-ci.org/ipazc/mtcnn\n\n\nImplementation of the MTCNN face detector for TensorFlow in Python3.4+. It is written from scratch, using as a reference the implementation of\nMTCNN from David Sandberg (`FaceNet's MTCNN `_) in Facenet. It is based on the paper *Zhang, K et al. (2016)* [ZHANG2016]_.\n\n.. image:: https://github.com/ipazc/mtcnn/raw/master/result.jpg\n\n\nINSTALLATION\n############\n\nCurrently it is only supported Python3.4 onwards. It can be installed through pip:\n\n.. code:: bash\n\n $ pip3 install mtcnn\n\nThis implementation requires OpenCV>=3.2 and Tensorflow>=1.4.0 installed in the system, with bindings for Python3.\n\nThey can be installed through pip (if pip version >= 9.0.1):\n\n\n.. code:: bash\n\n $ pip3 install tensorflow==1.4.1 opencv-contrib-python==3.2.0.8\n\nor compiled directly from sources (`OpenCV3 `_, `Tensorflow `_).\n\nNote that a tensorflow-gpu version can be used instead if a GPU device is available on the system, which will speedup the results. It can be installed with pip:\n\n.. code:: bash\n\n $ pip3 install tensorflow-gpu\\>=1.4.0\n\nUSAGE\n#####\n\nThe following example illustrates the ease of use of this package:\n\n\n.. code:: python\n\n >>> from mtcnn.mtcnn import MTCNN\n >>> import cv2\n >>>\n >>> img = cv2.imread(\"ivan.jpg\")\n >>> detector = MTCNN()\n >>> print(detector.detect_faces(img))\n [{'box': [277, 90, 48, 63], 'keypoints': {'nose': (303, 131), 'mouth_right': (313, 141), 'right_eye': (314, 114), 'left_eye': (291, 117), 'mouth_left': (296, 143)}, 'confidence': 0.99851983785629272}]\n\nThe detector returns a list of JSON objects. Each JSON object contains three main keys: 'box', 'confidence' and 'keypoints':\n\n- The bounding box is formatted as [x, y, width, height] under the key 'box'.\n- The confidence is the probability for a bounding box to be matching a face.\n- The keypoints are formatted into a JSON object with the keys 'left_eye', 'right_eye', 'nose', 'mouth_left', 'mouth_right'. Each keypoint is identified by a pixel position (x, y).\n\nAnother good example of usage can be found in the file \"`example.py`_.\" located in the root of this repository.\n\nBENCHMARK\n=========\n\nThe following tables shows the benchmark of this mtcnn implementation running on an `Intel i7-3612QM CPU @ 2.10GHz `_, with a **CPU-based** Tensorflow 1.4.1.\n\n - Pictures containing a single frontal face:\n\n+------------+--------------+---------------+-----+\n| Image size | Total pixels | Process time | FPS |\n+============+==============+===============+=====+\n| 460x259 | 119,140 | 0.118 seconds | 8.5 |\n+------------+--------------+---------------+-----+\n| 561x561 | 314,721 | 0.227 seconds | 4.5 |\n+------------+--------------+---------------+-----+\n| 667x1000 | 667,000 | 0.456 seconds | 2.2 |\n+------------+--------------+---------------+-----+\n| 1920x1200 | 2,304,000 | 1.093 seconds | 0.9 |\n+------------+--------------+---------------+-----+\n| 4799x3599 | 17,271,601 | 8.798 seconds | 0.1 |\n+------------+--------------+---------------+-----+\n\n - Pictures containing 10 frontal faces:\n\n+------------+--------------+---------------+-----+\n| Image size | Total pixels | Process time | FPS |\n+============+==============+===============+=====+\n| 474x224 | 106,176 | 0.185 seconds | 5.4 |\n+------------+--------------+---------------+-----+\n| 736x348 | 256,128 | 0.290 seconds | 3.4 |\n+------------+--------------+---------------+-----+\n| 2100x994 | 2,087,400 | 1.286 seconds | 0.7 |\n+------------+--------------+---------------+-----+\n\nMODEL\n#####\n\nBy default the MTCNN bundles a face detection weights model.\n\nThe model is adapted from the Facenet's MTCNN implementation, merged in a single file located inside the folder 'data' relative\nto the module's path. It can be overriden by injecting it into the MTCNN() constructor during instantiation.\n\nThe model must be numpy-based containing the 3 main keys \"pnet\", \"rnet\" and \"onet\", having each of them the weights of each of the layers of the network.\n\nFor more reference about the network definition, take a close look at the paper from *Zhang et al. (2016)* [ZHANG2016]_.\n\nLICENSE\n#######\n\n`MIT License`_.\n\n\nREFERENCE\n=========\n\n.. [ZHANG2016] Zhang, K., Zhang, Z., Li, Z., and Qiao, Y. (2016). Joint face detection and alignment using multitask cascaded convolutional networks. IEEE Signal Processing Letters, 23(10):1499\u20131503.\n\n.. _example.py: example.py\n.. _MIT license: LICENSE", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ipazc/mtcnn", "keywords": "mtcnn face detection tensorflow pip package", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mtcnn", "package_url": "https://pypi.org/project/mtcnn/", "platform": "", "project_url": "https://pypi.org/project/mtcnn/", "project_urls": { "Homepage": "http://github.com/ipazc/mtcnn" }, "release_url": "https://pypi.org/project/mtcnn/0.0.9/", "requires_dist": null, "requires_python": "", "summary": "Multi-task Cascaded Convolutional Neural Networks for Face Detection, based on TensorFlow", "version": "0.0.9" }, "last_serial": 5232361, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "bba42532a2f006d61b0de0cacbecec57", "sha256": "8c5cda05964f306b8d768fd2ac5bcc03a4b29806fd483e8687b3689f8127dfab" }, "downloads": -1, "filename": "mtcnn-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bba42532a2f006d61b0de0cacbecec57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2254034, "upload_time": "2018-01-05T04:11:03", "url": "https://files.pythonhosted.org/packages/bd/28/5080d4bfc2407e1e9ed1dd7493b7e11bd4e591ebe68b5d005493db0eabff/mtcnn-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "80c28e08673afd0d8cb58d29df92c168", "sha256": "a354fa70003ab02128922d6b66cf7a46c624afef3cc727767c047f3fdf7ac47f" }, "downloads": -1, "filename": "mtcnn-0.0.2.tar.gz", "has_sig": false, "md5_digest": "80c28e08673afd0d8cb58d29df92c168", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2254221, "upload_time": "2018-01-05T15:35:35", "url": "https://files.pythonhosted.org/packages/42/b2/2277daba60f5ce099d9f7cb9f7f5353508646ad9e48d34e7a814d496496b/mtcnn-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "552143867c5bf0ef5cfbd0a89a78f5ae", "sha256": "216c0c936ad6e4f4a3a12877e9faf5a46cb17e3d5848420c4418197ab3a12587" }, "downloads": -1, "filename": "mtcnn-0.0.3.tar.gz", "has_sig": false, "md5_digest": "552143867c5bf0ef5cfbd0a89a78f5ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2255460, "upload_time": "2018-01-10T16:46:24", "url": "https://files.pythonhosted.org/packages/6c/20/f35af76ca43cb93b0ed05b8b5399e0dca7184ab17021c40b3ef0f019120d/mtcnn-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8104922a3e2e7e33d17d56fbb5699719", "sha256": "244f67c2e0fe42237f34cff3d72b7eefe1fca953c5dc54600472ab4cc36cb382" }, "downloads": -1, "filename": "mtcnn-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8104922a3e2e7e33d17d56fbb5699719", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2256354, "upload_time": "2018-01-18T16:18:47", "url": "https://files.pythonhosted.org/packages/23/69/d07e7e05965743408c8817ba28858981cf796a7d36a6525a878e3aab1856/mtcnn-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "e2b5672e7c054de1e9a2acf7ddf2e026", "sha256": "03787947f46c87449c5e8d34925e5fbbaa367dfa16b16ac5abceeb0408b45375" }, "downloads": -1, "filename": "mtcnn-0.0.5.tar.gz", "has_sig": false, "md5_digest": "e2b5672e7c054de1e9a2acf7ddf2e026", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2256354, "upload_time": "2018-01-31T12:33:02", "url": "https://files.pythonhosted.org/packages/46/24/7e0064769847bbc45b021c8e524a3a08580210a3d4fa213dc4a0dc770cbb/mtcnn-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "0fd19f21062b8aa9d1fda0c7120107a0", "sha256": "78de64ee19e332c9e4d6fea1903f7b3fbb8397708bdecfc85326d7e4706a92cd" }, "downloads": -1, "filename": "mtcnn-0.0.6.tar.gz", "has_sig": false, "md5_digest": "0fd19f21062b8aa9d1fda0c7120107a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2256360, "upload_time": "2018-01-31T12:34:49", "url": "https://files.pythonhosted.org/packages/3f/5b/4a384c7aab79b28e2013a813088af8893e603712638f9d7ac795931679e2/mtcnn-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "e01239aecf5d61c2dadff517b26bd033", "sha256": "99474debce9253c7d6bf2346db68d242e54e456a4595af46dc44d5352ddcb98d" }, "downloads": -1, "filename": "mtcnn-0.0.7.tar.gz", "has_sig": false, "md5_digest": "e01239aecf5d61c2dadff517b26bd033", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2255750, "upload_time": "2018-05-09T13:55:40", "url": "https://files.pythonhosted.org/packages/f8/84/47f5ce4dbd448d0899b0aa20eba9da950a95329206a6acd8770d7ef80b38/mtcnn-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "c6584d3d3a65ca55ebd3dec47312d9db", "sha256": "a9ec787f5f474435ce27ceb3510d217be48e049a374bd027c5ba5574de87a177" }, "downloads": -1, "filename": "mtcnn-0.0.8.tar.gz", "has_sig": false, "md5_digest": "c6584d3d3a65ca55ebd3dec47312d9db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2256290, "upload_time": "2018-07-23T21:49:20", "url": "https://files.pythonhosted.org/packages/0b/f5/d62ac2bdf1c683b7650268305db3126323a7b6a2f6390273038285fa9e3f/mtcnn-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "95f562ecd6308d89c72469aad914fd5e", "sha256": "1eee06176f69da9e09d7e1b007b5663e4632ee77994934219ee2db63c309b8ba" }, "downloads": -1, "filename": "mtcnn-0.0.9.tar.gz", "has_sig": false, "md5_digest": "95f562ecd6308d89c72469aad914fd5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2255999, "upload_time": "2019-05-06T12:11:41", "url": "https://files.pythonhosted.org/packages/9e/c7/8546b18fbd367b156c5bbbbaa8912ab31c8129171523ff8b47b546d70b09/mtcnn-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "95f562ecd6308d89c72469aad914fd5e", "sha256": "1eee06176f69da9e09d7e1b007b5663e4632ee77994934219ee2db63c309b8ba" }, "downloads": -1, "filename": "mtcnn-0.0.9.tar.gz", "has_sig": false, "md5_digest": "95f562ecd6308d89c72469aad914fd5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2255999, "upload_time": "2019-05-06T12:11:41", "url": "https://files.pythonhosted.org/packages/9e/c7/8546b18fbd367b156c5bbbbaa8912ab31c8129171523ff8b47b546d70b09/mtcnn-0.0.9.tar.gz" } ] }