[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-esimov--pigo":3,"tool-esimov--pigo":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},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,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},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 真正成长为懂上",155373,2,"2026-04-14T11:34:08",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":110,"forks":111,"last_commit_at":112,"license":113,"difficulty_score":32,"env_os":114,"env_gpu":115,"env_ram":116,"env_deps":117,"category_tags":122,"github_topics":123,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":135,"updated_at":136,"faqs":137,"releases":172},7412,"esimov\u002Fpigo","pigo","Fast face detection, pupil\u002Feyes localization and facial landmark points detection library in pure Go.","pigo 是一款纯 Go 语言编写的高性能人脸检测库，不仅能精准定位人脸，还能识别瞳孔、眼睛位置及面部关键特征点。它的核心优势在于完全摆脱了对 OpenCV、dlib 等重型 C\u002FC++ 第三方库的依赖，从而避免了传统方案中因跨语言调用（cgo）带来的显著延迟和复杂的安装配置难题。\n\n对于希望在 Go 生态中集成视觉功能的开发者而言，pigo 提供了极佳的解决方案。它无需预处理图像或构建复杂的积分图与金字塔结构，直接基于“像素强度比较”算法实现快速检测，甚至能高效处理带眼镜的人脸以及平面旋转角度较大的人脸。此外，pigo 还支持 WebAssembly，使得在浏览器端运行人脸检测成为可能。\n\n无论是需要构建实时视频分析应用的后端工程师，还是追求轻量级部署方案的嵌入式开发者，pigo 都能以简洁的 API 和卓越的处理速度满足需求。如果你正在寻找一个无需额外环境依赖、开箱即用且运行飞快的人脸识别组件，pigo 值得尝试。","\u003Ch1 align=\"center\">\u003Cimg alt=\"pigo-logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_051d4a6a219d.png\" height=240\u002F>\u003C\u002Fh1>\r\n\r\n[![CI](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Factions\u002Fworkflows\u002Fci.yml)\r\n[![Go Report Card](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_2b4a70945b89.png)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fesimov\u002Fpigo)\r\n[![go.dev reference](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpkg.go.dev-reference-007d9c?logo=go)](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fcore)\r\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fesimov\u002Fpigo)](.\u002FLICENSE)\r\n[![release](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frelease-v1.4.6-blue.svg)](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Freleases\u002Ftag\u002Fv1.4.6)\r\n[![pigo](https:\u002F\u002Fsnapcraft.io\u002Fpigo\u002Fbadge.svg)](https:\u002F\u002Fsnapcraft.io\u002Fpigo)\r\n\r\nPigo is a pure Go face detection, pupil\u002Feyes localization and facial landmark points detection library based on the **[Pixel Intensity Comparison-based Object detection](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1305.4537.pdf)** paper.\r\n\r\n| Rectangle face marker | Circle face marker\r\n|:--:|:--:\r\n| ![rectangle](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_6bf6da7088a6.png) | ![circle](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_2c854df84efc.png) |\r\n\r\n### Motivation\r\nThe reason why Pigo has been developed is because almost all of the currently existing solutions for face detection in the Go ecosystem are purely bindings to some C\u002FC++ libraries like `OpenCV` or `dlib`, but calling a C program through `cgo` introduces huge latencies and implies a significant trade-off in terms of performance. Also, in many cases installing OpenCV on various platforms is cumbersome.\r\n\r\n**The Pigo library does not require any additional modules or third party applications to be installed**, although you might need to install Python and OpenCV if you wish to run the library in a real time desktop application. Head over to this [subtopic](#real-time-face-detection-running-as-a-shared-object) for more details.\r\n\r\n### Key features\r\n- [x] Does not require OpenCV or any 3rd party modules to be installed\r\n- [x] High processing speed\r\n- [x] There is no need for image preprocessing prior to detection\r\n- [x] There is no need for the computation of integral images, image pyramid, HOG pyramid or any other similar data structure\r\n- [x] The face detection is based on pixel intensity comparison encoded in the binary file tree structure\r\n- [x] Fast detection of in-plane rotated faces\r\n- [x] The library can detect even faces with eyeglasses\r\n- [x] [Pupils\u002Feyes localization](#pupils--eyes-localization)\r\n- [x] [Facial landmark points detection](#facial-landmark-points-detection)\r\n- [x] **[Webassembly support 🎉](#wasm-webassembly-support-)**\r\n\r\n### Todo\r\n- [ ] Object detection and description\r\n\r\n**The library can also detect in plane rotated faces.** For this reason a new `-angle` parameter has been included into the command line utility. The command below will generate the following result (see the table below for all the supported options).\r\n\r\n```bash\r\n$ pigo -in input.jpg -out output.jpg -cf cascade\u002Ffacefinder -angle=0.8 -iou=0.01\r\n```\r\n\r\n| Input file | Output file\r\n|:--:|:--:\r\n| ![input](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_2e86f415ecfe.jpg) | ![output](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_e90fc7a85bdf.png) |\r\n\r\n\r\nNote: In case of in plane rotated faces the angle value should be adapted to the provided image.\r\n\r\n### Pupils \u002F eyes localization\r\nStarting from **v1.2.0** Pigo offers pupils\u002Feyes localization capabilities. The implementation is based on [Eye pupil localization with an ensemble of randomized trees](https:\u002F\u002Fwww.sciencedirect.com\u002Fscience\u002Farticle\u002Fabs\u002Fpii\u002FS0031320313003294).\r\n\r\nCheck out this example for a realtime demo: https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Ftree\u002Fmaster\u002Fexamples\u002Fpuploc\r\n\r\n![puploc](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_4023162afda6.png)\r\n\r\n### Facial landmark points detection\r\n**v1.3.0** marks a new milestone in the library evolution, Pigo being able to detect facial landmark points. The implementation is based on [Fast Localization of Facial Landmark Points](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1403.6888.pdf).\r\n\r\nCheck out this example for a realtime demo: https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Ftree\u002Fmaster\u002Fexamples\u002Ffacial_landmark\r\n\r\n![flp_example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_e1319041bc26.png)\r\n\r\n## Install\r\nInstall Go, set your `GOPATH`, and make sure `$GOPATH\u002Fbin` is on your `PATH`.\r\n\r\n```bash\r\n$ go install github.com\u002Fesimov\u002Fpigo\u002Fcmd\u002Fpigo@latest\r\n```\r\n\r\n### Binary releases\r\nIn case you do not have installed or do not wish to install Go, you can obtain the binary file from the [releases](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Freleases) folder.\r\n\r\nThe library can be accessed as a snapcraft function too.\r\n\r\n\u003Ca href=\"https:\u002F\u002Fsnapcraft.io\u002Fpigo\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_d8e79bb391d9.png\" alt=\"snapcraft pigo\">\u003C\u002Fa>\r\n\r\n## API\r\nBelow is a minimal example of using the face detection API.\r\n\r\nFirst, you need to load and parse the binary classifier, then convert the image to grayscale mode,\r\nand finally run the cascade function which returns a slice containing the row, column, scale and the detection score.\r\n\r\n```Go\r\ncascadeFile, err := ioutil.ReadFile(\"\u002Fpath\u002Fto\u002Fcascade\u002Ffile\")\r\nif err != nil {\r\n\tlog.Fatalf(\"Error reading the cascade file: %v\", err)\r\n}\r\n\r\nsrc, err := pigo.GetImage(\"\u002Fpath\u002Fto\u002Fimage\")\r\nif err != nil {\r\n\tlog.Fatalf(\"Cannot open the image file: %v\", err)\r\n}\r\n\r\npixels := pigo.RgbToGrayscale(src)\r\ncols, rows := src.Bounds().Max.X, src.Bounds().Max.Y\r\n\r\ncParams := pigo.CascadeParams{\r\n\tMinSize:     20,\r\n\tMaxSize:     1000,\r\n\tShiftFactor: 0.1,\r\n\tScaleFactor: 1.1,\r\n\r\n\tImageParams: pigo.ImageParams{\r\n\t\tPixels: pixels,\r\n\t\tRows:   rows,\r\n\t\tCols:   cols,\r\n\t\tDim:    cols,\r\n\t},\r\n}\r\n\r\npigo := pigo.NewPigo()\r\n\u002F\u002F Unpack the binary file. This will return the number of cascade trees,\r\n\u002F\u002F the tree depth, the threshold and the prediction from tree's leaf nodes.\r\nclassifier, err := pigo.Unpack(cascadeFile)\r\nif err != nil {\r\n\tlog.Fatalf(\"Error reading the cascade file: %s\", err)\r\n}\r\n\r\nangle := 0.0 \u002F\u002F cascade rotation angle. 0.0 is 0 radians and 1.0 is 2*pi radians\r\n\r\n\u002F\u002F Run the classifier over the obtained leaf nodes and return the detection results.\r\n\u002F\u002F The result contains quadruplets representing the row, column, scale and detection score.\r\ndets := classifier.RunCascade(cParams, angle)\r\n\r\n\u002F\u002F Calculate the intersection over union (IoU) of two clusters.\r\ndets = classifier.ClusterDetections(dets, 0.2)\r\n```\r\n\r\n**A note about imports**: in order to decode the generated image you have to import `image\u002Fjpeg` or `image\u002Fpng` (depending on the provided image type) as in the following example, otherwise you will get a `\"Image: Unknown format\"` error.\r\n\r\n```Go\r\nimport (\r\n    _ \"image\u002Fjpeg\"\r\n    pigo \"github.com\u002Fesimov\u002Fpigo\u002Fcore\"\r\n)\r\n```\r\n\r\n## Usage\r\nA command line utility is bundled into the library.\r\n\r\n```bash\r\n$ pigo -in input.jpg -out out.jpg -cf cascade\u002Ffacefinder\r\n```\r\n\r\n### Supported flags:\r\n\r\n```bash\r\n$ pigo --help\r\n\r\n┌─┐┬┌─┐┌─┐\r\n├─┘││ ┬│ │\r\n┴  ┴└─┘└─┘\r\n\r\nGo (Golang) Face detection library.\r\n    Version: 1.4.2\r\n\r\n  -angle float\r\n    \t0.0 is 0 radians and 1.0 is 2*pi radians\r\n  -cf string\r\n    \tCascade binary file\r\n  -flpc string\r\n    \tFacial landmark points cascade directory\r\n  -in string\r\n    \tSource image (default \"-\")\r\n  -iou float\r\n    \tIntersection over union (IoU) threshold (default 0.2)\r\n  -json string\r\n    \tOutput the detection points into a json file\r\n  -mark\r\n    \tMark detected eyes (default true)\r\n  -marker string\r\n    \tDetection marker: rect|circle|ellipse (default \"rect\")\r\n  -max int\r\n    \tMaximum size of face (default 1000)\r\n  -min int\r\n    \tMinimum size of face (default 20)\r\n  -out string\r\n    \tDestination image (default \"-\")\r\n  -plc string\r\n    \tPupils\u002Feyes localization cascade file\r\n  -scale float\r\n    \tScale detection window by percentage (default 1.1)\r\n  -shift float\r\n    \tShift detection window by percentage (default 0.1)\r\n```\r\n\r\n**Important notice:** In case you also wish to run the pupil\u002Feyes localization, then you need to use the `plc` flag and provide a valid path to the pupil localization cascade file. The same applies for facial landmark points detection, only that this time the parameter accepted by the `flpc` flag is a directory pointing to the facial landmark points cascade files found under `cascades\u002Flps`.\r\n\r\n### CLI command examples\r\nYou can also use the `stdin` and `stdout` pipe commands:\r\n\r\n```bash\r\n$ cat input\u002Fsource.jpg | pigo > -in - -out - >out.jpg -cf=\u002Fpath\u002Fto\u002Fcascade\r\n```\r\n\r\n`in` and `out` default to `-` so you can also use:\r\n```bash\r\n$ cat input\u002Fsource.jpg | pigo >out.jpg -cf=\u002Fpath\u002Fto\u002Fcascade\r\n$ pigo -out out.jpg \u003C input\u002Fsource.jpg -cf=\u002Fpath\u002Fto\u002Fcascade\r\n```\r\nUsing the `empty` string as value for the `-out` flag will skip the image generation part. This, combined with the `-json` flag will encode the detection results into the specified json file. You can also use the pipe `-` value combined with the `-json` flag to output the detection coordinates to the standard (`stdout`) output.\r\n\r\n## Real time face detection (running as a shared object)\r\n\r\nIf you wish to test the library's real time face detection capabilities, the `examples` folder contains a few demos written in Python.\r\n\r\n**But why Python you might ask?** Because the Go ecosystem is (still) missing a cross platform and system independent library for accessing the webcam. \r\n\r\nIn the Python program we access the webcam and transfer the pixel data as a byte array through `cgo` as a **shared object** to the Go program where the core face detection is happening. But as you can imagine this operation is not cost effective, resulting in lower frame rates than the library is capable of. \r\n\r\n## WASM (Webassembly) support 🎉\r\n**Important note: In order to run the Webassembly demos at least Go 1.13 is required!**\r\n\r\nStarting from version **v1.4.0** the library has been ported to [**WASM**](http:\u002F\u002Fwebassembly.org\u002F). This proves the library's real time face detection capabilities, constantly producing **~60 FPS**. \r\n\r\n### WASM demo\r\nTo run the `wasm` demo select the `wasm` folder and type `make`.\r\n\r\nFor more details check the subpage description: https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Ftree\u002Fmaster\u002Fwasm.\r\n\r\n**For more awesome WASM demos using the Pigo library check this repo: https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo-wasm-demos**.\r\n\r\n## Benchmark results\r\nBelow are the benchmark results obtained running Pigo against [GoCV](https:\u002F\u002Fgithub.com\u002Fhybridgroup\u002Fgocv) using the same conditions.\r\n\r\n```\r\n    BenchmarkGoCV-4   \t       3\t 414122553 ns\u002Fop\t     704 B\u002Fop\t       1 allocs\u002Fop\r\n    BenchmarkPIGO-4   \t      10\t 173664832 ns\u002Fop\t       0 B\u002Fop\t       0 allocs\u002Fop\r\n    PASS\r\n    ok  \tgithub.com\u002Fesimov\u002Fgocv-test\t4.530s\r\n```\r\nThe code used for the above test can be found under the following link: https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo-gocv-benchmark\r\n\r\n## Author\r\n* Endre Simo ([@simo_endre](https:\u002F\u002Ftwitter.com\u002Fsimo_endre))\r\n\r\n## License\r\nCopyright © 2019 Endre Simo\r\n\r\nThis software is distributed under the MIT license. See the [LICENSE](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fblob\u002Fmaster\u002FLICENSE) file for the full license text.\r\n","\u003Ch1 align=\"center\">\u003Cimg alt=\"pigo-logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_051d4a6a219d.png\" height=240\u002F>\u003C\u002Fh1>\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Go Report Card](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_2b4a70945b89.png)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fesimov\u002Fpigo)\n[![go.dev reference](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpkg.go.dev-reference-007d9c?logo=go)](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fcore)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fesimov\u002Fpigo)](.\u002FLICENSE)\n[![release](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frelease-v1.4.6-blue.svg)](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Freleases\u002Ftag\u002Fv1.4.6)\n[![pigo](https:\u002F\u002Fsnapcraft.io\u002Fpigo\u002Fbadge.svg)](https:\u002F\u002Fsnapcraft.io\u002Fpigo)\n\nPigo 是一个纯 Go 语言实现的人脸检测、瞳孔\u002F眼睛定位以及面部关键点检测库，其核心基于 **[基于像素强度比较的目标检测](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1305.4537.pdf)** 论文。\n\n| 矩形人脸标记 | 圆形人脸标记\n|:--:|:--:\n| ![rectangle](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_6bf6da7088a6.png) | ![circle](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_2c854df84efc.png) |\n\n### 动机\n开发 Pigo 的原因在于，目前 Go 生态中几乎所有的人脸检测解决方案都只是对一些 C\u002FC++ 库（如 `OpenCV` 或 `dlib`）的绑定。然而，通过 `cgo` 调用 C 程序会引入巨大的延迟，并在性能上做出显著的权衡。此外，在许多平台上安装 OpenCV 也颇为繁琐。\n\n**Pigo 库无需安装任何额外的模块或第三方应用程序**，不过如果你希望在实时桌面应用中运行该库，则可能需要安装 Python 和 OpenCV。更多详情请参阅此 [子主题](#real-time-face-detection-running-as-a-shared-object)。\n\n### 核心特性\n- [x] 不需安装 OpenCV 或任何第三方模块\n- [x] 处理速度快\n- [x] 检测前无需进行图像预处理\n- [x] 无需计算积分图像、图像金字塔、HOG 金字塔或其他类似的数据结构\n- [x] 人脸检测基于二进制文件树结构中编码的像素强度比较\n- [x] 快速检测平面内旋转的人脸\n- [x] 即使佩戴眼镜也能检测到人脸\n- [x] [瞳孔\u002F眼睛定位](#pupils--eyes-localization)\n- [x] [面部关键点检测](#facial-landmark-points-detection)\n- [x] **[WebAssembly 支持 🎉](#wasm-webassembly-support-)**\n\n### 待办事项\n- [ ] 对象检测与描述\n\n**该库还可以检测平面内旋转的人脸。** 因此，命令行工具中新增了一个 `-angle` 参数。以下命令将生成如下结果（有关所有支持的选项，请参阅下表）：\n\n```bash\n$ pigo -in input.jpg -out output.jpg -cf cascade\u002Ffacefinder -angle=0.8 -iou=0.01\n```\n\n| 输入文件 | 输出文件\n|:--:|:--:\n| ![input](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_2e86f415ecfe.jpg) | ![output](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_e90fc7a85bdf.png) |\n\n注意：对于平面内旋转的人脸，角度值应根据提供的图像进行调整。\n\n### 瞳孔\u002F眼睛定位\n自 **v1.2.0** 起，Pigo 提供了瞳孔\u002F眼睛定位功能。其实现基于 [使用随机森林集成进行瞳孔定位](https:\u002F\u002Fwww.sciencedirect.com\u002Fscience\u002Farticle\u002Fabs\u002Fpii\u002FS0031320313003294)。\n\n可在此示例中查看实时演示：https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Ftree\u002Fmaster\u002Fexamples\u002Fpuploc\n\n![puploc](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_4023162afda6.png)\n\n### 面部关键点检测\n**v1.3.0** 标志着该库发展的一个新里程碑，Pigo 现已能够检测面部关键点。其实现基于 [快速定位面部关键点](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1403.6888.pdf)。\n\n可在此示例中查看实时演示：https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Ftree\u002Fmaster\u002Fexamples\u002Ffacial_landmark\n\n![flp_example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_e1319041bc26.png)\n\n## 安装\n安装 Go，设置好 `GOPATH`，并确保 `$GOPATH\u002Fbin` 已添加到你的 `PATH` 中。\n\n```bash\n$ go install github.com\u002Fesimov\u002Fpigo\u002Fcmd\u002Fpigo@latest\n```\n\n### 二进制发布\n如果你没有安装 Go 或不想安装，也可以从 [releases](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Freleases) 文件夹获取二进制文件。\n\n该库同样可以通过 snapcraft 运行。\n\n\u003Ca href=\"https:\u002F\u002Fsnapcraft.io\u002Fpigo\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_readme_d8e79bb391d9.png\" alt=\"snapcraft pigo\">\u003C\u002Fa>\n\n## API\n以下是使用人脸检测 API 的最小示例。\n\n首先，你需要加载并解析二进制分类器，然后将图像转换为灰度模式，\n最后运行级联函数，该函数会返回一个包含行、列、尺度和检测分数的切片。\n\n```Go\ncascadeFile, err := ioutil.ReadFile(\"\u002Fpath\u002Fto\u002Fcascade\u002Ffile\")\nif err != nil {\n\tlog.Fatalf(\"读取级联文件时出错：%v\", err)\n}\n\nsrc, err := pigo.GetImage(\"\u002Fpath\u002Fto\u002Fimage\")\nif err != nil {\n\tlog.Fatalf(\"无法打开图像文件：%v\", err)\n}\n\npixels := pigo.RgbToGrayscale(src)\ncols, rows := src.Bounds().Max.X, src.Bounds().Max.Y\n\ncParams := pigo.CascadeParams{\n\tMinSize:     20,\n\tMaxSize:     1000,\n\tShiftFactor: 0.1,\n\tScaleFactor: 1.1,\n\n\tImageParams: pigo.ImageParams{\n\t\tPixels: pixels,\n\t\tRows:   rows,\n\t\tCols:   cols,\n\t\tDim:    cols,\n\t},\n}\n\npigo := pigo.NewPigo()\n\u002F\u002F 解包二进制文件。这将返回级联树的数量、树的深度、阈值以及来自树叶节点的预测。\nclassifier, err := pigo.Unpack(cascadeFile)\nif err != nil {\n\tlog.Fatalf(\"读取级联文件时出错：%s\", err)\n}\n\nangle := 0.0 \u002F\u002F 级联旋转角度。0.0 表示 0 弧度，1.0 表示 2π 弧度\n\n\u002F\u002F 在获得的叶节点上运行分类器，并返回检测结果。\n\u002F\u002F 结果包含四元组，分别表示行、列、尺度和检测分数。\ndets := classifier.RunCascade(cParams, angle)\n\n\u002F\u002F 计算两个聚类之间的交并比 (IoU)。\ndets = classifier.ClusterDetections(dets, 0.2)\n```\n\n**关于导入的说明**：为了解码生成的图像，你必须导入 `image\u002Fjpeg` 或 `image\u002Fpng`（取决于提供的图像类型），如下面的示例所示，否则你会收到 `\"Image: Unknown format\"` 错误。\n\n```Go\nimport (\n    _ \"image\u002Fjpeg\"\n    pigo \"github.com\u002Fesimov\u002Fpigo\u002Fcore\"\n)\n```\n\n## 使用方法\n该库附带了一个命令行工具。\n\n```bash\n$ pigo -in input.jpg -out out.jpg -cf cascade\u002Ffacefinder\n```\n\n### 支持的标志：\n\n```bash\n$ pigo --help\n\n┌─┐┬┌─┐┌─┐\n├─┘││ ┬│ │\n┴  ┴└─┘└─┘\n\nGo（Golang）人脸检测库。\n    版本：1.4.2\n\n  -angle float\n    \t0.0 表示 0 弧度，1.0 表示 2π 弧度\n  -cf string\n    \t级联二进制文件\n  -flpc string\n    \t面部特征点级联目录\n  -in string\n    \t源图像（默认为“-”）\n  -iou float\n    \t交并比 (IoU) 阈值（默认为 0.2）\n  -json string\n    \t将检测点输出到 JSON 文件\n  -mark\n    \t标记检测到的眼睛（默认为真）\n  -marker string\n    \t检测标记：矩形|圆形|椭圆（默认为“矩形”）\n  -max int\n    \t人脸的最大尺寸（默认为 1000）\n  -min int\n    \t人脸的最小尺寸（默认为 20）\n  -out string\n    \t目标图像（默认为“-”）\n  -plc string\n    \t瞳孔\u002F眼睛定位级联文件\n  -scale float\n    \t按百分比缩放检测窗口（默认为 1.1）\n  -shift float\n    \t按百分比移动检测窗口（默认为 0.1）\n```\n\n**重要提示**：如果你还想运行瞳孔\u002F眼睛定位功能，则需要使用 `plc` 标志，并提供指向瞳孔定位级联文件的有效路径。面部特征点检测也是如此，只不过这次 `flpc` 标志接受的参数是一个目录，该目录指向位于 `cascades\u002Flps` 下的面部特征点级联文件。\n\n### CLI 命令示例\n你还可以使用 `stdin` 和 `stdout` 管道命令：\n\n```bash\n$ cat input\u002Fsource.jpg | pigo > -in - -out - >out.jpg -cf=\u002Fpath\u002Fto\u002Fcascade\n```\n\n`in` 和 `out` 的默认值为 `-`，因此你也可以这样使用：\n```bash\n$ cat input\u002Fsource.jpg | pigo >out.jpg -cf=\u002Fpath\u002Fto\u002Fcascade\n$ pigo -out out.jpg \u003C input\u002Fsource.jpg -cf=\u002Fpath\u002Fto\u002Fcascade\n```\n将 `-out` 标志的值设置为空字符串会跳过图像生成部分。结合 `-json` 标志，可以将检测结果编码到指定的 JSON 文件中。你还可以使用管道 `-` 值结合 `-json` 标志，将检测坐标输出到标准输出 (`stdout`)。\n\n## 实时人脸检测（作为共享对象运行）\n\n如果你想测试该库的实时人脸检测能力，`examples` 文件夹中包含几个用 Python 编写的演示程序。\n\n**但你可能会问，为什么是 Python？** 因为 Go 生态系统（目前）仍然缺少一个跨平台且与系统无关的库来访问网络摄像头。\n\n在 Python 程序中，我们访问网络摄像头，并通过 `cgo` 将像素数据以字节数组的形式作为 **共享对象** 传输到 Go 程序中，在那里进行核心的人脸检测。然而，正如你所想象的那样，这种操作并不经济高效，导致帧率低于该库所能达到的水平。\n\n## WASM（WebAssembly）支持 🎉\n**重要提示：要运行 WebAssembly 演示，至少需要 Go 1.13！**\n\n从版本 **v1.4.0** 开始，该库已移植到 [**WASM**](http:\u002F\u002Fwebassembly.org\u002F)。这证明了该库的实时人脸检测能力，能够持续产生 **~60 FPS**。\n\n### WASM 演示\n要运行 `wasm` 演示，请选择 `wasm` 文件夹并输入 `make`。\n\n更多详情请查看子页面描述：https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Ftree\u002Fmaster\u002Fwasm。\n\n**有关使用 Pigo 库的更多精彩 WASM 演示，请参阅此仓库：https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo-wasm-demos**。\n\n## 基准测试结果\n以下是使用相同条件运行 Pigo 与 [GoCV](https:\u002F\u002Fgithub.com\u002Fhybridgroup\u002Fgocv) 时得到的基准测试结果。\n\n``` \n    BenchmarkGoCV-4   \t       3\t 414122553 ns\u002Fop\t     704 B\u002Fop\t       1 allocs\u002Fop\n    BenchmarkPIGO-4   \t      10\t 173664832 ns\u002Fop\t       0 B\u002Fop\t       0 allocs\u002Fop\n    PASS\n    ok  \tgithub.com\u002Fesimov\u002Fgocv-test\t4.530s\n```\n用于上述测试的代码可在以下链接找到：https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo-gocv-benchmark\n\n## 作者\n* Endre Simo ([@simo_endre](https:\u002F\u002Ftwitter.com\u002Fsimo_endre))\n\n## 许可证\n版权所有 © 2019 Endre Simo\n\n本软件根据 MIT 许可证分发。完整的许可证文本请参见 [LICENSE](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fblob\u002Fmaster\u002FLICENSE) 文件。","# Pigo 快速上手指南\n\nPigo 是一个纯 Go 语言编写的人脸检测库，支持瞳孔\u002F眼睛定位及面部关键点检测。它基于“像素强度比较”算法，无需安装 OpenCV 或任何 C\u002FC++ 第三方依赖，具有极高的处理速度和零内存分配特性。\n\n## 环境准备\n\n*   **操作系统**：Linux, macOS, Windows (支持跨平台)\n*   **Go 版本**：建议 Go 1.13 或更高版本（若需使用 WebAssembly 功能必须 >= 1.13）\n*   **前置依赖**：无。Pigo 是纯 Go 实现，不需要安装 OpenCV、Python 或其他系统级库即可运行核心检测功能。\n    *   *注：仅当需要运行官方提供的实时摄像头演示（调用 webcam）时，才需要安装 Python 和 OpenCV，因为 Go 生态尚缺跨平台的摄像头访问库。*\n\n## 安装步骤\n\n你可以通过以下两种方式安装 Pigo：\n\n### 方式一：通过 Go 模块安装（推荐）\n\n确保已配置好 `GOPATH` 并将 `$GOPATH\u002Fbin` 加入环境变量 `PATH` 中。\n\n```bash\ngo install github.com\u002Fesimov\u002Fpigo\u002Fcmd\u002Fpigo@latest\n```\n\n### 方式二：下载二进制文件\n\n如果不希望安装 Go 环境，可以直接从 [Releases 页面](https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Freleases) 下载对应平台的编译好的二进制文件。\n\n此外，Pigo 也支持通过 Snap 安装：\n```bash\nsudo snap install pigo\n```\n\n## 基本使用\n\nPigo 提供了命令行工具和 Go API 两种使用方式。使用前请确保你拥有分类器文件（cascade file），通常位于项目仓库的 `cascade\u002F` 目录下（如 `facefinder`）。\n\n### 1. 命令行使用 (CLI)\n\n最简单的用法是指定输入图片、输出图片和分类器文件路径：\n\n```bash\npigo -in input.jpg -out output.jpg -cf cascade\u002Ffacefinder\n```\n\n**常用参数说明：**\n*   `-in`: 输入图片路径（支持 `-` 表示 stdin）\n*   `-out`: 输出图片路径（支持 `-` 表示 stdout，设为空字符串可跳过生成图片）\n*   `-cf`: 人脸检测分类器二进制文件路径\n*   `-angle`: 检测旋转角度（0.0 为 0 弧度，1.0 为 2*pi 弧度），用于检测侧脸或旋转人脸\n*   `-json`: 将检测结果坐标输出到 JSON 文件\n*   `-marker`: 标记样式，可选 `rect` (矩形), `circle` (圆形), `ellipse` (椭圆)\n\n**管道流式处理示例：**\n```bash\ncat input.jpg | pigo -cf cascade\u002Ffacefinder > output.jpg\n```\n\n### 2. Go API 集成\n\n在你的 Go 项目中引入 Pigo 核心包。注意：为了正确解码图片，必须导入 `_ \"image\u002Fjpeg\"` 或 `_ \"image\u002Fpng\"`。\n\n```go\npackage main\n\nimport (\n\t\"io\u002Fioutil\"\n\t\"log\"\n\n\t_ \"image\u002Fjpeg\" \u002F\u002F 必须导入以支持 JPEG 解码\n\tpigo \"github.com\u002Fesimov\u002Fpigo\u002Fcore\"\n)\n\nfunc main() {\n\t\u002F\u002F 1. 加载并解析分类器文件\n\tcascadeFile, err := ioutil.ReadFile(\"cascade\u002Ffacefinder\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Error reading the cascade file: %v\", err)\n\t}\n\n\t\u002F\u002F 2. 读取图片并转换为灰度\n\tsrc, err := pigo.GetImage(\"input.jpg\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Cannot open the image file: %v\", err)\n\t}\n\n\tpixels := pigo.RgbToGrayscale(src)\n\tcols, rows := src.Bounds().Max.X, src.Bounds().Max.Y\n\n\t\u002F\u002F 3. 设置检测参数\n\tcParams := pigo.CascadeParams{\n\t\tMinSize:     20,\n\t\tMaxSize:     1000,\n\t\tShiftFactor: 0.1,\n\t\tScaleFactor: 1.1,\n\t\tImageParams: pigo.ImageParams{\n\t\t\tPixels: pixels,\n\t\t\tRows:   rows,\n\t\t\tCols:   cols,\n\t\t\tDim:    cols,\n\t\t},\n\t}\n\n\t\u002F\u002F 4. 初始化并运行检测\n\tp := pigo.NewPigo()\n\tclassifier, err := p.Unpack(cascadeFile)\n\tif err != nil {\n\t\tlog.Fatalf(\"Error unpacking the cascade file: %s\", err)\n\t}\n\n\tangle := 0.0 \u002F\u002F 旋转角度\n\tdets := classifier.RunCascade(cParams, angle)\n\n\t\u002F\u002F 5. 聚类检测结果 (去除重叠框)\n\tdets = classifier.ClusterDetections(dets, 0.2)\n\n\t\u002F\u002F dets 包含检测到的人脸坐标 (row, col, scale, score)\n\tfor _, det := range dets {\n\t\tlog.Printf(\"Face detected at row: %f, col: %f, scale: %f\", det.Row, det.Col, det.Scale)\n\t}\n}\n```\n\n### 进阶功能提示\n*   **瞳孔\u002F眼睛定位**：使用 `-plc` 参数指定瞳孔定位分类器文件。\n*   **面部关键点检测**：使用 `-flpc` 参数指向包含关键点分类器的目录（通常在 `cascades\u002Flps` 下）。\n*   **WebAssembly**：Pigo 支持编译为 WASM，可在浏览器中实现约 60 FPS 的实时人脸检测，详见项目 `wasm` 目录。","某初创团队正在开发一款基于 Go 语言的后端服务，需要在用户上传头像时自动检测人脸位置并裁剪出标准证件照，同时要求服务能轻松部署在轻量级容器中。\n\n### 没有 pigo 时\n- **部署极其繁琐**：传统方案依赖 OpenCV 或 dlib 的 C\u002FC++ 绑定，必须在 Docker 镜像中安装庞大的系统库和编译器环境，导致镜像体积超过 500MB。\n- **性能损耗严重**：通过 cgo 调用外部 C 库引入了显著的延迟，高并发下人脸检测成为接口响应的瓶颈，平均耗时增加 200ms 以上。\n- **跨平台兼容性差**：在不同 Linux 发行版或 ARM 架构服务器上编译时，常因缺少特定动态链接库而报错，运维排查成本高。\n- **功能扩展受限**：若需进一步定位瞳孔或面部关键点以判断用户是否佩戴眼镜，往往需要引入更多重型第三方依赖。\n\n### 使用 pigo 后\n- **零依赖轻量化部署**：pigo 是纯 Go 实现，无需安装任何外部模块，最终生成的 Docker 镜像仅几十 MB，启动秒级完成。\n- **原生高性能处理**：去除了 cgo 调用开销，利用像素强度比较算法实现高速检测，单核即可轻松应对数百张图片的并发请求。\n- **开箱即用的跨平台能力**：直接编译为静态二进制文件，在任何支持 Go 的操作系统或架构上均可无缝运行，彻底消除环境差异问题。\n- **内置高级特征定位**：原生支持瞳孔定位和面部关键点检测，无需额外集成其他库即可实现“检测 + 分析”的一站式处理流程。\n\npigo 让 Go 开发者在不牺牲性能的前提下，拥有了独立、轻量且功能完整的人脸分析能力，极大简化了视觉服务的架构复杂度。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fesimov_pigo_6bf6da70.png","esimov","Endre Simo","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fesimov_73960714.jpg","Software developer",null,"esimov@gmail.com","simo_endre","www.esimov.com","https:\u002F\u002Fgithub.com\u002Fesimov",[82,86,90,94,98,102,106],{"name":83,"color":84,"percentage":85},"Go","#00ADD8",75,{"name":87,"color":88,"percentage":89},"Python","#3572A5",16.6,{"name":91,"color":92,"percentage":93},"C","#555555",6.4,{"name":95,"color":96,"percentage":97},"Shell","#89e051",0.9,{"name":99,"color":100,"percentage":101},"HTML","#e34c26",0.6,{"name":103,"color":104,"percentage":105},"Makefile","#427819",0.4,{"name":107,"color":108,"percentage":109},"CSS","#663399",0.1,4702,324,"2026-04-11T17:50:15","MIT","Linux, macOS, Windows","不需要 GPU，纯 CPU 运行","未说明",{"notes":118,"python":119,"dependencies":120},"该工具是纯 Go 语言编写的人脸检测库，无需安装 OpenCV 或其他第三方 C\u002FC++ 库即可运行核心功能。若需运行实时摄像头演示，因 Go 生态缺乏跨平台摄像头库，需通过 cgo 调用 Python 脚本作为共享对象。支持 WebAssembly (WASM)，运行 WASM 演示需 Go 1.13 及以上版本。","仅在运行实时桌面演示（调用摄像头）时需要安装 Python，具体版本未说明；核心库无需 Python",[121],"Go (建议 1.13+ 以支持 WASM)",[15,14],[124,125,126,127,128,129,130,131,132,133,134],"face-detection","computer-vision","machine-learning","golang","opencv","pixel-intensity-comparison","pupil-detection","eye-detection","facial-landmarks","wasm","webassembly","2026-03-27T02:49:30.150509","2026-04-14T20:36:43.886147",[138,143,148,153,158,163,167],{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},33247,"Pigo 库是否支持人脸比对或人脸识别（身份确认）？","不支持。Pigo 仅用于人脸检测（定位人脸位置），不具备人脸识别（区分不同人身份）的功能。维护者指出，由于级联树结构在编码为二进制格式时无法保证保留，因此无法直接用于比较两张人脸。如果需要人脸识别功能，建议研究其他专门库（如 Dlib）。","https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fissues\u002F47",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},33248,"如何获取瞳孔或面部特征点的具体坐标？","可以通过计算得出近似坐标。不需要单独计算眼睛半径，只需将检测到的缩放值（scale）乘以百分比即可。维护者建议使用 0.4 作为系数（即 radius = scale * 0.4），这样可以得到近似正确的结果。这通常基于霍夫圆变换（Hough Circles）的原理。","https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fissues\u002F33",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},33249,"检测返回的是矩形还是椭圆形？如何绘制椭圆标记？","人脸检测器返回的是包含人脸的矩形坐标（Row, Col, Scale）。若要绘制椭圆形标记，需要手动调整长短轴。维护者在示例代码中将 X 轴半径设为 `scale\u002F2`，Y 轴半径设为 `scale\u002F1.6`。这些常数（2 和 1.6）是为了视觉上更贴合人脸形状而人为设定的，并非检测器直接返回椭圆数据。","https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fissues\u002F42",{"id":154,"question_zh":155,"answer_zh":156,"source_url":157},33250,"在使用小尺寸图像或特定缩放比例时遇到无限循环问题怎么办？","这是一个已知的舍入错误问题。当最小人脸尺寸较小且缩放因子（如 1.1）导致计算后的新尺寸因整数转换保持不变时，会引发无限循环。解决方案是修改缩放计算逻辑，避免步长为 0。推荐的修复代码是使用 `math.Max` 确保最小增量：`scale = int(float64(scale) + math.Max(2, (float64(scale)*cp.ScaleFactor)-float64(scale)))`，或者设置人脸最小尺寸的下限（如 10px）。","https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fissues\u002F46",{"id":159,"question_zh":160,"answer_zh":161,"source_url":162},33251,"WASM 版本或 CLI 工具是否提供保存检测坐标的机制？","CLI 应用程序本身提供了输出检测坐标的机制（例如通过 `-json` 参数）。WASM 演示版本默认不提供存储机制，但可以扩展实现，例如在检测窗口左上角显示坐标。如果需要持久化存储，建议在应用层捕获 CLI 输出的坐标数据或自行在 WASM 中实现数据导出逻辑。","https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fissues\u002F32",{"id":164,"question_zh":165,"answer_zh":166,"source_url":142},33252,"能否使用 OpenCV 的级联文件并将其转换为 Pigo 的二进制格式？","目前不支持。Pigo 的二进制级联树仅编码了特定的面部特征点结构。由于 OpenCV 的级联文件结构不同，直接编码无法保证级联树结构的完整性，因此不能直接使用 OpenCV 的模型文件。",{"id":168,"question_zh":169,"answer_zh":170,"source_url":171},33253,"在 Windows 上运行 Python 演示程序时出现退出代码 1073741819 (0xC0000005) 错误如何解决？","该错误通常由 C 共享库中的索引越界引起。维护者已确认此问题并在后续版本中修复。如果遇到此问题，请确保升级到最新的 Pigo 版本。如果在调试模式（如 PyCharm）下必现而在命令行下正常，也建议更新库以获取稳定性修复。","https:\u002F\u002Fgithub.com\u002Fesimov\u002Fpigo\u002Fissues\u002F58",[173,178,183,188,193,198,203,208,213,218,223,228,233,238],{"id":174,"version":175,"summary_zh":176,"released_at":177},255411,"v1.4.6","发布更新\n====\n* 修复了在使用 `-flpc` 标志时缺少 `-plc` 标志的问题 #59\n* 修复了当输入或输出文件名使用大写字母时 CLI 报错的问题\n* 将旧的排序函数替换为 `sort.Slice`","2022-10-04T08:19:17",{"id":179,"version":180,"summary_zh":181,"released_at":182},255412,"v1.4.5","发布更新\n====\n* 性能改进和优化\n* 优化内存分配\n* 扩展测试和基准测试","2021-11-01T13:45:30",{"id":184,"version":185,"summary_zh":186,"released_at":187},255413,"v1.4.4","发布更新\n====\n* 修复解析二分类器时特殊情况下可能出现的索引越界问题\n* 改进了命令行界面\n* 直接处理来自互联网的图片","2021-06-16T08:41:49",{"id":189,"version":190,"summary_zh":191,"released_at":192},255414,"v1.4.3","发布更新\n====\n* 将 `FindLandmarkPoints` 方法重命名为 `GetLandmarkPoint`，以提供更清晰的引用。进行了少量修复。","2020-11-09T09:44:39",{"id":194,"version":195,"summary_zh":196,"released_at":197},255415,"v1.4.2","发布更新\n====\n* 为 CLI 应用程序扩展管道命令支持。#37 ","2020-05-09T07:07:50",{"id":199,"version":200,"summary_zh":201,"released_at":202},255416,"v1.4.1","发布更新\n====\n* 在 JSON 导出中添加瞳孔定位和关键点检测 #33 ","2020-04-27T09:25:54",{"id":204,"version":205,"summary_zh":206,"released_at":207},255417,"v1.4.0","发布更新\n====\n* WebAssembly 支持 🎉\n* 在 WebAssembly 上运行的摄像头演示","2019-11-15T14:29:57",{"id":209,"version":210,"summary_zh":211,"released_at":212},255418,"v1.3.0","发布更新\n====\n* 人脸关键点检测功能\n* 新的集成测试和单元测试用例","2019-10-15T06:01:00",{"id":214,"version":215,"summary_zh":216,"released_at":217},255419,"v1.2.1","发布更新\n====\n* 集成了旋转人脸上的瞳孔定位功能\n* 简化了瞳孔检测算法\n* 代码清理","2019-09-19T14:22:50",{"id":219,"version":220,"summary_zh":221,"released_at":222},255420,"v1.2.0","发布更新\n====\n* 扩展了库的功能，新增瞳孔\u002F眼睛定位能力。\n* 创建了一个在 Python 环境中以共享对象形式运行的测试示例。","2019-08-09T13:33:03",{"id":224,"version":225,"summary_zh":226,"released_at":227},255421,"v1.1.0","Release updates\r\n====\r\n* Plane rotated faces detection capabilities.","2019-01-07T10:26:21",{"id":229,"version":230,"summary_zh":231,"released_at":232},255422,"v1.0.3","Release updates\r\n====\r\n* Refactored face detection code.\r\n* Support to export detected face coordinates into a json file.","2018-08-22T18:56:50",{"id":234,"version":235,"summary_zh":236,"released_at":237},255423,"v1.0.2","Release updates\r\n====\r\n* Test cases included for grayscale image detection and image types.","2018-08-17T18:59:11",{"id":239,"version":240,"summary_zh":241,"released_at":242},255424,"v1.0.1","Release updates\r\n====\r\n* Face detection core api.\r\n* Command line utility to support face recognition on static images.\r\n* Real time face detection using webcam.","2018-08-22T19:01:32"]