[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-arunponnusamy--cvlib":3,"tool-arunponnusamy--cvlib":61},[4,18,28,37,45,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":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},10095,"AutoGPT","Significant-Gravitas\u002FAutoGPT","AutoGPT 是一个旨在让每个人都能轻松使用和构建 AI 的强大平台，核心功能是帮助用户创建、部署和管理能够自动执行复杂任务的连续型 AI 智能体。它解决了传统 AI 应用中需要频繁人工干预、难以自动化长流程工作的痛点，让用户只需设定目标，AI 即可自主规划步骤、调用工具并持续运行直至完成任务。\n\n无论是开发者、研究人员，还是希望提升工作效率的普通用户，都能从 AutoGPT 中受益。开发者可利用其低代码界面快速定制专属智能体；研究人员能基于开源架构探索多智能体协作机制；而非技术背景用户也可直接选用预置的智能体模板，立即投入实际工作场景。\n\nAutoGPT 的技术亮点在于其模块化“积木式”工作流设计——用户通过连接功能块即可构建复杂逻辑，每个块负责单一动作，灵活且易于调试。同时，平台支持本地自托管与云端部署两种模式，兼顾数据隐私与使用便捷性。配合完善的文档和一键安装脚本，即使是初次接触的用户也能在几分钟内启动自己的第一个 AI 智能体。AutoGPT 正致力于降低 AI 应用门槛，让人人都能成为 AI 的创造者与受益者。",183572,"2026-04-20T04:47:55",[13,36,27,14,15],"语言模型",{"id":38,"name":39,"github_repo":40,"description_zh":41,"stars":42,"difficulty_score":10,"last_commit_at":43,"category_tags":44,"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":46,"name":47,"github_repo":48,"description_zh":49,"stars":50,"difficulty_score":24,"last_commit_at":51,"category_tags":52,"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 真正成长为懂上",161147,"2026-04-19T23:31:47",[14,13,36],{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":24,"last_commit_at":59,"category_tags":60,"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":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":79,"owner_website":80,"owner_url":81,"languages":82,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":24,"env_os":91,"env_gpu":92,"env_ram":91,"env_deps":93,"category_tags":100,"github_topics":101,"view_count":24,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":107,"updated_at":108,"faqs":109,"releases":150},10118,"arunponnusamy\u002Fcvlib","cvlib","A simple, high level, easy to use, open source Computer Vision library for Python.","cvlib 是一个专为 Python 设计的高层开源计算机视觉库，旨在让复杂的图像分析变得像调用普通函数一样简单。它主要解决了传统计算机视觉开发中环境配置繁琐、代码实现门槛高的问题，让用户无需深入理解底层算法细节或手动加载庞大的预训练模型，即可快速实现人脸检测、性别识别以及常见物体检测等功能。\n\n这款工具非常适合希望快速验证想法的开发者、需要原型演示的研究人员，以及想要轻松入门计算机视觉领域的学生。对于不熟悉深度学习框架的用户，cvlib 也提供了极低的上手难度。其核心技术亮点在于高度封装：仅需一行代码（如 `detect_face()`）即可完成检测任务。底层它智能集成了 OpenCV 的 DNN 模块、基于 Adience 数据集训练的性别识别模型，以及强大的 YOLOv4 物体检测模型。此外，cvlib 还贴心地支持一键开启 GPU 加速，在保持代码简洁的同时，也能满足对实时性和性能有更高要求的应用场景。","[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_48fa92b7393c.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fcvlib) [![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fcvlib.svg?color=blue)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcvlib\u002F)\n\n# cvlib\nA simple, high level, easy-to-use open source Computer Vision library for Python.\n\n## Installation\n\n### Installing dependencies\n\nProvided the below python packages are installed, cvlib is completely pip installable.\n\n* OpenCV\n* TensorFlow\n\nIf you don't have them already installed, you can install through pip\n\n`pip install opencv-python tensorflow` \n\n#### Optional\nor you can compile them from source if you want to enable optimizations for your specific hardware for better performance.\nIf you are working with GPU, you can install `tensorflow-gpu` package through `pip`. Make sure you have the necessary Nvidia drivers  installed preoperly (CUDA ToolKit, CuDNN etc). \n\nIf you are not sure, just go with the cpu-only `tensorflow` package.\n\nYou can also compile OpenCV from source to enable CUDA optimizations for Nvidia GPU.\n\n### Installing cvlib\n\n`pip install cvlib`\n\nTo upgrade to the newest version\n`pip install --upgrade cvlib`\n\n#### Optional\nIf you want to build cvlib from source, clone this repository and run the below commands.\n```\ngit clone https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib.git\ncd cvlib\npip install .\n```\n\n**Note: Compatability with Python 2.x is not officially tested.**\n\n## Face detection\nDetecting faces in an image is as simple as just calling the function `detect_face()`. It will return the bounding box corners and corresponding confidence for all the faces detected.\n### Example :\n\n```python\nimport cvlib as cv\nfaces, confidences = cv.detect_face(image)\n```\nSeriously, that's all it takes to do face detection with `cvlib`. Underneath it is using OpenCV's `dnn` module with a pre-trained caffemodel to detect faces.\n\nTo enable GPU\n```python\nfaces, confidences = cv.detect_face(image, enable_gpu=True)\n```\n\nCheckout `face_detection.py` in `examples` directory for the complete code.\n\n### Sample output :\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_aa9a7ffdf029.jpg)\n\n## Gender detection\nOnce face is detected, it can be passed on to `detect_gender()` function to recognize gender. It will return the labels (man, woman) and associated probabilities.\n\n### Example\n\n```python\nlabel, confidence = cv.detect_gender(face)\n```\n\nUnderneath `cvlib` is using an AlexNet-like model trained on [Adience dataset](https:\u002F\u002Ftalhassner.github.io\u002Fhome\u002Fprojects\u002FAdience\u002FAdience-data.html#agegender) by Gil Levi and Tal Hassner for their [CVPR 2015 ](https:\u002F\u002Ftalhassner.github.io\u002Fhome\u002Fpublication\u002F2015_CVPR) paper.\n\nTo enable GPU\n```python\nlabel, confidence = cv.detect_gender(face, enable_gpu=True)\n```\n\nCheckout `gender_detection.py` in `examples` directory for the complete code.\n\n### Sample output :\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_684b4c2ef39a.jpg)\n\n## Object detection\nDetecting common objects in the scene is enabled through a single function call `detect_common_objects()`. It will return the bounding box co-ordinates, corrensponding labels and confidence scores for the detected objects in the image.\n\n### Example :\n\n```python\nimport cvlib as cv\nfrom cvlib.object_detection import draw_bbox\n\nbbox, label, conf = cv.detect_common_objects(img)\n\noutput_image = draw_bbox(img, bbox, label, conf)\n```\nUnderneath it uses [YOLOv4](https:\u002F\u002Fgithub.com\u002FAlexeyAB\u002Fdarknet) model trained on [COCO dataset](http:\u002F\u002Fcocodataset.org\u002F) capable of detecting 80 [common objects](https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fobject-detection-opencv\u002Fblob\u002Fmaster\u002Fyolov3.txt) in context.\n\nTo enable GPU\n```python\nbbox, label, conf = cv.detect_common_objects(img, enable_gpu=True)\n```\n\nCheckout `object_detection.py` in `examples` directory for the complete code.\n\n### Real time object detection\n`YOLOv4` is actually a heavy model to run on CPU. If you are working with real time webcam \u002F video feed and doesn't have GPU, try using `tiny yolo` which is a smaller version of the original YOLO model. It's significantly fast but less accurate.\n\n```python\nbbox, label, conf = cv.detect_common_objects(img, confidence=0.25, model='yolov4-tiny')\n```\nCheck out the [example](examples\u002Fobject_detection_webcam.py) to learn more. \n\nOther supported models: YOLOv3, YOLOv3-tiny.\n\n### Custom trained YOLO weights\nTo run inference with custom trained YOLOv3\u002Fv4 weights try the following\n```python\nfrom cvlib.object_detection import YOLO\n\nyolo = YOLO(weights, config, labels)\nbbox, label, conf = yolo.detect_objects(img)\nyolo.draw_bbox(img, bbox, label, conf)\n```\nTo enable GPU\n```python\nbbox, label, conf = yolo.detect_objects(img, enable_gpu=True)\n```\n\nCheckout the [example](examples\u002Fyolo_custom_weights_inference.py) to learn more.\n\n### Sample output :\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_01a68d373889.jpg)\n\n## Utils\n### Video to frames\n`get_frames( )` method can be helpful when you want to grab all the frames from a video. Just pass the path to the video, it will return all the frames in a list. Each frame in the list is a numpy array.\n```python\nimport cvlib as cv\nframes = cv.get_frames('~\u002FDownloads\u002Fdemo.mp4')\n```\nOptionally you can pass in a directory path to save all the frames to disk.\n```python\nframes = cv.get_frames('~\u002FDownloads\u002Fdemo.mp4', '~\u002FDownloads\u002Fdemo_frames\u002F')\n```\n\n### Creating gif\n`animate( )` method lets you create gif from a list of images. Just pass a list of images or path to a directory containing images and output gif name as arguments to the method, it will create a gif out of the images and save it to disk for you.\n\n```python\ncv.animate(frames, '~\u002FDocuments\u002Fframes.gif')\n```\n\n## Sponsor\nDeveloping and maintaining open source projects takes a lot of time and effort. If you are getting value out of this project, consider supporting my work by simply [buying me a coffee](https:\u002F\u002Fbuymeacoffee.com\u002Farunponnusamy) (one time or every month).\n\n## License\ncvlib is released under MIT license.\n\n## Help\nFor bugs and feature requests, feel free to file a [GitHub issue](https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues). (Make sure to check whether the issue has been filed already) \n\nFor usage related how-to questions, please create a new question on [StackOverflow](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Fcvlib) with the tag `cvlib`.\n\n## Community\nJoin the official [Discord Server](https:\u002F\u002Fdiscord.gg\u002FCHHQJZGWfh) or [GitHub Discussions](https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fdiscussions) to talk about all things cvlib.\n\n## Citation\nIf you find cvlib helpful in your work, please cite the following\n```BibTex\n@misc{ar2018cvlib,\n  author =       {Arun Ponnusamy},\n  title =        {cvlib - high level Computer Vision library for Python},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib}},\n  year =         {2018}\n}\n```\n\n","[![下载量](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_48fa92b7393c.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fcvlib) [![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fcvlib.svg?color=blue)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcvlib\u002F)\n\n# cvlib\n一个简单、高级、易于使用的 Python 开源计算机视觉库。\n\n## 安装\n\n### 安装依赖\n只要安装了以下 Python 包，cvlib 就可以通过 pip 完全安装。\n\n* OpenCV\n* TensorFlow\n\n如果尚未安装，可以通过 pip 进行安装：\n\n`pip install opencv-python tensorflow`\n\n#### 可选\n或者，您也可以从源代码编译这些库，以针对您的特定硬件启用优化，从而获得更好的性能。\n如果您使用 GPU，可以通过 `pip` 安装 `tensorflow-gpu` 包。请确保已正确安装必要的 NVIDIA 驱动程序（CUDA 工具包、CuDNN 等）。\n\n如果您不确定，只需使用仅支持 CPU 的 `tensorflow` 包即可。\n\n您还可以从源代码编译 OpenCV，以启用适用于 NVIDIA GPU 的 CUDA 优化。\n\n### 安装 cvlib\n`pip install cvlib`\n\n要升级到最新版本：\n`pip install --upgrade cvlib`\n\n#### 可选\n如果您想从源代码构建 cvlib，请克隆此仓库并运行以下命令：\n```\ngit clone https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib.git\ncd cvlib\npip install .\n```\n\n**注意：官方未对 Python 2.x 的兼容性进行测试。**\n\n## 人脸检测\n在图像中检测人脸非常简单，只需调用 `detect_face()` 函数即可。它将返回所有检测到的人脸的边界框角点及其对应的置信度。\n### 示例：\n\n```python\nimport cvlib as cv\nfaces, confidences = cv.detect_face(image)\n```\n\n真的，这就是使用 `cvlib` 进行人脸检测所需的全部操作。其底层使用 OpenCV 的 `dnn` 模块和预训练的 caffemodel 来检测人脸。\n\n启用 GPU：\n```python\nfaces, confidences = cv.detect_face(image, enable_gpu=True)\n```\n\n完整的代码请参阅 `examples` 目录中的 `face_detection.py`。\n\n### 示例输出：\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_aa9a7ffdf029.jpg)\n\n## 性别识别\n一旦检测到人脸，就可以将其传递给 `detect_gender()` 函数来识别性别。该函数将返回标签（男、女）及其相关概率。\n\n### 示例\n\n```python\nlabel, confidence = cv.detect_gender(face)\n```\n\n`cvlib` 的底层使用的是由 Gil Levi 和 Tal Hassner 在 [Adience 数据集](https:\u002F\u002Ftalhassner.github.io\u002Fhome\u002Fprojects\u002FAdience\u002FAdience-data.html#agegender) 上训练的类似 AlexNet 的模型，用于他们发表于 CVPR 2015 年会议上的论文。\n\n启用 GPU：\n```python\nlabel, confidence = cv.detect_gender(face, enable_gpu=True)\n```\n\n完整的代码请参阅 `examples` 目录中的 `gender_detection.py`。\n\n### 示例输出：\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_684b4c2ef39a.jpg)\n\n## 物体检测\n通过单个函数调用 `detect_common_objects()` 即可检测场景中的常见物体。该函数将返回图像中检测到的物体的边界框坐标、对应标签以及置信度分数。\n### 示例：\n\n```python\nimport cvlib as cv\nfrom cvlib.object_detection import draw_bbox\n\nbbox, label, conf = cv.detect_common_objects(img)\n\noutput_image = draw_bbox(img, bbox, label, conf)\n```\n\n其底层使用的是基于 [COCO 数据集](http:\u002F\u002Fcocodataset.org\u002F) 训练的 [YOLOv4](https:\u002F\u002Fgithub.com\u002FAlexeyAB\u002Fdarknet) 模型，能够检测 80 种 [常见物体](https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fobject-detection-opencv\u002Fblob\u002Fmaster\u002Fyolov3.txt)。\n\n启用 GPU：\n```python\nbbox, label, conf = cv.detect_common_objects(img, enable_gpu=True)\n```\n\n完整的代码请参阅 `examples` 目录中的 `object_detection.py`。\n\n### 实时物体检测\n`YOLOv4` 是一个在 CPU 上运行较为繁重的模型。如果您正在处理实时网络摄像头或视频流，并且没有 GPU，请尝试使用 `tiny yolo`，它是原始 YOLO 模型的一个较小版本。它的速度显著更快，但准确率较低。\n\n```python\nbbox, label, conf = cv.detect_common_objects(img, confidence=0.25, model='yolov4-tiny')\n```\n\n更多详情请参阅示例 [object_detection_webcam.py]。\n\n其他支持的模型：YOLOv3、YOLOv3-tiny。\n\n### 自定义训练的 YOLO 权重\n要使用自定义训练的 YOLOv3\u002Fv4 权重进行推理，请尝试以下操作：\n```python\nfrom cvlib.object_detection import YOLO\n\nyolo = YOLO(weights, config, labels)\nbbox, label, conf = yolo.detect_objects(img)\nyolo.draw_bbox(img, bbox, label, conf)\n```\n\n启用 GPU：\n```python\nbbox, label, conf = yolo.detect_objects(img, enable_gpu=True)\n```\n\n更多详情请参阅示例 [yolo_custom_weights_inference.py]。\n\n### 示例输出：\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_readme_01a68d373889.jpg)\n\n## 工具\n### 视频转帧\n`get_frames()` 方法在您需要从视频中提取所有帧时非常有用。只需传入视频路径，它将返回一个包含所有帧的列表。列表中的每一帧都是一个 numpy 数组。\n```python\nimport cvlib as cv\nframes = cv.get_frames('~\u002FDownloads\u002Fdemo.mp4')\n```\n\n您还可以选择传入一个目录路径，以便将所有帧保存到磁盘上。\n```python\nframes = cv.get_frames('~\u002FDownloads\u002Fdemo.mp4', '~\u002FDownloads\u002Fdemo_frames\u002F')\n```\n\n### 创建 GIF\n`animate()` 方法允许您从一组图片创建 GIF。只需将图片列表或包含图片的目录路径以及输出 GIF 的文件名作为参数传递给该方法，它就会为您创建 GIF 并将其保存到磁盘。\n\n```python\ncv.animate(frames, '~\u002FDocuments\u002Fframes.gif')\n```\n\n## 赞助\n开发和维护开源项目需要大量的时间和精力。如果您从该项目中受益，请考虑通过 [给我买杯咖啡](https:\u002F\u002Fbuymeacoffee.com\u002Farunponnusamy) 来支持我的工作（一次性或每月）。\n\n## 许可证\ncvlib 根据 MIT 许可证发布。\n\n## 帮助\n如发现错误或有功能请求，请随时提交 [GitHub 问题](https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues)。（请先确认是否已有人提交过相同的问题）\n\n如有关于使用方法的问题，请在 [StackOverflow](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Fcvlib) 上创建新问题，并添加 `cvlib` 标签。\n\n## 社区\n加入官方 [Discord 服务器](https:\u002F\u002Fdiscord.gg\u002FCHHQJZGWfh) 或 [GitHub 讨论区](https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fdiscussions) ，讨论与 cvlib 相关的一切。\n\n## 引用\n如果您在工作中发现 cvlib 有所帮助，请引用以下内容：\n```BibTex\n@misc{ar2018cvlib,\n  author =       {Arun Ponnusamy},\n  title =        {cvlib - high level Computer Vision library for Python},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib}},\n  year =         {2018}\n}\n```","# cvlib 快速上手指南\n\ncvlib 是一个简单、高层且易于使用的 Python 开源计算机视觉库，旨在让开发者通过极少的代码实现人脸检测、性别识别和通用物体检测等功能。\n\n## 环境准备\n\n在开始之前，请确保您的系统已安装 **Python 3.x**（注：Python 2.x 未经过官方测试）。\n\n### 前置依赖\ncvlib 依赖以下核心库，若未安装可通过 pip 先行安装：\n*   **OpenCV** (`opencv-python`)\n*   **TensorFlow** (`tensorflow` 或 `tensorflow-gpu`)\n\n> **提示**：如果您拥有 NVIDIA GPU 并希望启用加速，请确保已正确安装 CUDA Toolkit 和 CuDNN，并选择安装 `tensorflow-gpu`。若不确定，直接使用 CPU 版的 `tensorflow` 即可。\n\n## 安装步骤\n\n推荐使用国内镜像源（如清华源）以加快下载速度。\n\n### 1. 安装依赖\n```bash\npip install opencv-python tensorflow -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n*(若有 GPU 需求，可将 `tensorflow` 替换为 `tensorflow-gpu`)*\n\n### 2. 安装 cvlib\n```bash\npip install cvlib -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n如需升级到最新版本：\n```bash\npip install --upgrade cvlib -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 基本使用\n\n以下是三个最核心的功能示例，展示了如何用极简的代码完成复杂的视觉任务。\n\n### 1. 人脸检测 (Face Detection)\n只需调用 `detect_face()` 即可返回人脸边界框坐标及置信度。底层基于 OpenCV 的 DNN 模块。\n\n```python\nimport cvlib as cv\n\n# image 为读取后的图像数组 (numpy array)\nfaces, confidences = cv.detect_face(image)\n\n# 启用 GPU 加速\n# faces, confidences = cv.detect_face(image, enable_gpu=True)\n```\n\n### 2. 性别识别 (Gender Detection)\n在检测到人脸后，将人脸区域传入 `detect_gender()` 即可识别性别（男性\u002F女性）及其概率。\n\n```python\nimport cvlib as cv\n\n# face 为从原图中裁剪出的人脸区域\nlabel, confidence = cv.detect_gender(face)\n\n# 启用 GPU 加速\n# label, confidence = cv.detect_gender(face, enable_gpu=True)\n```\n\n### 3. 通用物体检测 (Object Detection)\n调用 `detect_common_objects()` 可检测场景中 80 种常见物体（基于 YOLOv4 模型）。配合 `draw_bbox` 可直接绘制结果。\n\n```python\nimport cvlib as cv\nfrom cvlib.object_detection import draw_bbox\n\n# img 为输入图像\nbbox, label, conf = cv.detect_common_objects(img)\n\n# 绘制边界框\noutput_image = draw_bbox(img, bbox, label, conf)\n\n# 启用 GPU 加速\n# bbox, label, conf = cv.detect_common_objects(img, enable_gpu=True)\n\n# 若无 GPU 且需实时检测，建议使用轻量级模型 (速度更快，精度略低)\n# bbox, label, conf = cv.detect_common_objects(img, confidence=0.25, model='yolov4-tiny')\n```","某初创零售团队需要快速开发一套店内客流分析系统，用于统计顾客性别比例并识别货架前的热门商品，以优化陈列策略。\n\n### 没有 cvlib 时\n- 开发人员需手动配置复杂的 OpenCV DNN 模块，并单独寻找、下载和加载预训练的 Caffe 人脸检测模型，环境搭建耗时数天。\n- 实现性别识别功能时，必须自行复现论文算法或寻找第三方 AlexNet 模型代码，数据预处理与模型推理逻辑耦合严重，调试困难。\n- 集成 YOLOv4 进行商品检测时，需编写大量样板代码处理 COCO 数据集标签映射及边界框绘制，代码冗余度高且难以维护。\n- 若要启用 GPU 加速，团队需深入理解 CUDA 配置及 TensorFlow-GPU 的底层调用方式，技术门槛极高，阻碍了原型快速验证。\n\n### 使用 cvlib 后\n- 仅需调用 `cv.detect_face()` 一行代码即可自动完成人脸定位，底层模型加载与预处理完全封装，项目启动时间从数天缩短至几小时。\n- 直接传入裁剪后的人脸图像给 `cv.detect_gender()`，即可立即获得“男性\u002F女性”标签及置信度，无需关心底层神经网络架构细节。\n- 通过 `cv.detect_common_objects()` 单函数调用即可识别 80 种常见商品，配合内置的 `draw_bbox` 工具，瞬间生成带标注的分析结果图。\n- 在函数中增加 `enable_gpu=True` 参数即可无缝切换至 GPU 推理模式，轻松应对实时视频流分析，大幅降低高性能计算的开发难度。\n\ncvlib 通过将复杂的计算机视觉底层逻辑封装为极简的高级 API，让开发者能专注于业务逻辑而非模型部署，极大提升了 AI 原型的落地效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Farunponnusamy_cvlib_aa9a7ffd.jpg","arunponnusamy","Arun Ponnusamy","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Farunponnusamy_ac36dc0a.jpg","\r\n    Computer Vision Research Engineer.\r\n","Vision Geek Labs","Tamil Nadu, India",null,"arunponnusamy_","www.visiongeek.io","https:\u002F\u002Fgithub.com\u002Farunponnusamy",[83],{"name":84,"color":85,"percentage":86},"Python","#3572A5",100,668,125,"2026-03-06T12:45:46","MIT","未说明","非必需。若需启用 GPU 加速，需要 NVIDIA 显卡，并正确安装 NVIDIA 驱动、CUDA Toolkit 和 CuDNN。具体版本未说明。",{"notes":94,"python":95,"dependencies":96},"1. 核心依赖为 OpenCV 和 TensorFlow，可通过 pip 直接安装。2. 默认使用 CPU 版本的 TensorFlow，若需 GPU 加速需手动安装 tensorflow-gpu 并配置 CUDA 环境。3. 物体检测默认使用 YOLOv4 模型，在 CPU 上运行较重，若无 GPU 建议使用 'yolov4-tiny' 模型以获得更快速度。4. 支持从源码编译 OpenCV 以启用 CUDA 优化。5. 性别检测基于 Adience 数据集训练的类 AlexNet 模型。","3.x (官方注明未正式测试 Python 2.x 兼容性)",[97,98,99],"opencv-python","tensorflow","tensorflow-gpu (可选)",[14,15],[102,103,104,105,106],"computer-vision","image-processing","machine-learning","deep-learning","python","2026-03-27T02:49:30.150509","2026-04-20T19:21:25.755438",[110,115,120,125,130,135,140,145],{"id":111,"question_zh":112,"answer_zh":113,"source_url":114},45429,"之前的版本报错找不到模块，升级后还是不行怎么办？","如果是旧版本的 Bug，请强制升级到最新版本：\n`pip install --upgrade cvlib`\n维护者通常会在最新发行版中修复模块缺失或导入错误的问题。如果升级后问题依旧，请尝试完全卸载后重新安装：`pip uninstall cvlib` 然后 `pip install cvlib`。","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F1",{"id":116,"question_zh":117,"answer_zh":118,"source_url":119},45422,"运行摄像头检测时出现 'Could not read frame' 或 videoio(MSMF) 错误怎么办？","这是 Windows 上常见的摄像头后端问题。尝试在创建 VideoCapture 对象时指定 DirectShow 后端：\n`self.cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)`\n如果仍然缓慢或不稳定，请确保没有其他程序占用摄像头，并检查摄像头驱动是否正常。","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F2",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},45423,"导入 cvlib 后报错 'module 'cvlib' has no attribute 'detect_face'' 是什么原因？","这通常是由于环境冲突（特别是使用 Anaconda 时）或版本不匹配导致的。建议创建一个干净的虚拟环境来解决：\n1. 创建新环境：`python -m venv cvliben`\n2. 激活环境：`cvliben\\Scripts\\activate.bat` (Windows) 或 `source cvliben\u002Fbin\u002Factivate` (Linux\u002FMac)\n3. 安装依赖：`pip install -r requirements.txt`\n避免在复杂的 Anaconda 基础环境中直接安装，使用标准 pip 虚拟环境通常能解决此属性错误。","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F5",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},45424,"调用 detect_common_objects 时出现 \"'str' object has no attribute 'shape'\" 错误如何解决？","该错误表明函数接收到了文件路径字符串而不是图像数组。cvlib 的某些版本或用法可能需要先读取图像。请确保传入的是通过 `cv2.imread()` 读取的图像对象，或者检查文件路径是否正确且文件存在。\n如果直接传路径失败，请改为：\n`image = cv2.imread('object_detection_input.jpg')`\n`bbox, label, conf = cv.detect_common_objects(image)`\n另外，尝试将图片转换为 PNG 格式有时也能解决兼容性问题。","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F52",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},45425,"在 Python 3.7+ 或 Windows 上安装 cvlib 时遇到 TensorFlow 版本不满足要求怎么办？","这是由于 TensorFlow 对 Python 版本和操作系统的严格限制。解决方案有：\n1. 降级 Python 版本：安装 Python 3.6.x 并配合 TensorFlow 1.13.1 通常能正常工作。\n2. 安装开发版：在等待 PyPI 更新期间，可以直接从 GitHub 安装最新版以获取修复：`pip install git+https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib.git`\n3. 确保使用的是与您的 Python 版本匹配的 TensorFlow wheel 包。","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F22",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},45426,"如何使用 Tiny YOLO 模型进行更快的实时物体检测？","cvlib 已集成 Tiny YOLO 支持。在调用 `detect_common_objects` 函数时，将 model 参数指定为 `'yolov3-tiny'` 即可：\n`bbox, label, conf = cv.detect_common_objects(image, model='yolov3-tiny')`\n注意：Tiny YOLO 速度显著快于原版 YOLOv3，但检测准确率和召回率会有所降低。您可以参考官方示例代码：examples\u002Fobject_detection_webcam_yolov3_tiny.py","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F3",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},45427,"导入 cvlib 时出现 'ImportError: libcudnn.so.7: cannot open shared object file' 错误怎么处理？","这是典型的 CUDA\u002FcuDNN 配置问题，意味着 TensorFlow 无法找到 GPU 加速库。\n解决方法：\n1. 如果您不需要 GPU 加速，请卸载 tensorflow 并安装 CPU 版本：`pip uninstall tensorflow` 然后 `pip install tensorflow-cpu`。\n2. 如果您需要 GPU，请确保已正确安装 NVIDIA 驱动、CUDA Toolkit 和 cuDNN，并且版本与安装的 TensorFlow 版本严格对应（例如 TF 1.x 通常需要 cuDNN 7）。\n3. 检查环境变量 LD_LIBRARY_PATH 是否包含了 cuDNN 库的路径。","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F18",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},45428,"遇到 ModuleNotFoundError 缺少 opencv-python 或 tensorflow 模块怎么办？","这表明核心依赖未安装。请手动运行以下命令安装缺失的包：\n`pip install opencv-python tensorflow`\n如果在 Anaconda 环境中仍报错，可以尝试补充安装 scipy：`pip install scipy`。确保在安装 cvlib 之前先安装好这些底层依赖。","https:\u002F\u002Fgithub.com\u002Farunponnusamy\u002Fcvlib\u002Fissues\u002F34",[151,156,161,166,171,175,180,185],{"id":152,"version":153,"summary_zh":154,"released_at":155},360344,"v0.2.6","- 增加了对 YOLOv4 和 YOLOv4-tiny 目标检测模型的支持。\n\n贡献者：\n- [William Dove](https:\u002F\u002Fgithub.com\u002FwDove1)\n- [Arun Ponnusamy](https:\u002F\u002Fgithub.com\u002Farunponnusamy)","2021-01-11T06:08:51",{"id":157,"version":158,"summary_zh":159,"released_at":160},360345,"v0.2.5","- 添加了 YOLO 类，用于在自定义训练的权重上运行推理。\n- 移除了 detect_face 方法中的冗余缩放操作。","2020-06-07T08:50:38",{"id":162,"version":163,"summary_zh":164,"released_at":165},360346,"v0.2.4","更新日志：\n- 为 detect_face、detect_gender 和 detect_common_objects 方法添加了 GPU 支持（使用从源代码编译的 OpenCV DNN 模块）\n- 从 Keras 切换到 tf.keras","2020-03-04T09:02:42",{"id":167,"version":168,"summary_zh":169,"released_at":170},360347,"v0.2.3","- 更新了性别检测模型。","2019-12-27T09:07:43",{"id":172,"version":173,"summary_zh":78,"released_at":174},360348,"v0.2.2","2019-10-15T06:22:22",{"id":176,"version":177,"summary_zh":178,"released_at":179},360349,"v0.2.0","* 添加了 `tiny YOLO`，用于实时目标检测。\n* 添加了使用 `tiny YOLO` 从网络摄像头或视频流中进行目标检测的示例。","2019-03-31T06:58:20",{"id":181,"version":182,"summary_zh":183,"released_at":184},360350,"v0.1.6","* 包括目标检测实现","2018-09-23T06:27:19",{"id":186,"version":187,"summary_zh":78,"released_at":188},360351,"v0.1.5","2018-09-18T15:29:55"]