[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-KaimingHe--deep-residual-networks":3,"tool-KaimingHe--deep-residual-networks":64},[4,17,26,40,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,2,"2026-04-03T11:11:01",[13,14,15],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":23,"last_commit_at":32,"category_tags":33,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,34,35,36,15,37,38,13,39],"数据工具","视频","插件","其他","语言模型","音频",{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":10,"last_commit_at":46,"category_tags":47,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,38,37],{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":10,"last_commit_at":54,"category_tags":55,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74913,"2026-04-05T10:44:17",[38,14,13,37],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":23,"last_commit_at":62,"category_tags":63,"status":16},2471,"tesseract","tesseract-ocr\u002Ftesseract","Tesseract 是一款历史悠久且备受推崇的开源光学字符识别（OCR）引擎，最初由惠普实验室开发，后由 Google 维护，目前由全球社区共同贡献。它的核心功能是将图片中的文字转化为可编辑、可搜索的文本数据，有效解决了从扫描件、照片或 PDF 文档中提取文字信息的难题，是数字化归档和信息自动化的重要基础工具。\n\n在技术层面，Tesseract 展现了强大的适应能力。从版本 4 开始，它引入了基于长短期记忆网络（LSTM）的神经网络 OCR 引擎，显著提升了行识别的准确率；同时，为了兼顾旧有需求，它依然支持传统的字符模式识别引擎。Tesseract 原生支持 UTF-8 编码，开箱即用即可识别超过 100 种语言，并兼容 PNG、JPEG、TIFF 等多种常见图像格式。输出方面，它灵活支持纯文本、hOCR、PDF、TSV 等多种格式，方便后续数据处理。\n\nTesseract 主要面向开发者、研究人员以及需要构建文档处理流程的企业用户。由于它本身是一个命令行工具和库（libtesseract），不包含图形用户界面（GUI），因此最适合具备一定编程能力的技术人员集成到自动化脚本或应用程序中",73286,"2026-04-03T01:56:45",[13,14],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":79,"owner_url":80,"languages":79,"stars":81,"forks":82,"last_commit_at":83,"license":84,"difficulty_score":85,"env_os":86,"env_gpu":87,"env_ram":88,"env_deps":89,"category_tags":93,"github_topics":79,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":94,"updated_at":95,"faqs":96,"releases":136},963,"KaimingHe\u002Fdeep-residual-networks","deep-residual-networks","Deep Residual Learning for Image Recognition ","deep-residual-networks 是微软亚洲研究院何恺明等人开源的深度学习模型库，实现了经典的 ResNet（残差网络）架构，包括 ResNet-50、ResNet-101 和 ResNet-152 三种规格。\n\n这个工具主要解决了深层神经网络训练中的\"退化问题\"——当网络层数增加到一定程度后，准确率反而下降，并非过拟合导致，而是优化困难。ResNet 通过引入\"跳跃连接\"（Skip Connection）让网络学习残差映射，使得训练上百层甚至上千层的网络成为可能，大幅提升了图像识别精度。\n\n这套模型特别适合计算机视觉领域的研究人员和开发者使用。它在 ImageNet 2015 和 COCO 2015 竞赛中包揽了图像分类、目标检测、图像定位等多个项目的第一名，是深度学习领域的里程碑工作。模型基于 Caffe 框架，提供了预训练权重，可用于测试或迁移学习。\n\n技术亮点在于其简洁而有效的残差学习思想：不再让网络直接拟合期望的映射 H(x)，而是学习残差 F(x) = H(x) - x，再通过跳跃连接将输入 x 与残差相加。这种设计既保证了网络深度，又避免了梯度消失问题，成为后","deep-residual-networks 是微软亚洲研究院何恺明等人开源的深度学习模型库，实现了经典的 ResNet（残差网络）架构，包括 ResNet-50、ResNet-101 和 ResNet-152 三种规格。\n\n这个工具主要解决了深层神经网络训练中的\"退化问题\"——当网络层数增加到一定程度后，准确率反而下降，并非过拟合导致，而是优化困难。ResNet 通过引入\"跳跃连接\"（Skip Connection）让网络学习残差映射，使得训练上百层甚至上千层的网络成为可能，大幅提升了图像识别精度。\n\n这套模型特别适合计算机视觉领域的研究人员和开发者使用。它在 ImageNet 2015 和 COCO 2015 竞赛中包揽了图像分类、目标检测、图像定位等多个项目的第一名，是深度学习领域的里程碑工作。模型基于 Caffe 框架，提供了预训练权重，可用于测试或迁移学习。\n\n技术亮点在于其简洁而有效的残差学习思想：不再让网络直接拟合期望的映射 H(x)，而是学习残差 F(x) = H(x) - x，再通过跳跃连接将输入 x 与残差相加。这种设计既保证了网络深度，又避免了梯度消失问题，成为后续众多视觉模型的基础组件。","# Deep Residual Networks\n\nBy [Kaiming He](http:\u002F\u002Fkaiminghe.com), [Xiangyu Zhang](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=yuB-cfoAAAAJ&hl=en), [Shaoqing Ren](http:\u002F\u002Fhome.ustc.edu.cn\u002F~sqren\u002F), [Jian Sun](http:\u002F\u002Fresearch.microsoft.com\u002Fen-us\u002Fpeople\u002Fjiansun\u002F).\n\nMicrosoft Research Asia (MSRA).\n\n### Table of Contents\n0. [Introduction](#introduction)\n0. [Citation](#citation)\n0. [Disclaimer and known issues](#disclaimer-and-known-issues)\n0. [Models](#models)\n0. [Results](#results)\n0. [Third-party re-implementations](#third-party-re-implementations)\n\n### Introduction\n\nThis repository contains the original models (ResNet-50, ResNet-101, and ResNet-152) described in the paper \"Deep Residual Learning for Image Recognition\" (http:\u002F\u002Farxiv.org\u002Fabs\u002F1512.03385). These models are those used in [ILSVRC] (http:\u002F\u002Fimage-net.org\u002Fchallenges\u002FLSVRC\u002F2015\u002F) and [COCO](http:\u002F\u002Fmscoco.org\u002Fdataset\u002F#detections-challenge2015) 2015 competitions, which won the 1st places in: ImageNet classification, ImageNet detection, ImageNet localization, COCO detection, and COCO segmentation.\n\n**Note**\n\n0. Re-implementations with **training code** and models from Facebook AI Research (FAIR): [blog](http:\u002F\u002Ftorch.ch\u002Fblog\u002F2016\u002F02\u002F04\u002Fresnets.html), [code](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Ffb.resnet.torch)\n0. Code of improved **1K-layer ResNets** with 4.62% test error on CIFAR-10 in our new arXiv paper: https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fresnet-1k-layers\n\n### Citation\n\nIf you use these models in your research, please cite:\n\n\t@article{He2015,\n\t\tauthor = {Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun},\n\t\ttitle = {Deep Residual Learning for Image Recognition},\n\t\tjournal = {arXiv preprint arXiv:1512.03385},\n\t\tyear = {2015}\n\t}\n\n### Disclaimer and known issues\n\n0. These models are converted from our own implementation to a recent version of Caffe (2016\u002F2\u002F3, b590f1d). The numerical results using this code are as in the tables below.\n0. These models are for the usage of testing or fine-tuning.\n0. These models were **not** trained using this version of Caffe.\n0. If you want to train these models using this version of Caffe without modifications, please notice that:\n\t- GPU memory might be insufficient for extremely deep models.\n\t- Changes of mini-batch size should impact accuracy (we use a mini-batch of 256 images on 8 GPUs, that is, 32 images per GPU).\n\t- Implementation of data augmentation might be different (see our paper about the data augmentation we used).\n\t- We randomly shuffle data at the beginning of every epoch.\n\t- There might be some other untested issues.\n0. In our BN layers, the provided mean and variance are strictly computed using average (**not** moving average) on a sufficiently large training batch after the training procedure. The numerical results are very stable (variation of val error \u003C 0.1%). Using moving average might lead to different results. \n0. In the BN paper, the BN layer learns gamma\u002Fbeta. To implement BN in this version of Caffe, we use its provided \"batch_norm_layer\" (which has no gamma\u002Fbeta learned) followed by \"scale_layer\" (which learns gamma\u002Fbeta).\n0. We use Caffe's implementation of SGD with momentum: v := momentum\\*v + lr\\*g. **If you want to port these models to other libraries (e.g., Torch, CNTK), please pay careful attention to the possibly different implementation of SGD with momentum**: v := momentum\\*v + (1-momentum)\\*lr\\*g, which changes the effective learning rates.\n\n\t\n### Models\n\n0. Visualizations of network structures (tools from [ethereon](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002Fquickstart.html)):\n\t- [ResNet-50] (http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fdb945b393d40bfa26006)\n\t- [ResNet-101] (http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fb21e2aae116dc1ac7b50)\n\t- [ResNet-152] (http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fd38f3e6091952b45198b)\n\n0. Model files:\n\t- ~~MSR download: [link] (http:\u002F\u002Fresearch.microsoft.com\u002Fen-us\u002Fum\u002Fpeople\u002Fkahe\u002Fresnet\u002Fmodels.zip)~~\n\t- OneDrive download: [link](https:\u002F\u002Fonedrive.live.com\u002F?authkey=%21AAFW2-FVoxeVRck&id=4006CBB8476FF777%2117887&cid=4006CBB8476FF777)\n\n### Results\n0. Curves on ImageNet (solid lines: 1-crop val error; dashed lines: training error):\n\t![Training curves](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FKaimingHe_deep-residual-networks_readme_dc12b85c0f99.jpg)\n\n0. 1-crop validation error on ImageNet (center 224x224 crop from resized image with shorter side=256):\n\n\tmodel|top-1|top-5\n\t:---:|:---:|:---:\n\t[VGG-16](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F)|[28.5%](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F)|[9.9%](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F)\n\tResNet-50|24.7%|7.8%\n\tResNet-101|23.6%|7.1%\n\tResNet-152|23.0%|6.7%\n\t\n0. 10-crop validation error on ImageNet (averaging softmax scores of 10 224x224 crops from resized image with shorter side=256), the same as those in the paper:\n\n\tmodel|top-1|top-5\n\t:---:|:---:|:---:\n\tResNet-50|22.9%|6.7%\n\tResNet-101|21.8%|6.1%\n\tResNet-152|21.4%|5.7%\n\t\n### Third-party re-implementations\n\nDeep residual networks are very easy to implement and train. We recommend to see also the following third-party re-implementations and extensions:\n\n0. By Facebook AI Research (FAIR), with **training code in Torch and pre-trained ResNet-18\u002F34\u002F50\u002F101 models for ImageNet**: [blog](http:\u002F\u002Ftorch.ch\u002Fblog\u002F2016\u002F02\u002F04\u002Fresnets.html), [code](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Ffb.resnet.torch)\n0. Torch, CIFAR-10, with ResNet-20 to ResNet-110, training code, and curves: [code](https:\u002F\u002Fgithub.com\u002Fgcr\u002Ftorch-residual-networks)\n0. Lasagne, CIFAR-10, with ResNet-32 and ResNet-56 and training code: [code](https:\u002F\u002Fgithub.com\u002FLasagne\u002FRecipes\u002Ftree\u002Fmaster\u002Fpapers\u002Fdeep_residual_learning)\n0. Neon, CIFAR-10, with pre-trained ResNet-32 to ResNet-110 models, training code, and curves: [code](https:\u002F\u002Fgithub.com\u002Fapark263\u002Fcfmz)\n0. Torch, MNIST, 100 layers: [blog](https:\u002F\u002Fdeepmlblog.wordpress.com\u002F2016\u002F01\u002F05\u002Fresidual-networks-in-torch-mnist\u002F), [code](https:\u002F\u002Fgithub.com\u002Farunpatala\u002Fresidual.mnist)\n0. A winning entry in Kaggle's right whale recognition challenge: [blog](http:\u002F\u002Fblog.kaggle.com\u002F2016\u002F02\u002F04\u002Fnoaa-right-whale-recognition-winners-interview-2nd-place-felix-lau\u002F), [code](https:\u002F\u002Fgithub.com\u002Ffelixlaumon\u002Fkaggle-right-whale)\n0. Neon, Place2 (mini), 40 layers: [blog](http:\u002F\u002Fwww.nervanasys.com\u002Fusing-neon-for-scene-recognition-mini-places2\u002F), [code](https:\u002F\u002Fgithub.com\u002Fhunterlang\u002Fmpmz\u002F)\n0. MatConvNet, CIFAR-10, with ResNet-20 to ResNet-110, training code, and curves: [code](https:\u002F\u002Fgithub.com\u002Fsuhangpro\u002Fmatresnet)\n0. TensorFlow, CIFAR-10, with ResNet-32,110,182 training code and curves:\n[code](https:\u002F\u002Fgithub.com\u002Fppwwyyxx\u002Ftensorpack\u002Ftree\u002Fmaster\u002Fexamples\u002FResNet)\n0. MatConvNet, reproducing CIFAR-10 and ImageNet experiments (supporting official MatConvNet), training code and curves: [blog](https:\u002F\u002Fzhanghang1989.github.io\u002FResNet\u002F), [code](https:\u002F\u002Fgithub.com\u002Fzhanghang1989\u002FResNet-Matconvnet)\n0. Keras, ResNet-50: [code](https:\u002F\u002Fgithub.com\u002Fraghakot\u002Fkeras-resnet)\n\nConverters:\n\n0. MatConvNet: [url](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F#imagenet-ilsvrc-classification)\n0. TensorFlow: [url](https:\u002F\u002Fgithub.com\u002Fry\u002Ftensorflow-resnet)\n","# 深度残差网络（Deep Residual Networks）\n\n作者：[何恺明](http:\u002F\u002Fkaiminghe.com)、[张祥雨](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=yuB-cfoAAAAJ&hl=en)、[任少卿](http:\u002F\u002Fhome.ustc.edu.cn\u002F~sqren\u002F)、[孙剑](http:\u002F\u002Fresearch.microsoft.com\u002Fen-us\u002Fpeople\u002Fjiansun\u002F)。\n\n微软亚洲研究院（Microsoft Research Asia, MSRA）。\n\n### 目录\n0. [简介](#introduction)\n0. [引用](#citation)\n0. [免责声明与已知问题](#disclaimer-and-known-issues)\n0. [模型](#models)\n0. [实验结果](#results)\n0. [第三方复现](#third-party-re-implementations)\n\n### 简介\n\n本仓库包含论文《Deep Residual Learning for Image Recognition》（http:\u002F\u002Farxiv.org\u002Fabs\u002F1512.03385）中描述的原始模型（ResNet-50、ResNet-101 和 ResNet-152）。这些模型曾用于 [ILSVRC](http:\u002F\u002Fimage-net.org\u002Fchallenges\u002FLSVRC\u002F2015\u002F) 和 [COCO](http:\u002F\u002Fmscoco.org\u002Fdataset\u002F#detections-challenge2015) 2015 竞赛，并在以下任务中获得第一名：ImageNet 分类、ImageNet 检测、ImageNet 定位、COCO 检测和 COCO 分割。\n\n**注意**\n\n0. Facebook AI Research (FAIR) 提供的包含**训练代码**的复现版本：[博客](http:\u002F\u002Ftorch.ch\u002Fblog\u002F2016\u002F02\u002F04\u002Fresnets.html)、[代码](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Ffb.resnet.torch)\n0. 我们新论文中改进的 **1000 层 ResNet** 代码，在 CIFAR-10 上达到 4.62% 的测试误差：https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fresnet-1k-layers\n\n### 引用\n\n如果您在研究中使用了这些模型，请引用：\n\n\t@article{He2015,\n\t\tauthor = {Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun},\n\t\ttitle = {Deep Residual Learning for Image Recognition},\n\t\tjournal = {arXiv preprint arXiv:1512.03385},\n\t\tyear = {2015}\n\t}\n\n### 免责声明与已知问题\n\n0. 这些模型是从我们自己的实现转换到较新版本的 Caffe（2016\u002F2\u002F3, b590f1d）。使用此代码得到的数值结果如下表所示。\n0. 这些模型仅用于测试或微调（fine-tuning）。\n0. 这些模型**并非**使用此版本的 Caffe 训练得到。\n0. 如果您希望在不修改的情况下使用此版本 Caffe 训练这些模型，请注意：\n\t- 对于极深的模型，GPU 显存可能不足。\n\t- 小批量（mini-batch）大小的变化会影响准确率（我们在 8 个 GPU 上使用大小为 256 的小批量，即每个 GPU 32 张图像）。\n\t- 数据增强（data augmentation）的实现可能不同（请参阅我们论文中关于所使用数据增强的说明）。\n\t- 我们在每个 epoch 开始时随机打乱数据。\n\t- 可能存在其他未测试的问题。\n0. 在我们的 BN（Batch Normalization，批归一化）层中，提供的均值和方差是在训练结束后，使用足够大的训练批次通过平均计算（**而非**移动平均）严格得到的。数值结果非常稳定（验证误差变化 \u003C 0.1%）。使用移动平均可能会导致不同的结果。\n0. 在 BN 论文中，BN 层学习 gamma\u002Fbeta 参数。为了在此版本 Caffe 中实现 BN，我们使用其提供的 \"batch_norm_layer\"（不学习 gamma\u002Fbeta），后接 \"scale_layer\"（学习 gamma\u002Fbeta）。\n0. 我们使用 Caffe 的带动量 SGD（Stochastic Gradient Descent，随机梯度下降）实现：v := momentum\\*v + lr\\*g。**如果您想将这些模型移植到其他库（如 Torch、CNTK），请仔细注意带动量 SGD 可能存在的不同实现**：v := momentum\\*v + (1-momentum)\\*lr\\*g，这会改变有效的学习率。\n\n### 模型\n\n0. 网络结构可视化（工具来自 [ethereon](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002Fquickstart.html)）：\n\t- [ResNet-50](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fdb945b393d40bfa26006)\n\t- [ResNet-101](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fb21e2aae116dc1ac7b50)\n\t- [ResNet-152](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fd38f3e6091952b45198b)\n\n0. 模型文件：\n\t- ~~MSR 下载：[链接](http:\u002F\u002Fresearch.microsoft.com\u002Fen-us\u002Fum\u002Fpeople\u002Fkahe\u002Fresnet\u002Fmodels.zip)~~\n\t- OneDrive 下载：[链接](https:\u002F\u002Fonedrive.live.com\u002F?authkey=%21AAFW2-FVoxeVRck&id=4006CBB8476FF777%2117887&cid=4006CBB8476FF777)\n\n### 实验结果\n\n0. ImageNet 上的训练曲线（实线：单裁剪验证误差；虚线：训练误差）：\n\t![Training curves](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FKaimingHe_deep-residual-networks_readme_dc12b85c0f99.jpg)\n\n0. ImageNet 单裁剪（1-crop）验证误差（从短边调整为 256 像素的图像中裁剪中心 224×224 区域）：\n\n\tmodel|top-1|top-5\n\t:---:|:---:|:---:\n\t[VGG-16](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F)|[28.5%](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F)|[9.9%](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F)\n\tResNet-50|24.7%|7.8%\n\tResNet-101|23.6%|7.1%\n\tResNet-152|23.0%|6.7%\n\t\n0. ImageNet 十裁剪（10-crop）验证误差（从短边调整为 256 像素的图像中裁剪 10 个 224×224 区域并平均 softmax 分数），与论文中的结果相同：\n\n\tmodel|top-1|top-5\n\t:---:|:---:|:---:\n\tResNet-50|22.9%|6.7%\n\tResNet-101|21.8%|6.1%\n\tResNet-152|21.4%|5.7%\n\n### 第三方重新实现\n\n深度残差网络（Deep Residual Networks）非常容易实现和训练。我们建议同时查看以下第三方重新实现和扩展：\n\n0. 由 Facebook AI 研究院（Facebook AI Research, FAIR）提供，包含 **Torch 训练代码以及针对 ImageNet 的预训练 ResNet-18\u002F34\u002F50\u002F101 模型**：[博客](http:\u002F\u002Ftorch.ch\u002Fblog\u002F2016\u002F02\u002F04\u002Fresnets.html)，[代码](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Ffb.resnet.torch)\n0. Torch, CIFAR-10，包含 ResNet-20 到 ResNet-110、训练代码及训练曲线：[代码](https:\u002F\u002Fgithub.com\u002Fgcr\u002Ftorch-residual-networks)\n0. Lasagne, CIFAR-10，包含 ResNet-32 和 ResNet-56 及训练代码：[代码](https:\u002F\u002Fgithub.com\u002FLasagne\u002FRecipes\u002Ftree\u002Fmaster\u002Fpapers\u002Fdeep_residual_learning)\n0. Neon, CIFAR-10，包含预训练的 ResNet-32 到 ResNet-110 模型、训练代码及训练曲线：[代码](https:\u002F\u002Fgithub.com\u002Fapark263\u002Fcfmz)\n0. Torch, MNIST，100 层：[博客](https:\u002F\u002Fdeepmlblog.wordpress.com\u002F2016\u002F01\u002F05\u002Fresidual-networks-in-torch-mnist\u002F)，[代码](https:\u002F\u002Fgithub.com\u002Farunpatala\u002Fresidual.mnist)\n0. Kaggle 露脊鲸识别挑战赛的获胜方案：[博客](http:\u002F\u002Fblog.kaggle.com\u002F2016\u002F02\u002F04\u002Fnoaa-right-whale-recognition-winners-interview-2nd-place-felix-lau\u002F)，[代码](https:\u002F\u002Fgithub.com\u002Ffelixlaumon\u002Fkaggle-right-whale)\n0. Neon, Place2 (mini)，40 层：[博客](http:\u002F\u002Fwww.nervanasys.com\u002Fusing-neon-for-scene-recognition-mini-places2\u002F)，[代码](https:\u002F\u002Fgithub.com\u002Fhunterlang\u002Fmpmz\u002F)\n0. MatConvNet, CIFAR-10，包含 ResNet-20 到 ResNet-110、训练代码及训练曲线：[代码](https:\u002F\u002Fgithub.com\u002Fsuhangpro\u002Fmatresnet)\n0. TensorFlow, CIFAR-10，包含 ResNet-32、110、182 的训练代码及训练曲线：[代码](https:\u002F\u002Fgithub.com\u002Fppwwyyxx\u002Ftensorpack\u002Ftree\u002Fmaster\u002Fexamples\u002FResNet)\n0. MatConvNet，复现 CIFAR-10 和 ImageNet 实验（支持官方 MatConvNet），包含训练代码及训练曲线：[博客](https:\u002F\u002Fzhanghang1989.github.io\u002FResNet\u002F)，[代码](https:\u002F\u002Fgithub.com\u002Fzhanghang1989\u002FResNet-Matconvnet)\n0. Keras, ResNet-50：[代码](https:\u002F\u002Fgithub.com\u002Fraghakot\u002Fkeras-resnet)\n\n转换器：\n\n0. MatConvNet：[链接](http:\u002F\u002Fwww.vlfeat.org\u002Fmatconvnet\u002Fpretrained\u002F#imagenet-ilsvrc-classification)\n0. TensorFlow：[链接](https:\u002F\u002Fgithub.com\u002Fry\u002Ftensorflow-resnet)","# Deep Residual Networks (ResNet) 快速上手指南\n\n## 环境准备\n\n### 系统要求\n- Linux 或 macOS 系统\n- NVIDIA GPU（推荐，用于加速推理）\n- CUDA 7.5+ 和 cuDNN v5+（如使用GPU）\n\n### 前置依赖\n- Caffe（2016年2月3日版本或兼容版本，commit: b590f1d）\n- Python 2.7 或 3.x\n- OpenCV、NumPy 等常见科学计算库\n\n> **注意**：本仓库仅提供预训练模型，**不包含训练代码**。如需训练，请参考 [Facebook AI Research 的 Torch 实现](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Ffb.resnet.torch)。\n\n---\n\n## 安装步骤\n\n### 1. 安装 Caffe\n\n```bash\n# 克隆 Caffe 仓库\ngit clone https:\u002F\u002Fgithub.com\u002FBVLC\u002Fcaffe.git\ncd caffe\n\n# 切换到兼容版本（2016\u002F2\u002F3）\ngit checkout b590f1d\n\n# 编译安装（根据你的环境修改 Makefile.config）\ncp Makefile.config.example Makefile.config\n# 编辑 Makefile.config，启用\u002F禁用 CUDA、cuDNN 等选项\n\nmake all -j8\nmake pycaffe\n```\n\n### 2. 下载 ResNet 预训练模型\n\n```bash\n# 创建模型目录\nmkdir -p models && cd models\n\n# 方式一：OneDrive 下载（官方推荐）\n# 访问 https:\u002F\u002Fonedrive.live.com\u002F?authkey=%21AAFW2-FVoxeVRck&id=4006CBB8476FF777%2117887&cid=4006CBB8476FF777\n# 手动下载 models.zip 并解压\n\n# 方式二：使用 wget\u002Fcurl（如有直链）\nwget -O models.zip \"https:\u002F\u002Fonedrive.live.com\u002Fdownload?cid=4006CBB8476FF777&resid=4006CBB8476FF777%2117887&authkey=AAFW2-FVoxeVRck\"\nunzip models.zip\n```\n\n下载完成后，模型文件结构如下：\n```\nmodels\u002F\n├── ResNet-50-deploy.prototxt\n├── ResNet-101-deploy.prototxt\n├── ResNet-152-deploy.prototxt\n├── ResNet-50-model.caffemodel\n├── ResNet-101-model.caffemodel\n└── ResNet-152-model.caffemodel\n```\n\n---\n\n## 基本使用\n\n### 单张图片分类示例\n\n```python\nimport numpy as np\nimport caffe\n\n# 设置计算模式\ncaffe.set_mode_gpu()  # 或 caffe.set_mode_cpu()\ncaffe.set_device(0)\n\n# 模型路径\nMODEL_DEF = 'models\u002FResNet-50-deploy.prototxt'\nMODEL_WEIGHTS = 'models\u002FResNet-50-model.caffemodel'\nMEAN_FILE = 'models\u002FResNet_mean.binaryproto'  # 或使用 ImageNet 均值\n\n# 加载网络\nnet = caffe.Net(MODEL_DEF, MODEL_WEIGHTS, caffe.TEST)\n\n# 图像预处理\ntransformer = caffe.io.Transformer({'data': net.blobs['data'].data.shape})\ntransformer.set_transpose('data', (2, 0, 1))\ntransformer.set_mean('data', np.array([104, 117, 123]))  # BGR 均值\ntransformer.set_raw_scale('data', 255)\ntransformer.set_channel_swap('data', (2, 1, 0))  # RGB to BGR\n\n# 加载图像并推理\nnet.blobs['data'].reshape(1, 3, 224, 224)  # batch_size=1\nimage = caffe.io.load_image('example.jpg')\ntransformed_image = transformer.preprocess('data', image)\nnet.blobs['data'].data[...] = transformed_image\n\n# 前向传播\noutput = net.forward()\nprobabilities = output['prob'][0]\n\n# 获取 Top-5 预测结果\ntop5 = probabilities.argsort()[-5:][::-1]\nprint('Top-5 predictions:', top5)\nprint('Probabilities:', probabilities[top5])\n```\n\n### 批量推理\n\n```python\nimport os\nimport glob\n\n# 设置批量大小\nBATCH_SIZE = 32\nnet.blobs['data'].reshape(BATCH_SIZE, 3, 224, 224)\n\n# 批量处理\nimage_paths = glob.glob('images\u002F*.jpg')\nfor i in range(0, len(image_paths), BATCH_SIZE):\n    batch_paths = image_paths[i:i+BATCH_SIZE]\n    # 填充批次并推理...\n```\n\n---\n\n## 模型选择参考\n\n| 模型 | Top-1 错误率 | Top-5 错误率 | 显存需求 | 适用场景 |\n|:---|:---|:---|:---|:---|\n| ResNet-50 | 24.7% | 7.8% | ~8GB | 平衡速度与精度 |\n| ResNet-101 | 23.6% | 7.1% | ~12GB | 更高精度需求 |\n| ResNet-152 | 23.0% | 6.7% | ~16GB | 极致精度需求 |\n\n---\n\n## 网络结构可视化\n\n使用 [Netscope](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002Fquickstart.html) 在线查看网络结构：\n- [ResNet-50](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fdb945b393d40bfa26006)\n- [ResNet-101](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fb21e2aae116dc1ac7b50)\n- [ResNet-152](http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fd38f3e6091952b45198b)","某医疗影像科技公司正在开发一款辅助诊断系统，需要训练深度学习模型来自动识别CT影像中的早期肺结节，以帮助放射科医生提高筛查效率。\n\n### 没有 deep-residual-networks 时\n\n- **网络深度受限**：团队尝试堆叠超过20层的卷积网络，但模型出现严重的梯度消失问题，深层网络反而比浅层网络准确率更低，无法有效提取肺结节的细微纹理特征\n- **训练效率低下**：为追求更高精度，不得不设计复杂的网络架构和手工调优的初始化策略，单次实验周期长达2-3周，迭代成本极高\n- **模型性能瓶颈**：在1000张验证集上测试，假阳性率高达15%，对直径小于5mm的微小结节漏检率超过30%，难以满足临床辅助诊断的精度要求\n- **硬件资源浪费**：为缓解深层网络的训练困难，被迫使用更宽的层结构，导致GPU显存占用翻倍，8卡集群训练时频繁出现OOM错误\n\n### 使用 deep-residual-networks 后\n\n- **突破深度限制**：直接采用ResNet-50架构，通过残差连接让梯度顺畅回传，轻松训练50层以上的网络，深层特征提取能力显著提升，微小结节的纹理模式捕捉更加精准\n- **快速收敛复现**：基于ImageNet预训练权重进行迁移学习，配合论文提供的标准超参数，模型在3天内完成收敛，研发迭代周期缩短80%\n- **精度大幅提升**：在相同验证集上测试，假阳性率降至4.2%，微小结节漏检率控制在8%以内，达到放射科住院医师水平的诊断能力\n- **资源高效利用**：残差结构参数效率更高，显存占用降低40%，单卡即可承载更大batch size训练，8卡集群稳定运行无OOM\n\ndeep-residual-networks通过残差学习机制，让医疗影像团队能够训练更深、更准、更高效的神经网络，将AI辅助诊断从实验室原型快速推进到临床可用产品。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FKaimingHe_deep-residual-networks_dc12b85c.jpg","KaimingHe","Kaiming He","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FKaimingHe_3c4b77fa.png",null,"https:\u002F\u002Fgithub.com\u002FKaimingHe",6712,2237,"2026-04-05T07:24:31","MIT",4,"Linux","必需，多GPU训练（原论文使用8块GPU），单GPU显存可能不足，未说明具体型号和CUDA版本","未说明",{"notes":90,"python":88,"dependencies":91},"1. 本仓库仅包含预训练模型（ResNet-50\u002F101\u002F152），用于测试或微调，不包含训练代码；2. 原模型使用8块GPU、每块32张图片（总计batch size 256）训练，若用此版本Caffe训练需修改batch size，否则影响精度；3. BN层使用严格平均（非移动平均）计算均值方差；4. 使用Caffe的batch_norm_layer + scale_layer组合实现BN；5. SGD动量实现为v := momentum*v + lr*g，移植到其他框架需注意差异；6. 数据增强实现可能与原论文不同；7. 每轮epoch开始时随机打乱数据",[92],"Caffe (2016\u002F2\u002F3版本, b590f1d)",[14],"2026-03-27T02:49:30.150509","2026-04-06T07:15:07.483163",[97,102,107,112,117,122,127,132],{"id":98,"question_zh":99,"answer_zh":100,"source_url":101},4258,"ResNet 训练时无法收敛，可能是什么原因？","训练 ResNet 不收敛的常见原因是 BatchNorm 层的参数设置问题。需要为每个 BatchNorm 层添加三个 `lr_mult: 0` 参数，以禁用对均值、方差和缩放参数的学习：\n\n```\nparam {\n  lr_mult: 0\n}\nparam {\n  lr_mult: 0\n}\nparam {\n  lr_mult: 0\n}\n```\n\n此外，确保使用正确的 Caffe 版本，BVLC Caffe 的 BatchNorm 层曾有 bug，可参考修复：https:\u002F\u002Fgithub.com\u002FBVLC\u002Fcaffe\u002Fpull\u002F5136","https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fdeep-residual-networks\u002Fissues\u002F6",{"id":103,"question_zh":104,"answer_zh":105,"source_url":106},4259,"ResNet 的图像预处理应该如何设置？","ResNet 的预处理设置如下：\n- 颜色通道顺序：BGR（与 VGG 相同）\n- 输入范围：[0, 255]\n- 均值处理：使用逐像素均值图像（224×224×3），文件名为 `ResNet_mean.binaryproto`\n- 若需要 3 通道均值，可对逐像素均值图像在空间维度上取平均\n\n注意：不要使用 VGG 的固定均值 [103.939, 116.779, 123.68]，ResNet 使用的是从训练集计算得到的逐像素均值。","https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fdeep-residual-networks\u002Fissues\u002F5",{"id":108,"question_zh":109,"answer_zh":110,"source_url":111},4260,"ResNet 的卷积层是否应该使用偏置项（bias）？","ResNet 的卷积层**不应该**使用偏置项（`bias_term: false`）。原因如下：\n- 论文中\"省略偏置以简化符号\"指的是实际实现中确实没有偏置\n- 由于每个卷积层后都有 BatchNorm 层，偏置项是冗余的，BatchNorm 的平移参数已经起到了类似作用\n- 注意：conv1 在某些版本中可能有偏置，但 resnet-101 和 resnet-152 的 conv1 明确没有偏置\n\n如果看到带有偏置的 ResNet 实现，通常是因为没有使用 BatchNorm。","https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fdeep-residual-networks\u002Fissues\u002F10",{"id":113,"question_zh":114,"answer_zh":115,"source_url":116},4261,"微调 ResNet 时出现 \"Too many params specified\" 错误如何解决？","错误信息：`Check failed: param_size \u003C= num_param_blobs (2 vs. 1) Too many params specified for layer`\n\n**原因**：该卷积层设置了 `bias_term: false`，但 prototxt 中却定义了两个 `param` 块（一个给权重，一个给偏置）。\n\n**解决方案**：删除多余的第二个 `param` 块。对于没有偏置的卷积层，只需保留一个 `param`：\n\n```\nlayer {\n  name: \"res2a_branch1\"\n  type: \"Convolution\"\n  bottom: \"pool1\"\n  top: \"res2a_branch1\"\n  param {\n    lr_mult: 0\n  }\n  convolution_param {\n    num_output: 256\n    kernel_size: 1\n    bias_term: false\n  }\n}\n```","https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fdeep-residual-networks\u002Fissues\u002F39",{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},4262,"如何可视化 ResNet 的网络结构？","使用 Netscope 工具可以可视化 Caffe 网络结构：\n\n1. 访问 http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002Fquickstart.html\n2. 将 prototxt 文件内容粘贴到编辑器中\n3. 即可生成清晰的网络结构图，如 http:\u002F\u002Fethereon.github.io\u002Fnetscope\u002F#\u002Fgist\u002Fdb945b393d40bfa26006\n\n该工具支持在线查看各层的输入输出维度、参数数量等信息，非常适合理解和调试网络结构。","https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fdeep-residual-networks\u002Fissues\u002F7",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},4263,"ResNet 测试时的显存占用是多少？","ResNet 各模型的显存需求（测试模式，batch size=1，224×224 输入）：\n\n- **ResNet-50**：约 2-3 GB\n- **ResNet-101**：约 3-4 GB  \n- **ResNet-152**：约 6-8 GB\n\n实际占用取决于：\n- cuDNN 版本（新版本更省内存）\n- 是否使用 cuDNN 的内存优化\n- 输入图像尺寸\n\n训练时的显存需求约为测试时的 3-4 倍。8GB 显存（如 GTX 1070）只能运行 ResNet-152 的 batch size=1 微调，完整训练需要更大显存或多卡。","https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fdeep-residual-networks\u002Fissues\u002F42",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},4264,"为什么 ResNet 的 conv1 步长是 2，但输出尺寸从 224 变成 112 而不是 112.5？","ResNet 的 conv1 配置：`kernel_size=7, stride=2, pad=3`\n\n输出尺寸计算公式：\n```\noutput_size = floor((input_size + 2*pad - kernel_size) \u002F stride) + 1\n            = floor((224 + 6 - 7) \u002F 2) + 1\n            = floor(223 \u002F 2) + 1\n            = 111 + 1 = 112\n```\n\n注意：Caffe 使用向下取整（floor），不是向上取整。因此 223\u002F2=111.5 取整为 111，再加 1 得到 112。\n\n后续 max pooling（kernel=3, stride=2, pad=1）将 112×112 变为 56×56，作为 res2a 的输入。","https:\u002F\u002Fgithub.com\u002FKaimingHe\u002Fdeep-residual-networks\u002Fissues\u002F16",{"id":133,"question_zh":134,"answer_zh":135,"source_url":101},4265,"BatchNorm 层的 `use_global_stats` 在训练和测试时应该如何设置？","Caffe 中 BatchNorm 层的 `use_global_stats` 参数设置：\n\n**训练阶段**：\n- `use_global_stats: false`（默认值）\n- 使用当前 batch 的均值和方差进行归一化\n- 同时更新全局均值和方差的滑动平均\n\n**测试阶段**：\n- `use_global_stats: true`\n- 使用训练阶段保存的全局均值和方差\n- 不再更新统计量\n\n**注意**：Caffe 的 BatchNorm 层默认行为与某些其他框架不同。如果训练时错误地设置了 `use_global_stats: true`，会导致使用固定的初始统计量，造成训练不稳定或无法收敛。",[]]