◉ Pulse
EthanZer0 avatar
#6 today

EthanZer0/FaceLogin

C++ AI #computer-vision #cplusplus #credential-provider #face-recognition

基于 Windows Credential Provider 框架的摄像头人脸识别登录系统。无需额外操作,看一眼即可解锁你的电脑 — 支持本地账户与微软在线账户,内置眨眼与静默反欺诈双重活体检测。

Created Jul 31, 2026
Stars
17
Today
+17
Forks
0
Quality
100/100
Momentum
22

README

Fetched from GitHub on Oct 30, 2026, 11:07 PM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to EthanZer0/FaceLogin and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

FaceLogin Logo

简体中文 · 한국어 · English

基于 Windows Credential Provider 框架的摄像头人脸识别解锁系统。
在锁屏界面集成"人脸登录"磁贴,看一眼即可解锁 — 支持本地账户和微软在线账户 (MSA)。

License Platform Language Version


特性

锁屏人脸解锁 可选活体检测与姿态门控 ONNX 识别
Windows 原生锁屏集成
普通解锁需选中磁贴后按键或点击鼠标
Blink / Anti-Spoof / None
MobileNetV2 头部姿态门控
SCRFD 检测 + 106 点地标
InsightFace 512-D embedding
多账户支持 安全存储 热配置
本地 SAM + 微软在线
账户全兼容,每账号最多录入 10 张人脸
DPAPI 机器范围加密
管道 DACL 访问控制
运行时修改识别参数
无需重启服务

系统架构

flowchart TB
    subgraph LockScreen["Windows 锁屏界面"]
        LogonUI["LogonUI.exe"]
        CP["FaceLogin<br/>CredentialProvider.dll"]
    end

    subgraph Service["人脸认证服务"]
        Svc["FaceLoginService.exe"]
    end

    subgraph Enrollment["注册控制台"]
        Console["FaceLoginConsole.exe"]
    end

    subgraph Storage["数据存储"]
        direction LR
        UsersDB[("data/<br/>users.dat")] ~~~ Config[("data/<br/>config.json")] ~~~ Models[("models/<br/>ONNX + landmarks")] ~~~ Logs[("log/<br/>日志文件")]
    end

    LogonUI -->|"COM 接口"| CP
    CP -->|"命名管道"| Svc
    Svc -->|"凭据回传"| CP
    Console -->|"RELOAD_DB / GET_LOGS"| Svc
    Console --> Storage
    Svc --> Storage

    style LockScreen fill:#eff6ff,stroke:#3b82f6
    style Service fill:#fefce8,stroke:#eab308
    style Enrollment fill:#f0fdf4,stroke:#22c55e
    style Storage fill:#fdf2f8,stroke:#ec4899
Loading

所有跨进程通信通过命名管道 \\.\pipe\FaceLoginPipe(DACL 保护)。


Star History

Star History Chart

图表由独立项目 StarHistory 的 GitHub Actions 每日自动更新,数据与渲染完全自托管,不依赖第三方服务。


快速开始

第一步:安装

从 Releases 下载 FaceLoginSetup.exe,运行后选择安装目录,点击 安装。

第二步:录入人脸

以管理员身份运行 FaceLoginConsole.exe;新安装默认不启用活体检测(none),如在设置中启用了眨眼或反欺诈活体,请按提示完成检查,然后输入密码并点击 保存并录入。

第三步:解锁

Win + L 锁屏后,选择“人脸登录”磁贴并注视摄像头。普通解锁需要随后产生一次键盘按键或鼠标按键输入才开始识别;鼠标移动本身不会触发识别。识别状态会通过安全桌面上的中央浮层显示。冷启动默认自动开始识别,也可以在设置中改为等待按键或鼠标按键。

姿态不符合要求时,界面会提示调整左右转头、抬头/低头或左右倾斜;回到合法范围后继续识别。

卸载

运行安装程序切换到 卸载 标签页,或直接运行安装目录中的 Uninstall.exe。卸载程序会停止并删除服务、注销凭据提供程序、删除安装目录及 FaceLogin 数据;请在卸载前备份需要保留的人脸数据。


系统要求

要求 详情
操作系统 Windows 10 21H2+ / Windows 11 (x64)
摄像头 USB 或内置,支持 1280×720
运行时 WebView2(Windows 11 内置,Win10 自动安装)
权限 管理员权限(安装和注册需要)
磁盘空间 安装包约 100 MB;安装后程序、运行库和模型约 110 MB,另加用户数据

安全设计

