{ "info": { "author": "Iv\u00e1n de Paz Centeno", "author_email": "ipazc@unileon.es", "bugtrack_url": null, "classifiers": [], "description": "==============\nVRPWRP 0.0.7\n==============\nVRPWRP (Vision-algorithm Requests Processing Wrappers) is a package that wraps an API-REST for Computer Vision deep-learning algorithms. Currently, it supports state-of-the-art face-detection and face-recognition algorithms out-of-the-box. \n\n.. image:: https://badge.fury.io/py/vrpwrp.svg\n :target: https://badge.fury.io/py/vrpwrp\n.. image:: https://travis-ci.org/ipazc/vrpwrp.svg?branch=master\n :target: https://travis-ci.org/ipazc/vrpwrp\n.. image:: https://coveralls.io/repos/github/ipazc/vrpwrp/badge.svg?branch=master\n :target: https://coveralls.io/github/ipazc/vrpwrp?branch=master\n.. image:: https://landscape.io/github/ipazc/vrpwrp/master/landscape.svg?style=flat\n :target: https://landscape.io/github/ipazc/vrpwrp/master\n :alt: Code Health\n\n\n\nInstallation\n============\nCurrently it is only supported Python 3.4.1 onwards:\n\n.. code:: bash\n \n sudo pip3 install vrpwrp\n\nFace detection\n===============\nFace detection allows you to retrieve the location of faces inside images in the form of bounding boxes (left, top, width, height). The algorihm is a deep-learning based algorithm, composed by a cascade of Convolutional Neural Networks. It is based on the paper *Zhang et al. (2016)* [ZHANG2016]_. The backend runs a **Caffe-based** MTCNN influenced by `this python MTCNN version `_ . \n\n\nA simple example for retrieving the bounding boxes of faces from an image:\n\n.. code:: python\n\n >>> from vrpwrp.wrappers.face_detection import FaceDetection\n >>> face_detection = FaceDetection()\n >>> bounding_boxes = face_detection.analyze_file(\"route/to/image.jpg\")\n >>> for bb in bounding_boxes: print(bb)\n ... \n [162, 79, 114, 146]\n\nFaceDetection has methods for analyzing images also from bytes, URLs and pillow images directly:\n\n.. code:: python\n\n >>> bounding_boxes = face_detection.analyze_bytes(image_bytes)\n >>> bounding_boxes = face_detection.analyze_url(image_url)\n >>> bounding_boxes = face_detection.analyze_pil(pillow_image)\n ... \n\n\nFace Recognition\n================\nFace recognition allows extracting the identity of a face within a given image of the face. The identity is a set of float numbers (since it is deep-learning-based, it is the output of the last convolution layer of a Convolutional Neural Network). The algorithm is based on the papers *Schroff et al. (2015)* [SCHROFF2015]_, *Wen et al. (2016)* [WEN2016]_. and *Parkhi et al. (2015)* [PARKHI2015]_. The backend is influenced by `Facenet `_, using TensorFlow.\n\nIn vrpwrp, the identity of a face is also known as **embeddings**.\n\nA simple example for retrieving the embeddings of a face is:\n\n.. code:: python\n\n >>> from vrpwrp.wrappers.face_recognition import FaceRecognition\n >>> face_recognition = FaceRecognition()\n >>> face_embeddings = face_recognition.get_embeddings_from_file(\"route/to/image_of_face.jpg\")\n >>> print(face_embeddings)\n [-0.05258641 -0.14807236 0.21828972 0.00097196 0.08881456 0.01356898 -0.01393933 -0.09459263 -0.07305822 0.00354048 0.1649337 -0.05636634 0.03599492 -0.02649886 ...]\n\nLike in FaceDetection, it allows to analyze images from different sources:\n\n.. code:: python\n\n >>> embeddings = face_recognition.get_embeddings_from_bytes(image_bytes)\n >>> embeddings = face_recognition.get_embeddings_from_url(image_url)\n >>> embeddings = face_recognition.get_embeddings_from_pil(pillow_image)\n ... \n\n\n\nThe embeddings of two faces can be easily compared to see how close they are:\n\n.. code:: python\n\n >>> face1_embeddings = face_recognition.get_embeddings_from_file(\"route/to/image_of_face1.jpg\")\n >>> face2_embeddings = face_recognition.get_embeddings_from_file(\"route/to/image_of_face2.jpg\")\n >>> print(face1_embeddings - face2_embeddings)\n 0.5634614628831894\n\nA value close to 0 indicates that two faces might be of the same person. In this example, image_of_face1.jpg and image_of_face2.jpg are likely to be of the same person. Otherwise, a value over 1.0 might indicate that two faces are not likely to be of the same person.\n\nThis might lead to a scenario where you store lot of embeddings and want to compare a single one with each of them, resulting in a loop like the following:\n\n.. code:: python\n\n faces_embeddings = [emb1, emb2, ..., embN]\n\n new_embedding = face_recognition.get_embeddings_from_file(\"route/to/image_of_face1.jpg\")\n\n for embedding in faces_embeddings:\n distance = embedding - new_embedding\n\nRather than using a loop (even if it is a list-comprehension), there is an optimized and preferred way of performing such a comparison that can be used instead:\n\n.. code:: python\n\n faces_embeddings = [emb1, emb2, ..., embN]\n\n new_embedding = face_recognition.get_embedding_from_file(\"route/to/image_of_face1.jpg\")\n distances = face_recognition.get_embeddings_distances(new_embedding, faces_embeddings)\n\n\nReferences\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.. [SCHROFF2015] Schroff, F., Kalenichenko, D., & Philbin, J. (2015). Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE Conference on CVPR (pp. 815-823).\n\n.. [WEN2016] Wen, Y., Zhang, K., Li, Z., & Qiao, Y. (2016, October). A discriminative feature learning approach for deep face recognition. In ECCV (pp. 499-515). Springer International Publishing.\n\n.. [PARKHI2015] Parkhi, O. M., Vedaldi, A., & Zisserman, A. (2015, September). Deep Face Recognition. In BMVC (Vol. 1, No. 3, p. 6).\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ipazc/vrpwrp", "keywords": "vrpwrp face_detection face_recognition face deep-learning computer vision face detection face recognition api rest wrapper", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "vrpwrp", "package_url": "https://pypi.org/project/vrpwrp/", "platform": "", "project_url": "https://pypi.org/project/vrpwrp/", "project_urls": { "Homepage": "http://github.com/ipazc/vrpwrp" }, "release_url": "https://pypi.org/project/vrpwrp/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "Vision-algorithms Requests Processing Wrappers for deep-learning Computer Vision algorithms on the cloud.", "version": "0.0.7" }, "last_serial": 3239837, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "f9cbe5c558e1282471ae3d5daaf5bf64", "sha256": "672080e243481fef05e8820927da9c8e71a9655bbbe430a03ce1e55c3e2c359f" }, "downloads": -1, "filename": "vrpwrp-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f9cbe5c558e1282471ae3d5daaf5bf64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9017, "upload_time": "2017-09-07T08:49:39", "url": "https://files.pythonhosted.org/packages/90/50/58fac7c38d494c7266be0789c52514dc082aaf2c42d07f66271d60a81447/vrpwrp-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "ae19261538e1692c6999562aaf39ad56", "sha256": "528884ef39848834bbfa73abf4004901a0c798f70a93fd23c4032f597e92df8e" }, "downloads": -1, "filename": "vrpwrp-0.0.3.tar.gz", "has_sig": false, "md5_digest": "ae19261538e1692c6999562aaf39ad56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12551, "upload_time": "2017-09-07T16:25:39", "url": "https://files.pythonhosted.org/packages/ca/6c/7a4e7816592b77ab8e7a0aa6a5f3bfe428f9e6788cd4e30634aa8e2bba8d/vrpwrp-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "a2de0fe157bf7b07d4052532bad37234", "sha256": "6280e41058743ea154e6c41b1dac6abe043a245e36e28c7fa60dedb961a3c575" }, "downloads": -1, "filename": "vrpwrp-0.0.4.tar.gz", "has_sig": false, "md5_digest": "a2de0fe157bf7b07d4052532bad37234", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16088, "upload_time": "2017-09-20T16:16:06", "url": "https://files.pythonhosted.org/packages/26/93/2d1a062f471e8174874778600c38cc18d4806677b6e0c7413845a971e94d/vrpwrp-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "3c7e1079ff4dc2ae8dd0edc5b683d52c", "sha256": "60477d2e7859e588f1e12622aad1fe31e96ecc168c16b6d7a8c1fd6c4d583880" }, "downloads": -1, "filename": "vrpwrp-0.0.5.tar.gz", "has_sig": false, "md5_digest": "3c7e1079ff4dc2ae8dd0edc5b683d52c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16078, "upload_time": "2017-09-21T11:02:03", "url": "https://files.pythonhosted.org/packages/fc/b3/7e879a392a8c7e9ad2deca8c8879f91f422da5bd756d3a113dfab377132c/vrpwrp-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "e4dd06c78157dd6aca22c57af04e75b5", "sha256": "a5e5862b0fccd2eb0693acb869bd3b5f4f7358362b780da33e4454dac16e6f75" }, "downloads": -1, "filename": "vrpwrp-0.0.6.tar.gz", "has_sig": false, "md5_digest": "e4dd06c78157dd6aca22c57af04e75b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14596, "upload_time": "2017-10-02T20:30:11", "url": "https://files.pythonhosted.org/packages/eb/2a/945e92fe4e5f2005519b662f5f49c76f50a840893c55d44fbca3f3a3ddaf/vrpwrp-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "a9b5c4972b301939c164403f1902fe01", "sha256": "d29e50e7cc80f64049759514b4898af686484f240269c5b3b7e8753cb441c2f5" }, "downloads": -1, "filename": "vrpwrp-0.0.7.tar.gz", "has_sig": false, "md5_digest": "a9b5c4972b301939c164403f1902fe01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16438, "upload_time": "2017-10-10T16:01:32", "url": "https://files.pythonhosted.org/packages/01/62/3ac33367e2361eac54c3381ff9f799e57a91e4108638f920d3c8e092ff72/vrpwrp-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9b5c4972b301939c164403f1902fe01", "sha256": "d29e50e7cc80f64049759514b4898af686484f240269c5b3b7e8753cb441c2f5" }, "downloads": -1, "filename": "vrpwrp-0.0.7.tar.gz", "has_sig": false, "md5_digest": "a9b5c4972b301939c164403f1902fe01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16438, "upload_time": "2017-10-10T16:01:32", "url": "https://files.pythonhosted.org/packages/01/62/3ac33367e2361eac54c3381ff9f799e57a91e4108638f920d3c8e092ff72/vrpwrp-0.0.7.tar.gz" } ] }