[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-chenyuntc--simple-faster-rcnn-pytorch":3,"tool-chenyuntc--simple-faster-rcnn-pytorch":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 真正成长为懂上",145895,2,"2026-04-08T11:32:59",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108111,"2026-04-08T11:23:26",[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},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":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"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",[35,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":76,"owner_twitter":76,"owner_website":78,"owner_url":79,"languages":80,"stars":89,"forks":90,"last_commit_at":91,"license":92,"difficulty_score":10,"env_os":93,"env_gpu":94,"env_ram":95,"env_deps":96,"category_tags":111,"github_topics":112,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":119,"updated_at":120,"faqs":121,"releases":122},5645,"chenyuntc\u002Fsimple-faster-rcnn-pytorch","simple-faster-rcnn-pytorch","A simplified implemention of Faster R-CNN that replicate performance from origin paper","simple-faster-rcnn-pytorch 是一个基于 PyTorch 的简化版 Faster R-CNN 目标检测实现，旨在复现原论文性能的同时，让代码更易懂、易上手。它解决了经典目标检测模型代码复杂、依赖繁琐、难以学习和修改的问题，将原本需要编译自定义算子的流程简化为纯 Python 运行，仅需约 2000 行清晰注释的代码即可完成训练与推理。\n\n该项目特别适合希望深入理解 Faster R-CNN 内部机制的研究人员、学生或开发者，也适合作为教学示例或二次开发起点。其技术亮点包括：完全兼容 torchvision 内置操作（如 RoIPool 和 NMS），无需额外编译；在 TITAN XP 上可实现每秒 14 帧的推理速度和 6 帧的训练速度；使用 VGG16 骨干网络时显存占用仅约 3GB；在 Pascal VOC 数据集上 mAP 最高可达 0.712，略优于原论文结果。此外，项目提供详细的安装指南、预训练模型和可视化演示，帮助用户快速验证效果并开展实验。整体设计遵循“简单优于复杂”的理念，是学习现代目标检测架构的理想入门工具。","# A Simple and Fast Implementation of Faster R-CNN\n\n## 1. Introduction\n\n**[Update:]** I've further simplified the code to pytorch 1.5, torchvision 0.6, and replace the customized ops roipool and nms with the one from torchvision.  if you want the old version code, please checkout branch [v1.0](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Ftree\u002Fv1.0)\n\n\n\nThis project is a **Simplified** Faster R-CNN implementation based on [chainercv](https:\u002F\u002Fgithub.com\u002Fchainer\u002Fchainercv) and other [projects](#acknowledgement) . I hope it can serve as an start code for those who want to know the detail of Faster R-CNN.  It aims to:\n\n- Simplify the code (*Simple is better than complex*)\n- Make the code more straightforward (*Flat is better than nested*)\n- Match the performance reported in [origin paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.01497) (*Speed Counts and mAP Matters*)\n\nAnd it has the following features:\n- It can be run as pure Python code, no more build affair. \n- It's a minimal implemention in around 2000 lines valid code with a lot of comment and instruction.(thanks to chainercv's excellent documentation)\n- It achieves higher mAP than the origin implementation (0.712 VS 0.699)\n- It achieve speed compariable with other implementation (6fps and 14fps for train and test in TITAN XP)\n- It's memory-efficient (about 3GB for vgg16)\n\n\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchenyuntc_simple-faster-rcnn-pytorch_readme_44a7498f96e8.jpg)\n\n\n\n## 2. Performance\n\n### 2.1 mAP\n\nVGG16 train on `trainval` and test on `test` split. \n\n**Note**: the training shows great randomness, you may need a bit of luck and more epoches of training to reach the highest mAP. However, it should be easy to surpass the lower bound. \n\n|              Implementation              |     mAP     |\n| :--------------------------------------: | :---------: |\n| [origin paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.01497) |    0.699    |\n|    train with caffe pretrained model     | 0.700-0.712 |\n| train with torchvision pretrained model  | 0.685-0.701 |\n| model converted from [chainercv](https:\u002F\u002Fgithub.com\u002Fchainer\u002Fchainercv\u002Ftree\u002Fmaster\u002Fexamples\u002Ffaster_rcnn) (reported 0.706) |   0.7053    |\n\n### 2.2 Speed\n\n|              Implementation              |   GPU    | Inference | Trainining |\n| :--------------------------------------: | :------: | :-------: | :--------: |\n| [origin paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.01497) |   K40    |   5 fps   |     NA     |\n|                 This[1]                  | TITAN Xp | 14-15 fps |   6 fps    |\n| [pytorch-faster-rcnn](https:\u002F\u002Fgithub.com\u002Fruotianluo\u002Fpytorch-faster-rcnn) | TITAN Xp | 15-17fps  |    6fps    |\n\n[1]: make sure you install cupy correctly and only one program run on the GPU. The training speed is sensitive to your gpu status. see [troubleshooting](troubleshooting) for more info. Morever it's slow in the start of the program -- it need time to warm up.\n\nIt could be faster by removing visualization, logging, averaging loss etc.\n## 3. Install dependencies\n\n\nHere is an example of create environ **from scratch** with `anaconda`\n\n```sh\n# create conda env\nconda create --name simp python=3.7\nconda activate simp\n# install pytorch\nconda install pytorch torchvision cudatoolkit=10.2 -c pytorch\n\n# install other dependancy\npip install visdom scikit-image tqdm fire ipdb pprint matplotlib torchnet\n\n# start visdom\nnohup python -m visdom.server &\n\n```\n\nIf you don't use anaconda, then:\n\n- install PyTorch with GPU (code are GPU-only), refer to [official website](http:\u002F\u002Fpytorch.org)\n\n- install other dependencies:  `pip install visdom scikit-image tqdm fire ipdb pprint matplotlib torchnet`\n\n- start visdom for visualization\n\n```Bash\nnohup python -m visdom.server &\n```\n\n\n\n## 4. Demo\n\nDownload pretrained model from [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fopen?id=1cQ27LIn-Rig4-Uayzy_gH5-cW-NRGVzY) or [Baidu Netdisk( passwd: scxn)](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1o87RuXW)\n\n\nSee [demo.ipynb](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Fblob\u002Fmaster\u002Fdemo.ipynb) for more detail.\n\n## 5. Train\n\n### 5.1 Prepare data\n\n#### Pascal VOC2007\n\n1. Download the training, validation, test data and VOCdevkit\n\n   ```Bash\n   wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCtrainval_06-Nov-2007.tar\n   wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCtest_06-Nov-2007.tar\n   wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCdevkit_08-Jun-2007.tar\n   ```\n\n2. Extract all of these tars into one directory named `VOCdevkit`\n\n   ```Bash\n   tar xvf VOCtrainval_06-Nov-2007.tar\n   tar xvf VOCtest_06-Nov-2007.tar\n   tar xvf VOCdevkit_08-Jun-2007.tar\n   ```\n\n3. It should have this basic structure\n\n   ```Bash\n   $VOCdevkit\u002F                           # development kit\n   $VOCdevkit\u002FVOCcode\u002F                   # VOC utility code\n   $VOCdevkit\u002FVOC2007                    # image sets, annotations, etc.\n   # ... and several other directories ...\n   ```\n\n4. modify `voc_data_dir` cfg item in `utils\u002Fconfig.py`, or pass it to program using argument like `--voc-data-dir=\u002Fpath\u002Fto\u002FVOCdevkit\u002FVOC2007\u002F` .\n\n\n### 5.2 [Optional]Prepare caffe-pretrained vgg16\n\nIf you want to use caffe-pretrain model as initial weight, you can run below to get vgg16 weights converted from caffe, which is the same as the origin paper use.\n\n````Bash\npython misc\u002Fconvert_caffe_pretrain.py\n````\n\nThis scripts would download pretrained model and converted it to the format compatible with torchvision. If you are in China and can not download the pretrain model, you may refer to [this issue](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Fissues\u002F63)\n\nThen you could specify where caffe-pretraind model `vgg16_caffe.pth` stored in `utils\u002Fconfig.py` by setting `caffe_pretrain_path`. The default path is ok.\n\nIf you want to use pretrained model from torchvision, you may skip this step.\n\n**NOTE**, caffe pretrained model has shown slight better performance.\n\n**NOTE**: caffe model require images in BGR 0-255, while torchvision model requires images in RGB and 0-1. See `data\u002Fdataset.py`for more detail. \n\n### 5.3 begin training\n\n\n```bash\npython train.py train --env='fasterrcnn' --plot-every=100\n```\n\nyou may refer to `utils\u002Fconfig.py` for more argument.\n\nSome Key arguments:\n\n- `--caffe-pretrain=False`: use pretrain model from caffe or torchvision (Default: torchvison)\n- `--plot-every=n`: visualize prediction, loss etc every `n` batches.\n- `--env`: visdom env for visualization\n- `--voc_data_dir`: where the VOC data stored\n- `--use-drop`: use dropout in RoI head, default False\n- `--use-Adam`: use Adam instead of SGD, default SGD. (You need set a very low `lr` for Adam)\n- `--load-path`: pretrained model path, default `None`, if it's specified, it would be loaded.\n\nyou may open browser, visit `http:\u002F\u002F\u003Cip>:8097` and see the visualization of training procedure as below:\n\n![visdom](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchenyuntc_simple-faster-rcnn-pytorch_readme_0bb757ab4424.png)\n\n## Troubleshooting\n\n- dataloader: `received 0 items of ancdata` \n\n  see [discussion](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fpytorch\u002Fissues\u002F973#issuecomment-346405667), It's alreadly fixed in [train.py](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Fblob\u002Fmaster\u002Ftrain.py#L17-L22). So I think you are free from this problem.\n  \n- Windows support\n\n  I don't have windows machine with GPU to debug and test it. It's welcome if anyone could make a pull request and test it.\n\n\n\n## Acknowledgement\nThis work builds on many excellent works, which include:\n\n- [Yusuke Niitani's ChainerCV](https:\u002F\u002Fgithub.com\u002Fchainer\u002Fchainercv) (mainly)\n- [Ruotian Luo's pytorch-faster-rcnn](https:\u002F\u002Fgithub.com\u002Fruotianluo\u002Fpytorch-faster-rcnn) which based on [Xinlei Chen's tf-faster-rcnn](https:\u002F\u002Fgithub.com\u002Fendernewton\u002Ftf-faster-rcnn)\n- [faster-rcnn.pytorch by Jianwei Yang and Jiasen Lu](https:\u002F\u002Fgithub.com\u002Fjwyang\u002Ffaster-rcnn.pytorch).It mainly refer to [longcw's faster_rcnn_pytorch](https:\u002F\u002Fgithub.com\u002Flongcw\u002Ffaster_rcnn_pytorch)\n- All the above Repositories have referred to [py-faster-rcnn by Ross Girshick and Sean Bell](https:\u002F\u002Fgithub.com\u002Frbgirshick\u002Fpy-faster-rcnn)  either directly or indirectly. \n\n## ^_^\nLicensed under MIT, see the LICENSE for more detail.\n\nContribution Welcome.\n\nIf you encounter any problem, feel free to open an issue, but too busy lately.\n\nCorrect me if anything is wrong or unclear.\n\nmodel structure\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchenyuntc_simple-faster-rcnn-pytorch_readme_b8cde4f166cf.png)\n","# Faster R-CNN 的一个简单快速实现\n\n## 1. 引言\n\n**[更新:]** 我已将代码进一步简化至 PyTorch 1.5 和 torchvision 0.6，并用 torchvision 自带的 roipool 和 nms 替代了自定义操作。如果您需要旧版本的代码，请检出分支 [v1.0](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Ftree\u002Fv1.0)。\n\n\n\n本项目是基于 [chainercv](https:\u002F\u002Fgithub.com\u002Fchainer\u002Fchainercv) 及其他 [项目](#acknowledgement) 的 **简化版** Faster R-CNN 实现。我希望它能为想要深入了解 Faster R-CNN 的开发者提供一个入门级代码框架。该项目的目标是：\n\n- 简化代码（*简单胜于复杂*）\n- 使代码更加直观易懂（*扁平胜于嵌套*）\n- 达到与 [原始论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.01497) 中报告的性能相当（*速度很重要，mAP 更重要*）\n\n此外，该项目还具有以下特点：\n- 可以作为纯 Python 代码运行，无需额外编译。\n- 是一个精简的实现，约 2000 行有效代码，附有大量注释和说明。（感谢 chainercv 的优秀文档）\n- 实现的 mAP 高于原始实现（0.712 对比 0.699）。\n- 训练和测试速度与其他实现相当（在 TITAN XP 上，训练速度为 6 fps，测试速度为 14 fps）。\n- 内存占用较低（使用 VGG16 时约为 3GB）。\n\n\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchenyuntc_simple-faster-rcnn-pytorch_readme_44a7498f96e8.jpg)\n\n\n\n## 2. 性能\n\n### 2.1 mAP\n\n使用 VGG16 在 `trainval` 数据集上训练，并在 `test` 数据集上进行测试。\n\n**注意**：训练过程具有较大的随机性，可能需要一些运气以及更多的训练轮次才能达到最高的 mAP。不过，超越下限应该相对容易。\n\n|              实现              |     mAP     |\n| :----------------------------: | :---------: |\n| [原始论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.01497) |    0.699    |\n| 使用 Caffe 预训练模型训练     | 0.700-0.712 |\n| 使用 torchvision 预训练模型训练  | 0.685-0.701 |\n| 由 [chainercv](https:\u002F\u002Fgithub.com\u002Fchainer\u002Fchainercv\u002Ftree\u002Fmaster\u002Fexamples\u002Ffaster_rcnn) 转换而来的模型（报告 mAP 为 0.706） |   0.7053    |\n\n### 2.2 速度\n\n|              实现              |   GPU    | 推理速度 | 训练速度 |\n| :----------------------------: | :------: | :-------: | :--------: |\n| [原始论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.01497) |   K40    |   5 fps   |     无数据     |\n|                 本实现[1]                  | TITAN Xp | 14-15 fps |   6 fps    |\n| [pytorch-faster-rcnn](https:\u002F\u002Fgithub.com\u002Fruotianluo\u002Fpytorch-faster-rcnn) | TITAN Xp | 15-17fps  |    6fps    |\n\n[1]: 请确保正确安装 cupy，并且 GPU 上只运行一个程序。训练速度对 GPU 的状态非常敏感。更多信息请参阅 [故障排除](troubleshooting)。此外，在程序刚开始时速度较慢——需要一定时间来预热。\n\n如果去掉可视化、日志记录、损失平均等步骤，速度还可以更快。\n\n## 3. 安装依赖\n\n\n以下是使用 `anaconda` 从 **零开始** 创建环境的示例：\n\n```sh\n# 创建 conda 环境\nconda create --name simp python=3.7\nconda activate simp\n# 安装 PyTorch\nconda install pytorch torchvision cudatoolkit=10.2 -c pytorch\n\n# 安装其他依赖\npip install visdom scikit-image tqdm fire ipdb pprint matplotlib torchnet\n\n# 启动 visdom\nnohup python -m visdom.server &\n```\n\n如果您不使用 anaconda，则：\n\n- 安装支持 GPU 的 PyTorch（代码仅支持 GPU），请参考 [官方网站](http:\u002F\u002Fpytorch.org)\n\n- 安装其他依赖：`pip install visdom scikit-image tqdm fire ipdb pprint matplotlib torchnet`\n\n- 启动 visdom 进行可视化\n\n```Bash\nnohup python -m visdom.server &\n```\n\n\n\n## 4. 演示\n\n从 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fopen?id=1cQ27LIn-Rig4-Uayzy_gH5-cW-NRGVzY) 或 [百度网盘（密码：scxn）](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1o87RuXW) 下载预训练模型。\n\n\n更多详细信息请参阅 [demo.ipynb](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Fblob\u002Fmaster\u002Fdemo.ipynb)。\n\n## 5. 训练\n\n### 5.1 准备数据\n\n#### Pascal VOC2007\n\n1. 下载训练集、验证集、测试集以及 VOCdevkit 数据包\n\n   ```Bash\n   wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCtrainval_06-Nov-2007.tar\n   wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCtest_06-Nov-2007.tar\n   wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCdevkit_08-Jun-2007.tar\n   ```\n\n2. 将所有这些 tar 文件解压到一个名为 `VOCdevkit` 的目录中\n\n   ```Bash\n   tar xvf VOCtrainval_06-Nov-2007.tar\n   tar xvf VOCtest_06-Nov-2007.tar\n   tar xvf VOCdevkit_08-Jun-2007.tar\n   ```\n\n3. 目录结构应如下所示：\n\n   ```Bash\n   $VOCdevkit\u002F                           # 开发工具包\n   $VOCdevkit\u002FVOCcode\u002F                   # VOC 工具代码\n   $VOCdevkit\u002FVOC2007                    # 图像集、标注文件等\n   # ... 其他几个目录 ...\n   ```\n\n4. 修改 `utils\u002Fconfig.py` 中的 `voc_data_dir` 配置项，或者通过命令行参数传递，例如 `--voc-data-dir=\u002Fpath\u002Fto\u002FVOCdevkit\u002FVOC2007\u002F` .\n\n\n### 5.2 [可选] 准备 Caffe 预训练的 VGG16\n\n如果您希望使用 Caffe 预训练模型作为初始权重，可以运行以下命令获取从 Caffe 转换而来的 VGG16 权重，这与原始论文中使用的权重相同。\n\n````Bash\npython misc\u002Fconvert_caffe_pretrain.py\n````\n\n该脚本会下载预训练模型并将其转换为与 torchvision 兼容的格式。如果您在中国且无法下载预训练模型，可以参考 [此问题](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Fissues\u002F63)。\n\n然后您可以在 `utils\u002Fconfig.py` 中通过设置 `caffe_pretrain_path` 指定 Caffe 预训练模型 `vgg16_caffe.pth` 的存储路径。默认路径即可。\n\n如果您想使用 torchvision 提供的预训练模型，则可以跳过此步骤。\n\n**注意**，Caffe 预训练模型的表现略好一些。\n\n**注意**：Caffe 模型要求输入图像为 BGR 格式且像素值范围为 0–255，而 torchvision 模型则要求 RGB 格式且像素值范围为 0–1。更多细节请参阅 `data\u002Fdataset.py`。\n\n### 5.3 开始训练\n\n\n```bash\npython train.py train --env='fasterrcnn' --plot-every=100\n```\n\n您可以参考 `utils\u002Fconfig.py` 了解更多参数。\n\n一些关键参数：\n\n- `--caffe-pretrain=False`：使用 Caffe 或 torchvision 的预训练模型（默认：torchvision）\n- `--plot-every=n`：每 `n` 个批次可视化预测结果、损失等。\n- `--env`：用于可视化的 visdom 环境\n- `--voc_data_dir`：VOC 数据的存储路径\n- `--use-drop`：在 RoI 头部使用 Dropout，默认为 False\n- `--use-Adam`：使用 Adam 优化器代替 SGD，默认为 SGD。（使用 Adam 时需设置非常低的学习率）\n- `--load-path`：预训练模型的路径，默认为 `None`，若指定则会加载该模型。\n\n您可以通过浏览器访问 `http:\u002F\u002F\u003Cip>:8097`，查看如下所示的训练过程可视化效果：\n\n![visdom](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchenyuntc_simple-faster-rcnn-pytorch_readme_0bb757ab4424.png)\n\n## 故障排除\n\n- dataloader: `received 0 items of ancdata` \n\n  参见[讨论](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fpytorch\u002Fissues\u002F973#issuecomment-346405667)，这个问题已经在[train.py](https:\u002F\u002Fgithub.com\u002Fchenyuntc\u002Fsimple-faster-rcnn-pytorch\u002Fblob\u002Fmaster\u002Ftrain.py#L17-L22)中修复。所以我认为你已经可以避免这个问题了。\n  \n- Windows 支持\n\n  我没有配备 GPU 的 Windows 机器来进行调试和测试。如果有人能够提交 Pull Request 并进行测试，将不胜感激。\n\n\n\n## 致谢\n本工作基于许多优秀的工作，其中包括：\n\n- 主要是 [Yusuke Niitani 的 ChainerCV](https:\u002F\u002Fgithub.com\u002Fchainer\u002Fchainercv)\n- [Ruotian Luo 的 pytorch-faster-rcnn](https:\u002F\u002Fgithub.com\u002Fruotianluo\u002Fpytorch-faster-rcnn)，该实现基于 [Xinlei Chen 的 tf-faster-rcnn](https:\u002F\u002Fgithub.com\u002Fendernewton\u002Ftf-faster-rcnn)\n- [Jianwei Yang 和 Jiasen Lu 的 faster-rcnn.pytorch](https:\u002F\u002Fgithub.com\u002Fjwyang\u002Ffaster-rcnn.pytorch)。它主要参考了 [longcw 的 faster_rcnn_pytorch](https:\u002F\u002Fgithub.com\u002Flongcw\u002Ffaster_rcnn_pytorch)\n- 上述所有仓库都直接或间接地参考了 [Ross Girshick 和 Sean Bell 的 py-faster-rcnn](https:\u002F\u002Fgithub.com\u002Frbgirshick\u002Fpy-faster-rcnn)。\n\n## ^_^\n采用 MIT 许可证，详情请参阅 LICENSE 文件。\n\n欢迎贡献。\n\n如果您遇到任何问题，请随时提交 issue，不过我最近比较忙。\n\n如有任何错误或不清楚之处，请指正。\n\n模型结构\n![img](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchenyuntc_simple-faster-rcnn-pytorch_readme_b8cde4f166cf.png)","# simple-faster-rcnn-pytorch 快速上手指南\n\n## 1. 环境准备\n\n本项目基于 PyTorch 实现，仅支持 GPU 运行。推荐配置如下：\n\n*   **操作系统**: Linux (Windows 支持未经充分测试)\n*   **Python**: 3.7+\n*   **深度学习框架**: PyTorch 1.5+, torchvision 0.6+\n*   **CUDA**: 建议 CUDA 10.2 (需与 PyTorch 版本匹配)\n*   **其他依赖**: `visdom`, `scikit-image`, `tqdm`, `fire`, `ipdb`, `pprint`, `matplotlib`, `torchnet`\n\n## 2. 安装步骤\n\n### 2.1 创建虚拟环境并安装依赖\n\n推荐使用 Anaconda 创建独立环境。以下命令将自动从官方源安装 PyTorch 及相关组件：\n\n```bash\n# 创建名为 simp 的 conda 环境，指定 Python 3.7\nconda create --name simp python=3.7\nconda activate simp\n\n# 安装 PyTorch, torchvision 和 cudatoolkit (根据实际显卡驱动调整 cudatoolkit 版本)\nconda install pytorch torchvision cudatoolkit=10.2 -c pytorch\n\n# 安装其他 Python 依赖\npip install visdom scikit-image tqdm fire ipdb pprint matplotlib torchnet\n```\n\n> **提示**：若在国内下载速度较慢，可尝试使用清华或中科大镜像源安装 pip 包：\n> `pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple visdom scikit-image tqdm fire ipdb pprint matplotlib torchnet`\n\n### 2.2 启动可视化服务\n\n本项目使用 `visdom` 进行训练过程可视化，需在后台启动服务：\n\n```bash\nnohup python -m visdom.server &\n```\n\n## 3. 基本使用\n\n### 3.1 准备数据集 (Pascal VOC2007)\n\n1.  **下载数据**：\n    ```bash\n    wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCtrainval_06-Nov-2007.tar\n    wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCtest_06-Nov-2007.tar\n    wget http:\u002F\u002Fhost.robots.ox.ac.uk\u002Fpascal\u002FVOC\u002Fvoc2007\u002FVOCdevkit_08-Jun-2007.tar\n    ```\n\n2.  **解压文件**：\n    将所有压缩包解压到同一个目录（例如 `VOCdevkit`），确保目录结构包含 `VOC2007` 文件夹。\n\n3.  **配置路径**：\n    修改 `utils\u002Fconfig.py` 中的 `voc_data_dir` 参数，或在运行命令时通过 `--voc-data-dir` 指定路径。\n    示例：`\u002Fpath\u002Fto\u002FVOCdevkit\u002FVOC2007\u002F`\n\n### 3.2 (可选) 准备预训练权重\n\n为了复现原论文性能，建议使用 Caffe 预训练的 VGG16 权重。运行以下脚本自动下载并转换格式：\n\n```bash\npython misc\u002Fconvert_caffe_pretrain.py\n```\n\n*注：若无法下载，可跳过此步直接使用 torchvision 自带权重，但 mAP 可能略低。*\n\n### 3.3 开始训练\n\n执行以下命令启动训练，并通过 visdom 实时监控损失和预测结果：\n\n```bash\npython train.py train --env='fasterrcnn' --plot-every=100\n```\n\n**关键参数说明：**\n*   `--env`: 设置 visdom 的环境名称，用于区分不同的实验。\n*   `--plot-every`: 每训练多少个 batch 可视化一次结果。\n*   `--caffe-pretrain=False`: 设置为 `True` 以使用上述下载的 Caffe 权重，默认为 `False` (使用 torchvision 权重)。\n*   `--voc-data-dir`: 指定数据集路径（若在配置文件中未修改）。\n\n训练开始后，打开浏览器访问 `http:\u002F\u002F\u003C你的 IP>:8097` 即可查看可视化面板。\n\n### 3.4 快速演示 (Demo)\n\n若想直接测试预训练模型效果：\n\n1.  从 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fopen?id=1cQ27LIn-Rig4-Uayzy_gH5-cW-NRGVzY) 或 [百度网盘 (提取码: scxn)](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1o87RuXW) 下载预训练模型。\n2.  参考项目根目录下的 `demo.ipynb` 笔记本运行推理代码。","某高校计算机视觉实验室的研究团队正致力于复现 Faster R-CNN 经典算法，以便为新生提供清晰的教学代码并开展新的目标检测研究。\n\n### 没有 simple-faster-rcnn-pytorch 时\n- **环境配置极其繁琐**：传统实现往往依赖自定义编译的 CUDA 算子（如 roipool 和 nms），研究人员需花费数天解决版本兼容和编译报错问题，而非专注于算法逻辑。\n- **代码结构晦涩难懂**：原有开源项目代码嵌套深、逻辑复杂且缺乏注释，学生难以理解区域建议网络（RPN）与检测头的具体交互细节，学习曲线陡峭。\n- **性能复现困难**：许多简化版代码虽然易读，但无法达到原论文报告的精度（mAP），导致实验结果不可信，难以作为后续研究的可靠基线。\n\n### 使用 simple-faster-rcnn-pytorch 后\n- **开箱即用的纯 Python 体验**：该工具直接调用 torchvision 的标准算子，无需任何复杂的底层编译操作，配合 Anaconda 即可在几分钟内完成环境搭建并运行 demo。\n- **代码简洁且注释详尽**：核心代码仅约 2000 行，遵循“扁平优于嵌套”的原则，并配有大量教学式注释，让学生能快速掌握从数据加载到模型训练的全流程。\n- **精度与速度双重保障**：在 TITAN XP 显卡上不仅实现了高达 14fps 的推理速度，更复现了甚至超越原论文的 mAP（最高达 0.712），确保了学术研究结果的严谨性。\n\nsimple-faster-rcnn-pytorch 通过极致的代码简化和标准的工程实现，成功将高深的目标检测算法转化为易于教学和高性能科研的实用工具。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchenyuntc_simple-faster-rcnn-pytorch_0bb757ab.png","chenyuntc","Yun Chen","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fchenyuntc_b01522c8.png","import this",null,"Toronto, Canada","tmux.top","https:\u002F\u002Fgithub.com\u002Fchenyuntc",[81,85],{"name":82,"color":83,"percentage":84},"Jupyter Notebook","#DA5B0B",86.2,{"name":86,"color":87,"percentage":88},"Python","#3572A5",13.8,4034,1120,"2026-03-28T06:46:24","NOASSERTION","Linux, macOS","必需 NVIDIA GPU（代码仅支持 GPU），测试环境为 TITAN Xp，显存需求约 3GB (VGG16 模型)，需安装 CUDA 10.2","未说明",{"notes":97,"python":98,"dependencies":99},"Windows 支持未经过作者测试；训练速度受 GPU 状态影响较大，启动初期较慢（需要预热）；建议使用 Anaconda 创建虚拟环境；若使用 Caffe 预训练模型需注意图像格式为 BGR (0-255)，若使用 torchvision 预训练模型则为 RGB (0-1)。","3.7",[100,101,102,103,104,105,106,107,108,109,110],"pytorch>=1.5","torchvision>=0.6","cudatoolkit=10.2","visdom","scikit-image","tqdm","fire","ipdb","pprint","matplotlib","torchnet",[15,14],[113,114,115,116,103,117,118],"pytorch","object-detection","faster-rcnn","voc","pythonic","cupy","2026-03-27T02:49:30.150509","2026-04-09T05:25:17.667268",[],[]]