[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-mpatacchiola--deepgaze":3,"tool-mpatacchiola--deepgaze":61},[4,18,28,36,44,52],{"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":24,"last_commit_at":25,"category_tags":26,"status":17},9989,"n8n","n8n-io\u002Fn8n","n8n 是一款面向技术团队的公平代码（fair-code）工作流自动化平台，旨在让用户在享受低代码快速构建便利的同时，保留编写自定义代码的灵活性。它主要解决了传统自动化工具要么过于封闭难以扩展、要么完全依赖手写代码效率低下的痛点，帮助用户轻松连接 400 多种应用与服务，实现复杂业务流程的自动化。\n\nn8n 特别适合开发者、工程师以及具备一定技术背景的业务人员使用。其核心亮点在于“按需编码”：既可以通过直观的可视化界面拖拽节点搭建流程，也能随时插入 JavaScript 或 Python 代码、调用 npm 包来处理复杂逻辑。此外，n8n 原生集成了基于 LangChain 的 AI 能力，支持用户利用自有数据和模型构建智能体工作流。在部署方面，n8n 提供极高的自由度，支持完全自托管以保障数据隐私和控制权，也提供云端服务选项。凭借活跃的社区生态和数百个现成模板，n8n 让构建强大且可控的自动化系统变得简单高效。",184740,2,"2026-04-19T23:22:26",[16,14,13,15,27],"插件",{"id":29,"name":30,"github_repo":31,"description_zh":32,"stars":33,"difficulty_score":10,"last_commit_at":34,"category_tags":35,"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":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":24,"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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":24,"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",[27,13,15,14],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":10,"last_commit_at":58,"category_tags":59,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[60,15,13,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":77,"owner_email":78,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":86,"forks":87,"last_commit_at":88,"license":89,"difficulty_score":90,"env_os":91,"env_gpu":92,"env_ram":92,"env_deps":93,"category_tags":101,"github_topics":103,"view_count":24,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":117,"updated_at":118,"faqs":119,"releases":157},9922,"mpatacchiola\u002Fdeepgaze","deepgaze","Computer Vision library for human-computer interaction. It implements Head Pose and Gaze Direction Estimation Using Convolutional Neural Networks, Skin Detection through Backprojection, Motion Detection and Tracking, Saliency Map.","Deepgaze 是一款专注于人机交互的开源计算机视觉库，旨在让开发者轻松实现头部姿态估计与视线方向追踪。它主要解决了在复杂环境下（如眼睛被遮挡或用户距离摄像头较远时）难以精准捕捉用户注意力焦点的难题：当无法看清眼部细节时，Deepgaze 可通过分析头部朝向近似估算关注点；若眼部清晰可见，则能提供更精确的视线方向判断。\n\n该工具非常适合计算机视觉领域的研究人员、AI 开发者以及需要快速原型验证的工程团队使用。其核心亮点在于基于卷积神经网络（CNN）的高效算法，不仅支持高精度的头部姿态分类，还集成了人脸检测、皮肤色彩识别、运动跟踪及显著性图生成（FASA 算法）等多种实用功能。依托 OpenCV 和 TensorFlow 两大主流框架，Deepgaze 将复杂的底层算法封装为简洁的接口，用户仅需几行代码即可调用状态-of-the-art 的模型，大幅降低了开发门槛并节省了研发时间。作为一个活跃开放的社区项目，Deepgaze 兼顾了学术严谨性与工程实用性，是构建智能交互系统的得力助手。","Updates\n----------\n\n**Update 22\u002F01\u002F2020** You may be interested in following [my new Youtube channel](https:\u002F\u002Fwww.youtube.com\u002Fchannel\u002FUC6AxKVw2y_b3ab-esLdK0_g) for weekly videos about *Computer Vision*, *Machine Learning*, *Deep Learning*, and *Robotics*.\n\n**Update 16\u002F07\u002F2019** Stable version of *Deepgaze 2.0* is available on branch `2.0`.\n\n**Update 20\u002F03\u002F2019** Started the porting on Python\u002FOpenCV 3.0, check the branch `2.0` for a preliminary version.\n\n**Update 10\u002F06\u002F2017** The PDF of the article *\"Head pose estimation in the wild using Convolutional Neural Networks and adaptive gradient methods\"* is available for **free download** in the next 50 days using [this special link](https:\u002F\u002Fauthors.elsevier.com\u002Fa\u002F1VBdC77nKOnOt)\n\n**Update 04\u002F06\u002F2017** Article *\"Head pose estimation in the wild using Convolutional Neural Networks and adaptive gradient methods\"* have been accepted for publication in Pattern Recogntion (Elsevier). The Deepgaze CNN head pose estimator module is based on this work.\n\n**Update 31\u002F05\u002F2017** Implementation of the new package [saliency_map.py](.\u002Fdeepgaze\u002Fsaliency_map.py). The package contains an implementation of the [FASA](http:\u002F\u002Fivrl.epfl.ch\u002Fresearch\u002Fsaliency\u002Ffast_saliency) algorithm for saliency detection [[example]](.\u002Fexamples\u002Fex_fasa_saliency_map\u002Fex_fasa_saliency_map_images.py) [[wiki]](http:\u002F\u002Fwww.scholarpedia.org\u002Farticle\u002FSaliency_map)\n\n**Update 22\u002F03\u002F2017** Fixed a bug in mask_analysis.py and almost completed a more robust version of the CNN head pose estimator.\n\nWhat is Deepgaze?\n----------\nDeepgaze is a library for human-computer interaction, people detection and tracking which uses **Convolutional Neural Networks** (CNNs) for face detection, head pose estimation and classification. The focus of attention of a person can be approximately estimated finding the **head orientation**. This is particularly useful when the eyes are covered, or when the user is too far from the camera to grab the eye region with a good resolution. When the eye region is visible it is possible to estimate the **gaze direction**, which is much more informative and can give a good indication of the FOA. Deepgaze contains useful packages for:\n\n- Head pose estimation (Perspective-n-Point, Convolutional Neural Networks)\n- Face detection (Haar Cascade)\n- Skin and color detection (Range detection, Backprojection)\n- Histogram-based classification (Histogram Intersection)\n- Motion detection (Frame differencing, MOG, MOG2)\n- Motion tracking (Particle filter)\n- Saliency map (FASA)\n\nDeepgaze is based on OpenCV and Tensorflow, some of the best libraries in computer vision and machine learning. Deepgaze is an **open source** project and any contribution is appreciated, feel free to fork the repository and propose integrations. \n\nThis library is the result of a recent work, **if you use the library in academic work please cite the following paper**:\n\nPatacchiola, M., & Cangelosi, A. (2017). *Head pose estimation in the wild using Convolutional Neural Networks and adaptive gradient methods*. Pattern Recognition, http:\u002F\u002Fdx.doi.org\u002F10.1016\u002Fj.patcog.2017.06.009.\n\nWhy should I use Deepgaze?\n--------------------------\nBecause Deepgaze **makes your life easier!**\nThe implementation of many algorithms such as face detectors, pose estimators and object classificators can be painful. Deepgaze has been designed to implement those algorithms in **a few lines of code**. Deepgaze is helpful for both beginners and advanced users who want to save time. All the code contained in Deepgaze is optimised and it is based on state-of-the-art algorithms.\n\nWhat is a Convolutional Neural Network?\n------------------------------\nA convolutional neural network (CNN, or ConvNet) is a type of feed-forward artificial neural network in which the connectivity pattern between its neurons is inspired by the organization of the animal visual cortex, whose individual neurons are arranged in such a way that they respond to overlapping regions tiling the visual field. Convolutional networks were inspired by biological processes and are variations of multilayer perceptrons designed to use minimal amounts of preprocessing. They have wide applications in image and video recognition, recommender systems and natural language processing [[wiki]](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FConvolutional_neural_network)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_e2af34144534.png\" width=\"750\">\n\u003C\u002Fp>\n\nMain contributors\n-------------------\nThis is an updated list of the **main contributors** of the project. **We are looking for contributors!** If you want to contribute adding a new module or improving an existing one, [send an email to our team!](https:\u002F\u002Fwww.inf.ed.ac.uk\u002Fpeople\u002Fstaff\u002FMassimiliano_Patacchiola.html)\n\n- [Massimiliano Patacchiola](http:\u002F\u002Fmpatacchiola.github.io\u002F): project leader and main contributor\n- [Joel Gooch](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjoel-gooch-001458132\u002F?ppe=1): head pose estimation\n- [Ishit Mehta](https:\u002F\u002Fgithub.com\u002Fishit): CNN-cascade face detection\n- [Luca Surace](https:\u002F\u002Fgithub.com\u002Flukeoverride): Haar-cascade multi-face detection\n- [Hrishikesh Kamath](https:\u002F\u002Fgithub.com\u002Fkamathhrishi): version 2.0 porting, notebooks, test scripts\n\nPrerequisites\n------------\n\nThe current version of Deepgaze is based on **Python 2.7**, a porting for Python 3.0 has been scheduled for the next year.\n\nTo use the libray you have to install:\n\n- Numpy [[link]](http:\u002F\u002Fwww.numpy.org\u002F)\n\n```shell\nsudo pip install numpy\n```\n\n- OpenCV 2.x (not compatible with OpenCV >= 3.x) [[link]](http:\u002F\u002Fopencv.org\u002F)\n\n```shell\nsudo apt-get install libopencv-dev python-opencv\n```\n\n- Tensorflow [[link]](https:\u002F\u002Fwww.tensorflow.org\u002F)\n\n```shell\nsudo pip install tensorflow\n```\n\nSome examples may require additional libraries:\n\n- dlib [[link]](http:\u002F\u002Fdlib.net\u002F)\n\nInstallation\n--------\n\nATTENTION: this version is obsolete, please check the [branch 2.0 on this repository](https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Ftree\u002F2.0)\n\nDownload the repository from [[here]](https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Farchive\u002Fmaster.zip) or clone it using git:\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze.git\n```\n\nTo install the package you have to enter in the Deepgaze folder and run the setup.py script (it may require root privileges):\n\n```shell\ncd deepgaze\nsudo python setup.py install\n```\n\nIf you want to track all the installed files you can record the installation process in a text file using the `--record` flag:\n\n```shell\nsudo python setup.py install --record record.txt\n```\n\nDone! Now give a look to the examples below.\n\nExamples\n--------\n\n- Head Pose Estimation using the Perspective-n-Point algorithm in OpenCV [[code]](.\u002Fexamples\u002Fex_pnp_head_pose_estimation_webcam.py) [[video]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=OSnI18XmAg4)\n\n- Head Pose Estimation in-the-wild using Perspective-n-Point and dlib face detector [[code]](.\u002Fexamples\u002Fex_dlib_pnp_head_pose_estimation_video.py) [[video]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xurEs0G9ARs)\n\n- Head Pose Estimation in images using Convolutional Neural Networks [[code]](.\u002Fexamples\u002Fex_cnn_head_pose_estimation_images\u002Fex_cnn_head_pose_estimation_images.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_1a633d33cf8f.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Color detection using the Histogram Backprojection algorithm [[blog]](https:\u002F\u002Fmpatacchiola.github.io\u002Fblog\u002F2016\u002F12\u002F01\u002Fplaying-the-google-chrome-dinosaur-game-with-your-hand.html) [[code]](.\u002Fexamples\u002Fex_color_detection_image\u002Fex_color_detection_image.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_6951f307fe0c.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Skin detection using the HSV range color detector [[code]](.\u002Fexamples\u002Fex_skin_detection_images\u002Fex_skin_detection_images.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_2cb518f12bf0.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Face detection using the HSV range color detector [[code]](.\u002Fexamples\u002Fex_face_center_color_detection\u002Fex_face_center_color_detection.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_cdcdba44e921.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Corner detection comparison of four algorithms on a video streaming [[code]](.\u002Fexamples\u002Fex_corner_detection_video\u002Fex_corner_detection.py) [[video]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=2fhD98K_6Ag)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_d1e1d0ba0138.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Motion detection and tracking using frame differencing on a video streaming [[code]](.\u002Fexamples\u002Fex_diff_motion_detection_video\u002Fex_diff_motion_detection.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_63f803eb7186.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Motion detection and tracking comparison of three algorithms on a video streaming [[code]](.\u002Fexamples\u002Fex_motion_detectors_comparison_video\u002Fex_motion_detectors_comparison_video.py) [[video]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=XmI2kE2hUgE)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_494fa3077c0a.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Motion tracking with unstable measurements using Particle Filter [[code]](.\u002Fexamples\u002Fex_particle_filter_object_tracking_video\u002Fex_particle_filter_object_tracking_video.py) [[video]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=KTxVBN5-KpE)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_0466b82b2c49.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Motion tracking with multiple backprojection for playing chrome's dinosaur game [[blog]](https:\u002F\u002Fmpatacchiola.github.io\u002Fblog\u002F2016\u002F12\u002F01\u002Fplaying-the-google-chrome-dinosaur-game-with-your-hand.html) [[code]](.\u002Fexamples\u002Fex_multi_backprojection_hand_tracking_gaming\u002Fex_multi_backprojection_hand_tracking_gaming.py) [[video]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eoUOkV5vVpU&feature=youtu.be)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_70899ffde14f.gif\" width=\"550\">\n\u003C\u002Fp>\n\n- Classify object using their colour fingerprint (histogram intersection) [[blog]](https:\u002F\u002Fmpatacchiola.github.io\u002Fblog\u002F2016\u002F11\u002F12\u002Fthe-simplest-classifier-histogram-intersection.html) [[code]](.\u002Fexamples\u002Fex_color_classification_images\u002Fex_color_classification_image.py)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_8b12ed6341ac.png\" width=\"750\">\n\u003C\u002Fp>\n\n- Implementation of the FASA (Fast, Accurate, and Size-Aware Salient Object Detection) algorithm [[code]](.\u002Fexamples\u002Fex_fasa_saliency_map\u002Fex_fasa_saliency_map_images.py) [[wiki]](http:\u002F\u002Fwww.scholarpedia.org\u002Farticle\u002FSaliency_map) [[link]](http:\u002F\u002Fivrl.epfl.ch\u002Fresearch\u002Fsaliency\u002Ffast_saliency)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_eb2834643b99.png\" width=\"750\">\n\u003C\u002Fp>\n\nAcknowledgements\n---------------\n\n- The example \"head pose estimation using Perspective-n-Point\" is partially based on the C++ version you can find [here](https:\u002F\u002Fgithub.com\u002Fseverin-lemaignan\u002Fgazr), and on the workshop \"Developing an attention system for a social robot\" which was part of the 2nd International Summer School on Social Human-Robot Interaction.\n\n- To implement the Bayes and Particle Filters I followed the great repository of [rlabbe](https:\u002F\u002Fgithub.com\u002Frlabbe) which you can find [here](https:\u002F\u002Fgithub.com\u002Frlabbe\u002FKalman-and-Bayesian-Filters-in-Python)\n\n\n\n\n\n\n\n\n\n","更新\n----------\n\n**更新 2020年1月22日** 您可能会对关注我的新 YouTube 频道感兴趣，该频道每周会发布关于 *计算机视觉*、*机器学习*、*深度学习* 和 *机器人技术* 的视频：[点击这里](https:\u002F\u002Fwww.youtube.com\u002Fchannel\u002FUC6AxKVw2y_b3ab-esLdK0_g)。\n\n**更新 2019年7月16日** *Deepgaze 2.0* 的稳定版本已在 `2.0` 分支中提供。\n\n**更新 2019年3月20日** 已开始向 Python\u002FOpenCV 3.0 迁移，请查看 `2.0` 分支以获取初步版本。\n\n**更新 2017年6月10日** 文章《使用卷积神经网络和自适应梯度方法进行野外头部姿态估计》的 PDF 文件将在接下来的 50 天内通过 [此特别链接](https:\u002F\u002Fauthors.elsevier.com\u002Fa\u002F1VBdC77nKOnOt) 提供 **免费下载**。\n\n**更新 2017年6月4日** 文章《使用卷积神经网络和自适应梯度方法进行野外头部姿态估计》已被 Elsevier 出版的《模式识别》期刊接受发表。Deepgaze CNN 头部姿态估计算法模块正是基于这项工作。\n\n**更新 2017年5月31日** 实现了新的软件包 [saliency_map.py](.\u002Fdeepgaze\u002Fsaliency_map.py)。该软件包包含用于显著性检测的 [FASA](http:\u002F\u002Fivrl.epfl.ch\u002Fresearch\u002Fsaliency\u002Ffast_saliency) 算法的实现 [[示例]](.\u002Fexamples\u002Fex_fasa_saliency_map\u002Fex_fasa_saliency_map_images.py) [[维基]](http:\u002F\u002Fwww.scholarpedia.org\u002Farticle\u002FSaliency_map)。\n\n**更新 2017年3月22日** 修复了 mask_analysis.py 中的一个错误，并且几乎完成了更鲁棒的 CNN 头部姿态估计算法。\n\n什么是 Deepgaze？\n----------\nDeepgaze 是一个用于人机交互、人员检测与跟踪的库，它利用 **卷积神经网络**（CNN）进行人脸检测、头部姿态估计和分类。通过确定一个人的 **头部朝向**，可以近似估算其注意力焦点。这在眼睛被遮挡或用户距离摄像头太远以至于无法以良好分辨率捕捉到眼部区域时尤为有用。当眼部区域可见时，还可以进一步估计 **注视方向**，这提供了更为丰富的信息，并能很好地指示视野中的兴趣点（FOA）。Deepgaze 包含以下实用工具包：\n\n- 头部姿态估计（透视 n 点法、卷积神经网络）\n- 人脸检测（Haar 级联）\n- 皮肤与颜色检测（范围检测、反投影）\n- 基于直方图的分类（直方图交集）\n- 运动检测（帧差法、MOG、MOG2）\n- 运动跟踪（粒子滤波器）\n- 显著性图（FASA）\n\nDeepgaze 基于 OpenCV 和 TensorFlow 构建，这两者都是计算机视觉和机器学习领域的顶级库。Deepgaze 是一个 **开源** 项目，欢迎任何贡献，您可以随意 fork 本仓库并提出集成建议。\n\n本库是近期研究成果，**如果您在学术工作中使用本库，请引用以下论文**：\n\nPatacchiola, M., & Cangelosi, A. (2017). *Head pose estimation in the wild using Convolutional Neural Networks and adaptive gradient methods*. Pattern Recognition, http:\u002F\u002Fdx.doi.org\u002F10.1016\u002Fj.patcog.2017.06.009.\n\n为什么应该使用 Deepgaze？\n--------------------------\n因为 Deepgaze **能让您的生活更轻松！**  \n许多算法的实现，例如人脸检测器、姿态估计算法和目标分类器，往往非常繁琐。而 Deepgaze 的设计宗旨就是用 **几行代码** 就能实现这些功能。无论是初学者还是高级用户，Deepgaze 都能帮助节省时间。Deepgaze 中的所有代码都经过优化，并且基于最先进的算法。\n\n什么是卷积神经网络？\n------------------------------\n卷积神经网络（CNN 或 ConvNet）是一种前馈人工神经网络，其神经元之间的连接模式受到动物视觉皮层组织结构的启发——视觉皮层中的单个神经元排列方式使得它们能够响应覆盖整个视觉场的重叠区域。卷积网络的设计灵感来源于生物过程，是多层感知器的一种变体，旨在尽量减少预处理步骤。它们广泛应用于图像和视频识别、推荐系统以及自然语言处理等领域 [[维基]](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FConvolutional_neural_network)。\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_e2af34144534.png\" width=\"750\">\n\u003C\u002Fp>\n\n主要贡献者\n-------------------\n以下是该项目的 **主要贡献者** 最新名单。**我们正在寻找更多贡献者！** 如果您希望添加新模块或改进现有模块，请 [发送邮件给我们的团队！](https:\u002F\u002Fwww.inf.ed.ac.uk\u002Fpeople\u002Fstaff\u002FMassimiliano_Patacchiola.html)\n\n- [Massimiliano Patacchiola](http:\u002F\u002Fmpatacchiola.github.io\u002F)：项目负责人及主要贡献者\n- [Joel Gooch](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjoel-gooch-001458132\u002F?ppe=1)：头部姿态估计\n- [Ishit Mehta](https:\u002F\u002Fgithub.com\u002Fishit)：CNN 级联式人脸检测\n- [Luca Surace](https:\u002F\u002Fgithub.com\u002Flukeoverride)：Haar 级联式多人脸检测\n- [Hrishikesh Kamath](https:\u002F\u002Fgithub.com\u002Fkamathhrishi)：2.0 版本移植、笔记本及测试脚本\n\n先决条件\n------------\n\n当前版本的 Deepgaze 基于 **Python 2.7**，针对 Python 3.0 的移植计划将于明年进行。\n\n要使用该库，您需要安装以下内容：\n\n- Numpy [[链接]](http:\u002F\u002Fwww.numpy.org\u002F)\n\n```shell\nsudo pip install numpy\n```\n\n- OpenCV 2.x（不兼容 OpenCV >= 3.x）[[链接]](http:\u002F\u002Fopencv.org\u002F)\n\n```shell\nsudo apt-get install libopencv-dev python-opencv\n```\n\n- Tensorflow [[链接]](https:\u002F\u002Fwww.tensorflow.org\u002F)\n\n```shell\nsudo pip install tensorflow\n```\n\n部分示例可能还需要其他库：\n\n- dlib [[链接]](http:\u002F\u002Fdlib.net\u002F)\n\n安装\n--------\n\n注意：此版本已过时，请查看本仓库的 [2.0 分支](https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Ftree\u002F2.0)。\n\n您可以从 [[这里]](https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Farchive\u002Fmaster.zip) 下载仓库，或者使用 git 克隆：\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze.git\n```\n\n安装软件包时，需进入 Deepgaze 文件夹并运行 setup.py 脚本（可能需要 root 权限）：\n\n```shell\ncd deepgaze\nsudo python setup.py install\n```\n\n如果您想记录所有已安装的文件，可以在安装过程中使用 `--record` 标志将过程记录到文本文件中：\n\n```shell\nsudo python setup.py install --record record.txt\n```\n\n完成！现在请查看下面的示例。\n\n示例\n--------\n\n- 使用 OpenCV 中的透视 n 点法进行头部姿态估计 [[代码]](.\u002Fexamples\u002Fex_pnp_head_pose_estimation_webcam.py) [[视频]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=OSnI18XmAg4)\n\n- 使用透视 n 点法和 dlib 人脸检测器进行野外头部姿态估计 [[代码]](.\u002Fexamples\u002Fex_dlib_pnp_head_pose_estimation_video.py) [[视频]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xurEs0G9ARs)\n\n- 使用卷积神经网络进行图像中头部姿态估计 [[代码]](.\u002Fexamples\u002Fex_cnn_head_pose_estimation_images\u002Fex_cnn_head_pose_estimation_images.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_1a633d33cf8f.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 使用直方图反投影算法进行颜色检测 [[博客]](https:\u002F\u002Fmpatacchiola.github.io\u002Fblog\u002F2016\u002F12\u002F01\u002Fplaying-the-google-chrome-dinosaur-game-with-your-hand.html) [[代码]](.\u002Fexamples\u002Fex_color_detection_image\u002Fex_color_detection_image.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_6951f307fe0c.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 使用HSV范围颜色检测器进行皮肤检测 [[代码]](.\u002Fexamples\u002Fex_skin_detection_images\u002Fex_skin_detection_images.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_2cb518f12bf0.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 使用HSV范围颜色检测器进行人脸检测 [[代码]](.\u002Fexamples\u002Fex_face_center_color_detection\u002Fex_face_center_color_detection.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_cdcdba44e921.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 在视频流上比较四种角点检测算法 [[代码]](.\u002Fexamples\u002Fex_corner_detection_video\u002Fex_corner_detection.py) [[视频]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=2fhD98K_6Ag)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_d1e1d0ba0138.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 在视频流上使用帧差法进行运动检测与跟踪 [[代码]](.\u002Fexamples\u002Fex_diff_motion_detection_video\u002Fex_diff_motion_detection.py)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_63f803eb7186.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 在视频流上比较三种运动检测算法 [[代码]](.\u002Fexamples\u002Fex_motion_detectors_comparison_video\u002Fex_motion_detectors_comparison_video.py) [[视频]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=XmI2kE2hUgE)\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_494fa3077c0a.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 使用粒子滤波器对不稳定测量值进行运动跟踪 [[代码]](.\u002Fexamples\u002Fex_particle_filter_object_tracking_video\u002Fex_particle_filter_object_tracking_video.py) [[视频]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=KTxVBN5-KpE)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_0466b82b2c49.png\" width=\"750\">\n\u003C\u002Fp>\n\n- 使用多幅反投影技术玩Chrome恐龙游戏进行手势跟踪 [[博客]](https:\u002F\u002Fmpatacchiola.github.io\u002Fblog\u002F2016\u002F12\u002F01\u002Fplaying-the-google-chrome-dinosaur-game-with-your-hand.html) [[代码]](.\u002Fexamples\u002Fex_multi_backprojection_hand_tracking_gaming\u002Fex_multi_backprojection_hand_tracking_gaming.py) [[视频]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eoUOkV5vVpU&feature=youtu.be)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_70899ffde14f.gif\" width=\"550\">\n\u003C\u002Fp>\n\n- 根据物体的颜色指纹（直方图交集）对其进行分类 [[博客]](https:\u002F\u002Fmpatacchiola.github.io\u002Fblog\u002F2016\u002F11\u002F12\u002Fthe-simplest-classifier-histogram-intersection.html) [[代码]](.\u002Fexamples\u002Fex_color_classification_images\u002Fex_color_classification_image.py)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_8b12ed6341ac.png\" width=\"750\">\n\u003C\u002Fp>\n\n- FASA（快速、准确且考虑尺寸的显著性目标检测）算法的实现 [[代码]](.\u002Fexamples\u002Fex_fasa_saliency_map\u002Fex_fasa_saliency_map_images.py) [[维基]](http:\u002F\u002Fwww.scholarpedia.org\u002Farticle\u002FSaliency_map) [[链接]](http:\u002F\u002Fivrl.epfl.ch\u002Fresearch\u002Fsaliency\u002Ffast_saliency)\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_readme_eb2834643b99.png\" width=\"750\">\n\u003C\u002Fp>\n\n致谢\n-------\n\n- “基于透视n点法的头部姿态估计”示例部分参考了可在[这里](https:\u002F\u002Fgithub.com\u002Fseverin-lemaignan\u002Fgazr)找到的C++版本，以及第二届国际社会人机交互暑期学校中的“为社交机器人开发注意力系统”研讨会。\n\n- 在实现贝叶斯滤波器和粒子滤波器时，我参考了[rlabbe](https:\u002F\u002Fgithub.com\u002Frlabbe)的优秀仓库，该仓库可在此处找到：[https:\u002F\u002Fgithub.com\u002Frlabbe\u002FKalman-and-Bayesian-Filters-in-Python]。","# Deepgaze 快速上手指南\n\nDeepgaze 是一个基于 **OpenCV** 和 **TensorFlow** 的开源库，专注于人机交互、人脸检测与追踪。它利用卷积神经网络（CNN）实现头部姿态估计、视线方向预测等功能，特别适用于眼睛被遮挡或用户距离摄像头较远的场景。\n\n> **注意**：根据官方说明，当前主分支版本已过时，主要基于 **Python 2.7** 和 **OpenCV 2.x**。如需使用更新的 Python 3 和 OpenCV 3+ 版本，请切换至仓库的 `2.0` 分支。本指南基于主分支内容编写。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**：Linux (推荐 Ubuntu\u002FDebian)\n*   **Python 版本**：Python 2.7\n*   **核心依赖**：\n    *   Numpy\n    *   OpenCV 2.x (**不兼容** OpenCV 3.x 及以上版本)\n    *   TensorFlow\n    *   (可选) dlib：部分示例需要此库\n\n### 安装依赖\n\n建议使用国内镜像源加速安装过程。\n\n```bash\n# 安装 Numpy\nsudo pip install numpy -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n\n# 安装 OpenCV 2.x (通过 apt-get 安装系统包)\nsudo apt-get update\nsudo apt-get install libopencv-dev python-opencv\n\n# 安装 TensorFlow\nsudo pip install tensorflow -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n\n# (可选) 如果运行特定示例需要 dlib\nsudo pip install dlib -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 安装步骤\n\n1.  **克隆仓库**\n    从 GitHub 下载 Deepgaze 源代码：\n\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze.git\n    ```\n\n2.  **执行安装**\n    进入项目目录并运行安装脚本（可能需要 root 权限）：\n\n    ```bash\n    cd deepgaze\n    sudo python setup.py install\n    ```\n\n    *提示：如果您希望记录安装的文件列表以便后续卸载，可以使用 `--record` 参数：*\n    ```bash\n    sudo python setup.py install --record record.txt\n    ```\n\n## 基本使用\n\nDeepgaze 提供了丰富的示例代码。以下是最核心的**基于 CNN 的头部姿态估计**用法示例。\n\n### 示例：图片头部姿态估计\n\n该示例展示了如何使用预训练的 CNN 模型对静态图片进行头部姿态分析。\n\n1.  找到示例脚本：`examples\u002Fex_cnn_head_pose_estimation_images\u002Fex_cnn_head_pose_estimation_images.py`\n2.  准备一张包含人脸的图片。\n3.  运行脚本（具体参数请参考脚本内部注释或帮助信息）：\n\n```bash\npython examples\u002Fex_cnn_head_pose_estimation_images\u002Fex_cnn_head_pose_estimation_images.py\n```\n\n### 其他常用功能示例\n\nDeepgaze 还内置了多种计算机视觉任务的示例，您可以直接运行以下脚本来体验：\n\n*   **基于 PnP 算法的头部姿态估计 ( webcam )**\n    ```bash\n    python examples\u002Fex_pnp_head_pose_estimation_webcam.py\n    ```\n*   **肤色检测 (HSV 范围)**\n    ```bash\n    python examples\u002Fex_skin_detection_images\u002Fex_skin_detection_images.py\n    ```\n*   **颜色检测 (直方图反向投影)**\n    ```bash\n    python examples\u002Fex_color_detection_image\u002Fex_color_detection_image.py\n    ```\n*   **运动检测与追踪 (帧差法)**\n    ```bash\n    python examples\u002Fex_diff_motion_detection_video\u002Fex_diff_motion_detection.py\n    ```\n*   **显著性图生成 (FASA 算法)**\n    ```bash\n    python examples\u002Fex_fasa_saliency_map\u002Fex_fasa_saliency_map_images.py\n    ```\n\n> **学术引用**：如果您在学术研究中使用本库，请引用以下论文：\n> Patacchiola, M., & Cangelosi, A. (2017). *Head pose estimation in the wild using Convolutional Neural Networks and adaptive gradient methods*. Pattern Recognition.","某智能零售实验室正在开发一套“顾客注意力分析系统”，旨在通过监控摄像头自动识别顾客在货架前的停留行为及关注焦点，以优化商品陈列。\n\n### 没有 deepgaze 时\n- **开发周期漫长**：团队需从零编写或拼凑人脸检测、头部姿态估计和视线追踪算法，代码量大且调试困难。\n- **复杂场景失效**：当顾客佩戴墨镜、口罩或距离摄像头较远导致眼部区域模糊时，传统基于眼睛特征的视线算法完全无法工作。\n- **注意力判断粗糙**：仅能依靠简单的运动检测（如帧差法）判断有人经过，无法区分顾客是“路过”还是真正“注视”了特定商品。\n- **集成成本高**：将不同的开源模型（如单独的 TensorFlow 模型和 OpenCV 脚本）整合到一个流畅的流水线中，需要大量的工程适配工作。\n\n### 使用 deepgaze 后\n- **快速落地原型**：利用 deepgaze 封装好的 CNN 头部姿态估计和人脸检测模块，仅需几行代码即可构建出完整的注意力分析流水线。\n- **鲁棒性显著提升**：即使顾客眼部被遮挡或分辨率不足，deepgaze 也能通过高精度的头部朝向估算来近似推断关注点，确保数据不中断。\n- **洞察更加精准**：结合深 gaze 提供的显著性图（Saliency Map）和粒子滤波追踪，系统能精确计算出顾客在特定商品区域的停留时长和视觉焦点。\n- **开箱即用体验**：基于 OpenCV 和 TensorFlow 优化的现成包，让团队无需关心底层算法细节，直接专注于业务逻辑与数据分析。\n\ndeepgaze 通过将复杂的计算机视觉算法封装为简洁接口，让开发者能在遮挡或远距离等挑战性环境下，低成本地实现高精度的人机交互与注意力分析。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmpatacchiola_deepgaze_2cb518f1.png","mpatacchiola","Massimiliano Patacchiola","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmpatacchiola_3b49c27b.jpg","Senior AI Research Engineer at Tools for Humanity. Likes Machine\u002FDeep\u002FReinforcement Learning.","Tools for Humanity","Dubai",null,"http:\u002F\u002Fmpatacchiola.github.io","https:\u002F\u002Fgithub.com\u002Fmpatacchiola",[82],{"name":83,"color":84,"percentage":85},"Python","#3572A5",100,1860,479,"2026-04-15T09:27:11","MIT",4,"Linux","未说明",{"notes":94,"python":95,"dependencies":96},"当前版本已过时，明确不兼容 OpenCV 3.x 及以上版本；官方建议用户迁移至分支 2.0 以获取 Python 3 和 OpenCV 3 的支持。安装命令示例显示主要面向 Linux (apt-get) 环境。","2.7",[97,98,99,100],"numpy","opencv==2.x","tensorflow","dlib",[15,102],"视频",[104,105,106,107,108,109,110,111,112,113,114,115,116],"convolutional-neural-networks","motion-tracking","color-detection","face-detection","skin-detection","motion-detection","head-pose-estimation","human-computer-interaction","histogram-comparison","histogram-intersection","cnn","particle-filter","saliency-map","2026-03-27T02:49:30.150509","2026-04-20T10:24:15.830733",[120,125,130,135,140,144,148,153],{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},44538,"遇到 'AttributeError: module object has no attribute CV_HAAR_SCALE_IMAGE' 错误如何解决？","这是由于 OpenCV 3+ 版本中模块名称变更导致的。请打开报错文件（通常是 haar_cascade.py），将代码中的 `cv2.cv.CV_HAAR_SCALE_IMAGE` 替换为 `cv2.CASCADE_SCALE_IMAGE`。此问题在 OpenCV 3.4、4.6.0 及更高版本中均会出现，修改后需重启程序生效。","https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Fissues\u002F41",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},44539,"运行 setup.py install 时提示 'command not found' 或找不到文件怎么办？","这通常是因为执行命令的方式错误或当前目录不正确。1) 不要直接运行 `setup.py`，应使用 `python setup.py install` 或在 Jupyter\u002FColab 中使用 `!python setup.py install`。2) 确保当前终端路径已切换到包含 setup.py 的 deepgaze 根目录下，可使用 `ls` 命令确认文件夹存在，若不在正确路径请使用 `cd` 命令切换后再执行安装。","https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Fissues\u002F25",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},44540,"CNN 头部姿态估计的输出值跳动剧烈或不稳定，如何优化？","可以通过引入滤波器来解决数据抖动问题。由于时间 t 的头部姿态与 t-1 时刻高度相关（例如 yaw 角不可能瞬间从 65 度跳变到 -85 度），建议使用移动平均滤波器（Moving Average）或贝叶斯滤波器（Bayes filter）。当测量值不一致时，滤波器会对其进行平滑处理，使结果更加连贯合理。","https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Fissues\u002F43",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},44541,"训练过程中网络预测值始终不变（陷入局部极小值）的原因及解决方法？","如果网络总是返回相同的输出，说明优化过程陷入了局部极小值。主要原因包括：输入特征未正确归一化、网络结构定义错误或超参数选择不当。解决步骤：1) 检查输入特征是否已正确归一化；2) 检查网络定义代码是否有误；3) 调整优化器相关的超参数，特别是学习率（learning rate）和动量（momentum）。","https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Fissues\u002F45",{"id":141,"question_zh":142,"answer_zh":143,"source_url":129},44542,"加载 TensorFlow 模型文件时报错 'file path is incorrect' 如何处理？","该错误通常由文件路径引用错误引起。请检查代码中加载 `.tf` 模型文件的路径是否正确。注意在使用 `os.path.realpath` 或直接指定路径时，确保相对于当前执行脚本的目录结构是正确的。如果是相对路径问题，尝试使用绝对路径，或确认当前工作目录是否位于预期位置。此外，确保文件名后缀和大小写与实际文件完全一致。",{"id":145,"question_zh":146,"answer_zh":147,"source_url":134},44543,"如何在图像中可视化 CNN 计算出的 Roll, Pitch, Yaw 角度？","CNN 输出的是欧拉角，要像 PnP 方法那样在图像上投影坐标轴，需要先将角度转换为旋转矩阵，再转换为旋转向量。可以使用自定义函数将 yaw\u002Fpitch\u002Froll 分别转换为 3x3 旋转矩阵（利用三角函数计算 sin\u002Fcos），然后组合成最终旋转矩阵，最后调用 `cv2.Rodrigues` 将其转换为旋转向量供 `cv2.projectPoints` 使用。需注意坐标系定义的差异可能导致投影方向不对，需根据实际效果调整轴向定义。",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},44544,"solvePnP 后如何获取具体的 Roll, Yaw, Pitch 角度值？","虽然 Issue 中用户表示已自行解决，但通常做法是：先通过 `cv2.solvePnP` 获取旋转向量（rvec）和平移向量（tvec），然后使用 `cv2.Rodrigues` 将 rvec 转换为 3x3 旋转矩阵，最后从旋转矩阵中分解出欧拉角（Roll, Pitch, Yaw）。需注意旋转顺序（如 XYZ 或 ZYX）以及角度单位（弧度转角度需乘以 180\u002Fπ）。","https:\u002F\u002Fgithub.com\u002Fmpatacchiola\u002Fdeepgaze\u002Fissues\u002F3",{"id":154,"question_zh":155,"answer_zh":156,"source_url":139},44545,"训练 CNN 头部姿态估计时，数据集需要制作成什么格式？","根据项目讨论，训练数据通常需要制作成 `.pickle` 格式，类似于项目中 DNN 部分使用的数据格式。具体结构应包含图像数据及其对应的标签（如角度值），建议在源码中查找数据加载部分的代码以确认 pickle 文件内部的具体字典键值结构。",[]]