gesichtfinder


Namegesichtfinder JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/gesichtfinder
SummaryExtracts faces from an image using different backend detectors and save the results in a DataFrame.
upload_time2023-07-18 23:33:14
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords extract faces
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Extracts faces from an image using different backend detectors and save the results in a DataFrame.

## pip install gesichtfinder 

#### Tested against Windows 10 / Python 3.10 / Anaconda 



```python

    This function utilizes the deepface library for face detection, allowing you to choose from various backend detectors
    for detecting faces in an image. The detected face regions can be optionally cropped and stored in the DataFrame.

    Parameters:
        img (str or ndarray): The path to the input image or the image's numpy array representation (RGB format).
        cut_out_faces (bool, optional): If True, the detected face regions will be cropped and stored in the DataFrame.
                                        If False, only face coordinates and attributes will be included. Default is True.
        backends (tuple, optional): A tuple containing the names of the backend detectors to use for face detection.
                                    Available backends include 'opencv' and 'retinaface'.
                                    Default is ('opencv', 'retinaface').
        **kwargs: Additional keyword arguments to be passed to the deepface.extract_faces function.
                  You can specify options like min_face_size, model, enforce_detection, and more.

    Returns:
        pandas.DataFrame: A DataFrame containing details of the detected faces and their attributes, including:
            - 'x': X-coordinate of the top-left corner of the detected face bounding box.
            - 'y': Y-coordinate of the top-left corner of the detected face bounding box.
            - 'w': Width of the detected face bounding box.
            - 'h': Height of the detected face bounding box.
            - 'end_x': X-coordinate of the bottom-right corner of the detected face bounding box.
            - 'end_y': Y-coordinate of the bottom-right corner of the detected face bounding box.
            - 'confidence': Confidence score of the face detection.
            - 'backend': The backend detector used for the detection.
            - 'faces' (optional): Cropped face regions if 'cut_out_faces' is True.

    Example:
        # Import the required libraries
        # Example usage:
        from gesichtfinder import get_faces
        df = get_faces(img=r"c:\asy.jpg", cut_out_faces=True, backends=('opencv', 'retinaface'))
        print(df)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/gesichtfinder",
    "name": "gesichtfinder",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "extract,faces",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a4/04/90ac108fb090e539fcba33e00c565e38b517bfef0ad631bb2d2d83905014/gesichtfinder-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Extracts faces from an image using different backend detectors and save the results in a DataFrame.\r\n\r\n## pip install gesichtfinder \r\n\r\n#### Tested against Windows 10 / Python 3.10 / Anaconda \r\n\r\n\r\n\r\n```python\r\n\r\n    This function utilizes the deepface library for face detection, allowing you to choose from various backend detectors\r\n    for detecting faces in an image. The detected face regions can be optionally cropped and stored in the DataFrame.\r\n\r\n    Parameters:\r\n        img (str or ndarray): The path to the input image or the image's numpy array representation (RGB format).\r\n        cut_out_faces (bool, optional): If True, the detected face regions will be cropped and stored in the DataFrame.\r\n                                        If False, only face coordinates and attributes will be included. Default is True.\r\n        backends (tuple, optional): A tuple containing the names of the backend detectors to use for face detection.\r\n                                    Available backends include 'opencv' and 'retinaface'.\r\n                                    Default is ('opencv', 'retinaface').\r\n        **kwargs: Additional keyword arguments to be passed to the deepface.extract_faces function.\r\n                  You can specify options like min_face_size, model, enforce_detection, and more.\r\n\r\n    Returns:\r\n        pandas.DataFrame: A DataFrame containing details of the detected faces and their attributes, including:\r\n            - 'x': X-coordinate of the top-left corner of the detected face bounding box.\r\n            - 'y': Y-coordinate of the top-left corner of the detected face bounding box.\r\n            - 'w': Width of the detected face bounding box.\r\n            - 'h': Height of the detected face bounding box.\r\n            - 'end_x': X-coordinate of the bottom-right corner of the detected face bounding box.\r\n            - 'end_y': Y-coordinate of the bottom-right corner of the detected face bounding box.\r\n            - 'confidence': Confidence score of the face detection.\r\n            - 'backend': The backend detector used for the detection.\r\n            - 'faces' (optional): Cropped face regions if 'cut_out_faces' is True.\r\n\r\n    Example:\r\n        # Import the required libraries\r\n        # Example usage:\r\n        from gesichtfinder import get_faces\r\n        df = get_faces(img=r\"c:\\asy.jpg\", cut_out_faces=True, backends=('opencv', 'retinaface'))\r\n        print(df)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extracts faces from an image using different backend detectors and save the results in a DataFrame.",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/gesichtfinder"
    },
    "split_keywords": [
        "extract",
        "faces"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d89ac36dfba1a96325e2aef01e27c79cdde97731aabfdeaeaeb5827f071de012",
                "md5": "6eec4f66d364d41bf57a314a1ad8ee01",
                "sha256": "4c202e92d22a1a8f0cba7f67f48720217e9c30d58b187f00c3617d4b2a15185d"
            },
            "downloads": -1,
            "filename": "gesichtfinder-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6eec4f66d364d41bf57a314a1ad8ee01",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7485,
            "upload_time": "2023-07-18T23:33:12",
            "upload_time_iso_8601": "2023-07-18T23:33:12.144715Z",
            "url": "https://files.pythonhosted.org/packages/d8/9a/c36dfba1a96325e2aef01e27c79cdde97731aabfdeaeaeb5827f071de012/gesichtfinder-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a40490ac108fb090e539fcba33e00c565e38b517bfef0ad631bb2d2d83905014",
                "md5": "9726d7252a4f5b777fc1e8586cf631b5",
                "sha256": "483a450edb7d50863e0b56b456ec1659ea4dd49a7c2922a77e3b901617f38cd5"
            },
            "downloads": -1,
            "filename": "gesichtfinder-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "9726d7252a4f5b777fc1e8586cf631b5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4977,
            "upload_time": "2023-07-18T23:33:14",
            "upload_time_iso_8601": "2023-07-18T23:33:14.956510Z",
            "url": "https://files.pythonhosted.org/packages/a4/04/90ac108fb090e539fcba33e00c565e38b517bfef0ad631bb2d2d83905014/gesichtfinder-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-18 23:33:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "gesichtfinder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "gesichtfinder"
}
        
Elapsed time: 0.10016s