层面 措施
进程通信 命名管道 DACL:仅 SYSTEM + Administrators,拒绝远程
凭据存储 DPAPI CRYPTPROTECT_LOCAL_MACHINE 机器范围加密
内存保护 密码使用后 SecureZeroMemory 即时擦除
活体与姿态 活体方法可选;锁屏识别使用 MobileNetV2 姿态门控,姿态不合法时不进入匹配
摄像头处理 服务优先使用 Media Foundation,失败时回退 DirectShow;当前版本不包含软件曝光归一化,自动曝光由摄像头采集链路负责
匹配安全 欧氏距离阈值 + 最佳/次佳匹配比双重校验
编译加固 ASLR、DEP、CFG、64位高熵地址随机化

项目结构

FaceLogin/
├── common/                 # 公共库(日志、IPC协议、DPAPI、账户身份、配置)
├── credential_provider/    # Windows 凭据提供程序 COM DLL
├── face_service/           # 人脸识别 Windows 服务
├── enrollment_app/         # 人脸录入控制台(WebView2 GUI)
├── installer/              # Go Wails 图形安装程序
├── locales/                # 独立语言包(zh-CN / ko-KR / en-US)
├── scripts/                # 构建脚本与语言包一致性检查
└── assets/                 # 图标资源

详细技术文档请参阅 DEVELOPMENT.md。


从源码构建

仅当需要自行编译时才需关注本节。

前置条件

  • Visual Studio 2022(含 C++ 工作负载)
  • vcpkg — dlib(图像工具库:matrix/rectangle/变换)、onnxruntime
  • Go 1.25+ + Wails v2(仅安装程序)
  • CMake 3.20+

C++ 组件

# vcpkg 依赖(识别/检测/地标/姿态/反欺诈全部用 ONNX,dlib 仅提供图像数据结构)
vcpkg install dlib[core] onnxruntime --triplet x64-windows

# 构建(FaceLoginConsole.exe 直接输出到 installer/FaceLoginSetup/resources/)
cmake -B build -S . -G "Visual Studio 17 2022" `
    -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
cmake --build build --config Release

Go 安装程序

cd installer/FaceLoginSetup
# 先将 C++ 产物和模型同步到 resources/,再构建完整安装器
.\build-installer.ps1

build-installer.ps1 会先单独构建不内嵌安装资源的轻量 Uninstall.exe,复制到 resources/,再构建完整的 FaceLoginSetup.exe。如只需调试前端或 Go 代码,也可以直接使用 Wails 命令,但发布安装包应使用该脚本。

模型文件

文件 用途 下载
2d106det.onnx 106点面部地标提取 InsightFace
det_500m.onnx SCRFD 人脸检测 InsightFace
w600k_mbf.onnx InsightFace 人脸识别 InsightFace
minifas_quantized.onnx 静默反欺诈 facenox/face-antispoof-onnx
head_pose_mobilenetv2.onnx MobileNetV2 头部姿态估计(Yaw/Pitch/Roll) yakhyo/head-pose-estimation

贡献

欢迎提交 Issue 和 Pull Request!

  • 代码规范:C++20、/W4 警告级别
  • 提交前请确保构建通过
  • 重大改动请先创建 Issue 讨论

开源协议

MIT License © 2026 美国伐木工&EthanZer0


免责声明

本软件通过人脸识别辅助 Windows 登录,但 不能替代 密码。人脸识别为便捷方式,系统始终保留密码登录作为后备。请勿在安全要求极高的环境中单独依赖人脸识别。

Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Jul 31, 2026

first spotted on the list

Best rank

#6

highest position reached

Appearances

1

times on the trending list

Quality score

100

out of 100

Momentum

22

trend strength indicator

Star velocity

0.19

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot

Not enough snapshots yet — check back soon.

Rank history

position on trending · lower is better

Not enough snapshots yet — check back soon.

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/EthanZer0/FaceLogin" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="EthanZer0/FaceLogin — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

EthanZer0/FaceLogin stars badge
Markdown
[![EthanZer0/FaceLogin](https://www.notionpulse.cc/api/badge/EthanZer0/FaceLogin.svg)](https://www.notionpulse.cc/repo/EthanZer0/FaceLogin)
HTML
<a href="https://www.notionpulse.cc/repo/EthanZer0/FaceLogin"><img src="https://www.notionpulse.cc/api/badge/EthanZer0/FaceLogin.svg" alt="EthanZer0/FaceLogin stars badge" /></a>

Repository of the Day

#6 Repository of the Day

Repository of the Week

#6 Repository of the Week

Repository of the Month

#6 Repository of the Month