{"id":13444124,"url":"https://github.com/zxxml/PyFaceDet","last_synced_at":"2025-03-20T18:30:37.715Z","repository":{"id":45717528,"uuid":"194888066","full_name":"zxxml/PyFaceDet","owner":"zxxml","description":"PyFaceDet is a Python wrapper of libfacedetection. PyFaceDet 是 libfacedetection 人性化的 Python 封装。","archived":false,"fork":false,"pushed_at":"2019-07-25T14:33:02.000Z","size":3742,"stargazers_count":66,"open_issues_count":9,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T15:10:22.204Z","etag":null,"topics":["libfacedetection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zxxml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-02T15:16:33.000Z","updated_at":"2024-11-17T15:55:10.000Z","dependencies_parsed_at":"2022-09-23T05:13:43.062Z","dependency_job_id":null,"html_url":"https://github.com/zxxml/PyFaceDet","commit_stats":null,"previous_names":["zxxml/pyface"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxxml%2FPyFaceDet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxxml%2FPyFaceDet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxxml%2FPyFaceDet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxxml%2FPyFaceDet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zxxml","download_url":"https://codeload.github.com/zxxml/PyFaceDet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244669856,"owners_count":20490867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libfacedetection"],"created_at":"2024-07-31T03:02:19.696Z","updated_at":"2025-03-20T18:30:37.704Z","avatar_url":"https://github.com/zxxml.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# PyFaceDet\nPyFaceDet is a Python wrapper of libfacedetection. PyFaceDet 是 libfacedetection 人性化的 Python 封装。\n\n## 中文文档\n\n### 作用\n\nPyFaceDet 旨在提供跨平台的开箱即用的人脸检测 API。\n\n### 优点\n\n- 跨平台（已在 Windows 10 x86_64 和 Ubuntu 18.04 x86_64 测试通过）\n- 开箱即用（提供单一的 API，它可以接收不同类型的输入，并且返回统一的结果）\n- 依赖项少（使用 `ctypes` 封装，只因功能需求引入 `pillow` 和 `numpy` 两个外部依赖）\n- 性能损耗少（一定程度上优化了对 Python 数据结构的处理，还将继续进行优化）\n\n### 使用方式\n\n\u003cdel\u003e将本项目存放到你喜欢的位置，然后想办法引用其中的 `facedetectcnn.py` 文件，该文件提供的 API 如下所示。\u003c/del\u003e\n\n使用 `pip install PyFaceDet` 安装它，然后在你的 Python 代码中导入它。顶层文件提供的 API 如下所示。\n\n```python\nfacedetect_cnn(image: Union[str, Path, Image, np.ndarray, bytes], width: int = 0, height: int = 0, step: int = 0) -\u003e Faces\n```\n\n你可以根据自己的需要传入图像路径（以字符串或 `Path` 对象的形式）、`PIL Image` 对象、BGR 格式的 `numpy` 数组或 `bytes` 对象。\n\n当你传入 `PIL Image` 对象时，你可以选择同时提供 `width` 和 `height` 参数以修改传入 libfacedetection 的图像尺寸（请注意这还将**影响所得的结果**）。\n\n当你传入 `bytes` 对象时，你必须同时提供 `width`、`height` 和 `step` 参数，它们分别代表图像的宽度、高度和每行字节数（通常为宽度的 3 倍）。\n\n返回的 `Faces` 类型实际上是 `List[Tuple[int, int, int, int, int, int]]` 类型，六个整数分别为横坐标、纵坐标、长度、宽度、置信度、角度。\n\n如果你正在使用如 PyCharm 等 IDE，你可能后发现顶层文件还提供其他两个 API。目前来说，它们仅仅是上述 API 的别名，你可以根据自己的喜好使用它们。\n\n### 开发计划\n\n- [ ] 开箱即用的多线程支持\n- [ ] 树莓派支持（Raspbian）\n- [ ] 更多的 Linux 发行版测试\n\n## English\n\nTODO","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxxml%2FPyFaceDet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzxxml%2FPyFaceDet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxxml%2FPyFaceDet/lists"}