[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-1adrianb--face-alignment":3,"tool-1adrianb--face-alignment":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":81,"owner_twitter":80,"owner_website":82,"owner_url":83,"languages":84,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":10,"env_os":97,"env_gpu":98,"env_ram":99,"env_deps":100,"category_tags":108,"github_topics":109,"view_count":115,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":116,"updated_at":117,"faqs":118,"releases":154},240,"1adrianb\u002Fface-alignment","face-alignment",":fire: 2D and 3D Face alignment library build using pytorch ","face-alignment 是一个基于 PyTorch 的开源库，专注于从图像中精准检测人脸关键点（即面部特征点），支持输出 2D 和 3D 坐标。它采用 Adrian Bulat 提出的先进深度学习方法 FAN（Face Alignment Network），在多个公开数据集上达到业界领先的精度。该工具解决了传统方法在复杂姿态、遮挡或光照变化下定位不准的问题，能稳定识别人脸上的数十个关键点，如眼睛、鼻子、嘴巴轮廓等。\n\nface-alignment 特别适合计算机视觉领域的开发者和研究人员使用，可用于人脸识别、表情分析、虚拟试妆、3D 人脸建模等任务。它提供灵活的接口，支持多种人脸检测器（如 SFD、dlib、BlazeFace），并可指定使用 CPU 或 GPU（包括 Apple M 系列芯片）加速推理，还支持批量处理整个文件夹的图像。虽然普通用户也能调用，但需具备基础的 Python 编程能力。其核心优势在于高精度、多维度（2D\u002F3D）支持以及与主流深度学习框架的良好集成。","# Face Recognition\n\nDetect facial landmarks from Python using the world's most accurate face alignment network, capable of detecting points in both 2D and 3D coordinates.\n\nBuild using [FAN](https:\u002F\u002Fwww.adrianbulat.com)'s state-of-the-art deep learning based face alignment method. \n\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F1adrianb_face-alignment_readme_d7add0c198f1.gif\" \u002F>\u003C\u002Fp>\n\n**Note:** The lua version is available [here](https:\u002F\u002Fgithub.com\u002F1adrianb\u002F2D-and-3D-face-alignment).\n\nFor numerical evaluations it is highly recommended to use the lua version which uses indentical models with the ones evaluated in the paper. More models will be added soon.\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-BSD%203--Clause-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FBSD-3-Clause)  [![Test Face alignmnet](https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fworkflows\u002FTest%20Face%20alignmnet\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Factions?query=workflow%3A%22Test+Face+alignmnet%22) [![Anaconda-Server Badge](https:\u002F\u002Fanaconda.org\u002F1adrianb\u002Fface_alignment\u002Fbadges\u002Fversion.svg)](https:\u002F\u002Fanaconda.org\u002F1adrianb\u002Fface_alignment)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fface-alignment.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fface-alignment\u002F)\n\n## Features\n\n#### Detect 2D facial landmarks in pictures\n\n\u003Cp align='center'>\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F1adrianb_face-alignment_readme_520dd2c84943.png' title='3D-FAN-Full example' style='max-width:600px'>\u003C\u002Fimg>\n\u003C\u002Fp>\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)\n\ninput = io.imread('..\u002Ftest\u002Fassets\u002Faflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n#### Detect 3D facial landmarks in pictures\n\n\u003Cp align='center'>\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F1adrianb_face-alignment_readme_71eb9160075e.png' title='3D-FAN-Full example' style='max-width:600px'>\u003C\u002Fimg>\n\u003C\u002Fp>\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.THREE_D, flip_input=False)\n\ninput = io.imread('..\u002Ftest\u002Fassets\u002Faflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n#### Process an entire directory in one go\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)\n\npreds = fa.get_landmarks_from_directory('..\u002Ftest\u002Fassets\u002F')\n```\n\n#### Detect the landmarks using a specific face detector.\n\nBy default the package will use the SFD face detector. However the users can alternatively use dlib, BlazeFace, or pre-existing ground truth bounding boxes.\n\n```python\nimport face_alignment\n\n# sfd for SFD, dlib for Dlib and folder for existing bounding boxes.\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, face_detector='sfd')\n```\n\n#### Running on CPU\u002FGPU\nIn order to specify the device (GPU or CPU) on which the code will run one can explicitly pass the device flag:\n\n```python\nimport torch\nimport face_alignment\n\n# cuda for CUDA, mps for Apple M1\u002F2 GPUs.\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device='cpu')\n\n# running using lower precision\nfa = fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, dtype=torch.bfloat16, device='cuda')\n```\n\nPlease also see the ``examples`` folder\n\n#### Supported face detectors\n\n```python\n\n# dlib (fast, may miss faces)\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='dlib')\n\n# SFD (likely best results, but slowest)\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='sfd')\n\n# Blazeface (front camera model)\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='blazeface')\n\n# Blazeface (back camera model)\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='blazeface', face_detector_kwargs={'back_model': True})\n\n```\n\n## Installation\n\n### Requirements\n\n* Python 3.5+ (it may work with other versions too). Last version with support for python 2.7 was v1.1.1\n* Linux, Windows or macOS\n* pytorch (>=1.5)\n\nWhile not required, for optimal performance(especially for the detector) it is **highly** recommended to run the code using a CUDA enabled GPU.\n\n### Binaries\n\nThe easiest way to install it is using either pip or conda:\n\n| **Using pip**                | **Using conda**                            |\n|------------------------------|--------------------------------------------|\n| `pip install face-alignment` | `conda install -c 1adrianb face_alignment` |\n|                              |                                            |\n\nAlternatively, bellow, you can find instruction to build it from source.\n\n### From source\n\n Install pytorch and pytorch dependencies. Please check the [pytorch readme](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fpytorch) for this.\n\n#### Get the Face Alignment source code\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\n```\n#### Install the Face Alignment lib\n```bash\npip install -r requirements.txt\npython setup.py install\n```\n\n### Docker image\n\nA Dockerfile is provided to build images with cuda support and cudnn. For more instructions about running and building a docker image check the orginal Docker documentation.\n```\ndocker build -t face-alignment .\n```\n\n## How does it work?\n\nWhile here the work is presented as a black-box, if you want to know more about the intrisecs of the method please check the original paper either on arxiv or my [webpage](https:\u002F\u002Fwww.adrianbulat.com).\n\n## Contributions\n\nAll contributions are welcomed. If you encounter any issue (including examples of images where it fails) feel free to open an issue. If you plan to add a new features please open an issue to discuss this prior to making a pull request.\n\n## Citation\n\n```\n@inproceedings{bulat2017far,\n  title={How far are we from solving the 2D \\& 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)},\n  author={Bulat, Adrian and Tzimiropoulos, Georgios},\n  booktitle={International Conference on Computer Vision},\n  year={2017}\n}\n```\n\nFor citing dlib, pytorch or any other packages used here please check the original page of their respective authors.\n\n## Acknowledgements\n\n* To the [pytorch](http:\u002F\u002Fpytorch.org\u002F) team for providing such an awesome deeplearning framework\n* To [my supervisor](http:\u002F\u002Fwww.cs.nott.ac.uk\u002F~pszyt\u002F) for his patience and suggestions.\n* To all other python developers that made available the rest of the packages used in this repository.","# 人脸关键点检测（Face Recognition）\n\n使用全球最精准的人脸对齐（face alignment）网络，从 Python 中检测人脸关键点（facial landmarks），支持 2D 和 3D 坐标。\n\n本项目基于 [FAN](https:\u002F\u002Fwww.adrianbulat.com) 提出的前沿深度学习人脸对齐方法构建。\n\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F1adrianb_face-alignment_readme_d7add0c198f1.gif\" \u002F>\u003C\u002Fp>\n\n**注意：** Lua 版本可在此处获取：[here](https:\u002F\u002Fgithub.com\u002F1adrianb\u002F2D-and-3D-face-alignment)。\n\n如需进行数值评估（numerical evaluations），强烈建议使用 Lua 版本，因其使用了与论文中评估完全相同的模型。更多模型将很快添加。\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-BSD%203--Clause-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FBSD-3-Clause)  [![Test Face alignmnet](https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fworkflows\u002FTest%20Face%20alignmnet\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Factions?query=workflow%3A%22Test+Face+alignmnet%22) [![Anaconda-Server Badge](https:\u002F\u002Fanaconda.org\u002F1adrianb\u002Fface_alignment\u002Fbadges\u002Fversion.svg)](https:\u002F\u002Fanaconda.org\u002F1adrianb\u002Fface_alignment)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fface-alignment.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fface-alignment\u002F)\n\n## 功能特性\n\n#### 在图片中检测 2D 人脸关键点\n\n\u003Cp align='center'>\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F1adrianb_face-alignment_readme_520dd2c84943.png' title='3D-FAN-Full example' style='max-width:600px'>\u003C\u002Fimg>\n\u003C\u002Fp>\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)\n\ninput = io.imread('..\u002Ftest\u002Fassets\u002Faflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n#### 在图片中检测 3D 人脸关键点\n\n\u003Cp align='center'>\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F1adrianb_face-alignment_readme_71eb9160075e.png' title='3D-FAN-Full example' style='max-width:600px'>\u003C\u002Fimg>\n\u003C\u002Fp>\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.THREE_D, flip_input=False)\n\ninput = io.imread('..\u002Ftest\u002Fassets\u002Faflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n#### 一次性处理整个目录中的图片\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)\n\npreds = fa.get_landmarks_from_directory('..\u002Ftest\u002Fassets\u002F')\n```\n\n#### 使用指定的人脸检测器（face detector）检测关键点\n\n默认情况下，本包使用 SFD 人脸检测器。但用户也可以选择使用 dlib、BlazeFace，或使用已有的真实边界框（ground truth bounding boxes）。\n\n```python\nimport face_alignment\n\n# sfd 表示 SFD，dlib 表示 Dlib，folder 表示使用已有边界框。\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, face_detector='sfd')\n```\n\n#### 在 CPU\u002FGPU 上运行\n\n可通过显式传递 device 参数来指定代码运行的设备（GPU 或 CPU）：\n\n```python\nimport torch\nimport face_alignment\n\n# cuda 表示 CUDA，mps 表示 Apple M1\u002F2 GPU。\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device='cpu')\n\n# 使用较低精度运行\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, dtype=torch.bfloat16, device='cuda')\n```\n\n请同时参阅 ``examples`` 文件夹中的示例。\n\n#### 支持的人脸检测器\n\n```python\n\n# dlib（速度快，但可能漏检人脸）\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='dlib')\n\n# SFD（效果可能最好，但速度最慢）\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='sfd')\n\n# Blazeface（前置摄像头模型）\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='blazeface')\n\n# Blazeface（后置摄像头模型）\nmodel = FaceAlignment(landmarks_type= LandmarksType.TWO_D, face_detector='blazeface', face_detector_kwargs={'back_model': True})\n\n```\n\n## 安装\n\n### 要求\n\n* Python 3.5+（其他版本也可能可用）。最后一个支持 Python 2.7 的版本是 v1.1.1\n* Linux、Windows 或 macOS\n* pytorch (>=1.5)\n\n虽然非必需，但为了获得最佳性能（尤其是人脸检测器部分），**强烈推荐**在支持 CUDA 的 GPU 上运行本代码。\n\n### 二进制安装\n\n最简单的安装方式是使用 pip 或 conda：\n\n| **使用 pip**                | **使用 conda**                            |\n|------------------------------|--------------------------------------------|\n| `pip install face-alignment` | `conda install -c 1adrianb face_alignment` |\n|                              |                                            |\n\n此外，下方提供了从源码构建的说明。\n\n### 从源码安装\n\n首先安装 pytorch 及其依赖项。请参考 [pytorch readme](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fpytorch) 获取详细信息。\n\n#### 获取 Face Alignment 源码\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\n```\n#### 安装 Face Alignment 库\n```bash\npip install -r requirements.txt\npython setup.py install\n```\n\n### Docker 镜像\n\n项目提供了一个 Dockerfile，可用于构建支持 CUDA 和 cuDNN 的镜像。有关构建和运行 Docker 镜像的更多说明，请查阅官方 Docker 文档。\n```bash\ndocker build -t face-alignment .\n```\n\n## 工作原理\n\n虽然此处将本工具作为黑盒呈现，但如果您希望深入了解该方法的内部机制，请查阅发表在 arXiv 或作者 [个人网页](https:\u002F\u002Fwww.adrianbulat.com) 上的原始论文。\n\n## 贡献\n\n欢迎任何形式的贡献。如果您遇到任何问题（包括本工具失效的图像示例），请随时提交 issue。如果您计划新增功能，请在提交 pull request 前先开一个 issue 进行讨论。\n\n## 引用\n\n```\n@inproceedings{bulat2017far,\n  title={How far are we from solving the 2D \\& 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)},\n  author={Bulat, Adrian and Tzimiropoulos, Georgios},\n  booktitle={International Conference on Computer Vision},\n  year={2017}\n}\n```\n\n如需引用 dlib、pytorch 或本项目使用的其他软件包，请查阅各自作者的原始页面。\n\n## 致谢\n\n* 感谢 [pytorch](http:\u002F\u002Fpytorch.org\u002F) 团队提供了如此出色的深度学习框架\n* 感谢 [我的导师](http:\u002F\u002Fwww.cs.nott.ac.uk\u002F~pszyt\u002F) 的耐心指导与建议\n* 感谢所有其他 Python 开发者，他们开源了本项目所依赖的其余软件包","# face-alignment 快速上手指南\n\n## 环境准备\n\n- **操作系统**：Linux、Windows 或 macOS  \n- **Python 版本**：3.5+（推荐使用 3.7 及以上）  \n- **核心依赖**：\n  - PyTorch ≥ 1.5（建议使用 CUDA 版本以获得最佳性能）\n  - 若使用 GPU，需确保已安装对应版本的 CUDA 和 cuDNN\n\n> 💡 **提示**：如在国内，建议使用清华源等镜像加速 PyTorch 安装：\n> ```bash\n> pip install torch torchvision --extra-index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n## 安装步骤\n\n### 推荐方式（使用 pip）\n\n```bash\npip install face-alignment\n```\n\n### 或使用 conda（含国内镜像加速建议）\n\n```bash\nconda install -c 1adrianb face_alignment\n```\n\n> 若 conda 下载缓慢，可配置清华 Anaconda 镜像：\n> ```bash\n> conda config --add channels https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fanaconda\u002Fcloud\u002F1adrianb\u002F\n> conda install face_alignment\n> ```\n\n### 从源码安装（可选）\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\ncd face-alignment\npip install -r requirements.txt\npython setup.py install\n```\n\n## 基本使用\n\n### 检测图像中的 2D 人脸关键点\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)\n\ninput = io.imread('..\u002Ftest\u002Fassets\u002Faflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n### 检测图像中的 3D 人脸关键点\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.THREE_D, flip_input=False)\n\ninput = io.imread('..\u002Ftest\u002Fassets\u002Faflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n### 指定运行设备（CPU\u002FGPU）\n\n```python\n# 使用 CPU\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device='cpu')\n\n# 使用 CUDA GPU\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device='cuda')\n\n# Apple M1\u002FM2 GPU（需 PyTorch 支持 MPS）\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device='mps')\n```\n\n> 更多示例请参考项目 `examples` 目录。","某短视频平台的美颜滤镜开发团队正在构建新一代实时人脸特效系统，需要精准识别人脸关键点以实现自然贴合的妆容和动态贴纸效果。\n\n### 没有 face-alignment 时\n- 团队依赖传统 OpenCV 或 dlib 的68点检测模型，在侧脸、低头或光照复杂场景下关键点漂移严重，导致虚拟眼镜“浮”在空中。\n- 无法获取深度信息，3D贴纸（如兔耳朵）只能基于2D平面模拟，缺乏真实透视感，用户体验生硬。\n- 需手动集成多个开源组件（人脸检测 + 对齐 + 坐标映射），代码耦合度高，调试耗时。\n- 处理批量用户上传图片时需逐张调用接口，效率低下，难以满足后台批量审核需求。\n- 在移动端部署时，因模型精度与速度难以兼顾，常需牺牲效果换取帧率。\n\n### 使用 face-alignment 后\n- 利用其基于FAN网络的高精度2D\u002F3D关键点检测能力，即使在大角度姿态下也能稳定输出68个甚至更多精准坐标，贴纸严丝合缝贴合面部轮廓。\n- 直接调用 THREE_D 模式获取带Z轴深度的坐标，轻松实现具有真实空间感的3D特效，显著提升沉浸感。\n- 一行代码即可完成从图像输入到关键点输出的全流程，无需拼接多个库，开发效率大幅提升。\n- 通过 get_landmarks_from_directory 接口一键处理整个素材目录，加速离线数据标注与审核流程。\n- 支持灵活切换 SFD、BlazeFace 等检测器，并可在 CPU\u002FGPU\u002FMPS 上运行，便于在服务端与移动端做性能-精度权衡。\n\nface-alignment 以开箱即用的高精度2D\u002F3D人脸对齐能力，成为构建专业级人脸交互应用的核心基础设施。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F1adrianb_face-alignment_520dd2c8.png","1adrianb","Adrian Bulat","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002F1adrianb_7d60a234.png","AI Researcher at Samsung AI, member of the deeplearning cult.","Samsung AI Research",null,"adrian@adrianbulat.com","https:\u002F\u002Fwww.adrianbulat.com","https:\u002F\u002Fgithub.com\u002F1adrianb",[85,89],{"name":86,"color":87,"percentage":88},"Python","#3572A5",98.7,{"name":90,"color":91,"percentage":92},"Dockerfile","#384d54",1.3,7507,1383,"2026-04-04T16:05:01","BSD-3-Clause","Linux, Windows, macOS","非必需，但推荐使用 CUDA 启用的 GPU（如 NVIDIA 显卡）以获得最佳性能；支持 Apple M1\u002F2 GPU（通过 MPS）；未说明具体显存和 CUDA 版本要求","未说明",{"notes":101,"python":102,"dependencies":103},"可通过 pip 或 conda 安装；支持多种人脸检测器（SFD、dlib、BlazeFace）；首次运行会自动下载预训练模型；可指定运行设备（CPU、CUDA、MPS）及数据精度（如 bfloat16）","3.5+",[104,67,105,106,107],"torch>=1.5","skimage","dlib","blazeface",[13,14],[110,111,67,112,113,114],"python","deep-learning","face-detector","pytorch","face-detection",11,"2026-03-27T02:49:30.150509","2026-04-06T05:18:00.766011",[119,124,129,134,139,144,149],{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},727,"如何使用自定义的人脸检测模块或传入已裁剪的人脸区域？","可以将人脸检测结果（边界框）以 [x1, y1, x2, y2, 置信度] 的格式传给 get_landmarks 方法。注意：必须是坐标形式（而非 [x, y, w, h]），且需添加置信度（如 1）。例如：newL = [[x1, y1, x2, y2, 1]]，然后调用 fa.get_landmarks(image, newL)。","https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fissues\u002F163",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},728,"安装时出现 'install_requires' 错误怎么办？","该错误通常是因为 PyTorch 版本过低。请确保安装的是 PyTorch 0.2 或更高版本。此外，请不要使用 sudo python setup.py install，推荐使用 pip install face-alignment 进行安装。","https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fissues\u002F25",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},729,"PyTorch 和原始 Torch 实现的 2D 人脸对齐精度为何不同？","早期模型文件存在差异。解决方法是更新到最新版本的 face-alignment 库，并调用 remove_models() 方法删除旧模型（或手动删除 ~\u002F.face_alignment 目录下的模型），系统会自动重新下载统一的新模型，此时精度应与原始 Torch 版本基本一致。","https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fissues\u002F32",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},730,"模型无法自动下载，出现 cPickle.UnpicklingError 怎么办？","可手动下载模型文件并放入 ~\u002F.face_alignment\u002Fdata 目录。百度网盘链接：https:\u002F\u002Fpan.baidu.com\u002Fs\u002F15ap3uhfOA2hG8x9v3P13OA，密码：84om。下载后确保文件名和路径正确。","https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fissues\u002F62",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},731,"如何获取人脸检测或关键点对齐的置信度分数？","从 v1.3 起，get_landmarks 方法支持返回置信度。当 landmarks_confidence 或 detected_faces 参数为 True 时，函数会返回 (landmarks, detection_scores, landmark_scores) 三个值。注意：置信度分数不一定在 (0,1) 范围内，可能是任意实数（如 1.7 左右）。","https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fissues\u002F262",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},732,"运行时出现 AttributeError: 's3fd' object has no attribute 'to' 错误怎么办？","此错误通常因 PyTorch 版本不兼容导致。请确保使用 PyTorch 1.0 或更高版本。如果问题仍存在，尝试重新安装 face-alignment 及其依赖项，或检查是否在 CPU 模式下错误地启用了 CUDA。","https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fissues\u002F108",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},733,"SSL 协议错误导致模型下载失败（ssl.SSLEOFError）如何解决？","该问题通常出现在较旧的 Python 或 OpenSSL 环境中。建议升级 Python 到 3.6+，或手动下载模型文件（见 Issue #62 提供的链接）并放置到 ~\u002F.face_alignment\u002Fdata 目录，避免自动下载。","https:\u002F\u002Fgithub.com\u002F1adrianb\u002Fface-alignment\u002Fissues\u002F65",[155,160,165,170,175,180,185,190,195,200,205,210,215],{"id":156,"version":157,"summary_zh":158,"released_at":159},100297,"v1.4.1","Improved the speed of the face detection module, thanks @SCZwangxiao !\r\nImproved the speed up of the directory wide localization by minimising the I\u002FO wait.","2023-08-17T14:37:33",{"id":161,"version":162,"summary_zh":163,"released_at":164},100298,"v1.4.0","Added support for back camere blaze model\r\nExposed the dtype for fp16 support\r\nSmall fixes and cleanup","2023-06-06T12:53:09",{"id":166,"version":167,"summary_zh":168,"released_at":169},100299,"v1.3.6","Small fixes and package updates","2023-06-06T11:27:12",{"id":171,"version":172,"summary_zh":173,"released_at":174},100300,"v1.3.4","[Add] Added option to return the bounding boxes too (#270)\r\n[Change] Change the print to warning (#265)\r\n[Change] Minor cleanup\r\n[Fix] Negative stride error\r\n","2021-04-28T22:15:40",{"id":176,"version":177,"summary_zh":178,"released_at":179},100301,"v1.3.2","Changelog:\r\n* Fix critical issue on pytorch 1.5.x and 1.6.0 (#241)","2020-12-21T14:18:01",{"id":181,"version":182,"summary_zh":183,"released_at":184},100302,"v1.3.1","Changelog:\r\n* Increased speed up subsequent runs significantly\r\n* Fixed device mismatch issue on SFD detector","2020-12-19T09:19:28",{"id":186,"version":187,"summary_zh":188,"released_at":189},100303,"v1.3.0","Changelog:\r\n*  Increased the model speed between 1.3-2x, especially for 3D landmarks\r\n*  Improved the initialization time\r\n*  Fixed issues with RGB vs BGR and batched vs not batched, added unit tests for it\r\n*  Fixed unit test\r\n*  Code refactoring\r\n*  Fix transpose issue in blazeface detector (thank to @Serega6678 )\r\n\r\n\r\n","2020-12-19T00:38:27",{"id":191,"version":192,"summary_zh":193,"released_at":194},100304,"v1.2.0","Changelog:\r\n  * Improve file structure\r\n  * Remove redundant model handling code. Switch all model handling to torch.hub or torch.hub derived functions\r\n  * Drop support for python 2.7 and for older version of pytorch. See https:\u002F\u002Fwww.python.org\u002Fdoc\u002Fsunset-python-2\u002F\r\n  * Fix issues with certain blazeface components re-downloading everytime (#234)\r\n  * Fix issue when no face was detected that resulted in a hard crahs (#210, #226, #229)\r\n  * Fix invalid docker image (#213)\r\n  * Fix travis build issue that tested the code against an outdated pytorch 1.1.0","2020-12-16T13:48:31",{"id":196,"version":197,"summary_zh":198,"released_at":199},100305,"v1.1.1","Bug fixes","2020-09-12T12:07:17",{"id":201,"version":202,"summary_zh":203,"released_at":204},100306,"v1.1.0","Changelog:\r\n* Minor fixes\r\n* Added BlazeFace detector as an option (thanks @imadtoubal)\r\n","2020-07-31T16:11:00",{"id":206,"version":207,"summary_zh":208,"released_at":209},100307,"v1.0.1","Changelog:\r\n\r\n    Added support for pytorch 1.0.0\r\n    Minor cleanup\r\n    Improved remote models handling\r\n\r\n2D and 3D face alignment code in PyTorch that implements the [\"How far are we from solving the 2D & 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)\", Adrian Bulat and Georgios Tzimiropoulos, ICCV 2017] paper.\r\n","2018-12-19T15:21:18",{"id":211,"version":212,"summary_zh":213,"released_at":214},100308,"v1.0.0","Changelog:\r\n* Added support for pytorch 0.4.x\r\n* Improved overall speed \r\n* Rewrited the face detection part and made it modular (this includes the addition of SFD)\r\n* Added SFD as the default face detector\r\n* Added conda and pypi releases\r\n* Other bug fixes and improvements \r\n\r\n2D and 3D face alignment code in PyTorch that implements the [\"How far are we from solving the 2D & 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)\", Adrian Bulat and Georgios Tzimiropoulos, ICCV 2017] paper.","2018-10-12T13:50:02",{"id":216,"version":217,"summary_zh":218,"released_at":219},100309,"v0.1.0","2D and 3D face alignment code in PyTorch that implements the [\"How far are we from solving the 2D \\& 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)\", Adrian Bulat and Georgios Tzimiropoulos, ICCV 2017] paper.","2018-01-09T22:30:33"]