[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-eriklindernoren--PyTorch-YOLOv3":3,"tool-eriklindernoren--PyTorch-YOLOv3":64},[4,17,27,35,43,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},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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"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,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"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,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"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,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":81,"owner_twitter":79,"owner_website":82,"owner_url":83,"languages":84,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":23,"env_os":97,"env_gpu":98,"env_ram":99,"env_deps":100,"category_tags":111,"github_topics":79,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":112,"updated_at":113,"faqs":114,"releases":145},2316,"eriklindernoren\u002FPyTorch-YOLOv3","PyTorch-YOLOv3","Minimal PyTorch implementation of YOLOv3","PyTorch-YOLOv3 是一个基于 PyTorch 框架实现的轻量级 YOLOv3 目标检测项目。它旨在为开发者提供一个代码简洁、结构清晰的参考实现，支持模型的训练、推理及性能评估全流程。该工具有效解决了主流目标检测模型往往代码庞大、难以快速上手或进行二次开发的问题，让用户能更专注于算法原理的理解与改进。\n\n除了原生支持 YOLOv3，PyTorch-YOLOv3 还兼容 YOLOv4 和 YOLOv7 的预训练权重，具备良好的扩展性。其技术亮点在于极简的代码架构，同时保持了接近原论文的性能表现（在 COCO 数据集上 mAP 可达 57.3%），并提供了便捷的命令行工具以便快速启动训练或检测任务。此外，它还集成了 TensorBoard 可视化功能，方便用户实时监控训练进度。\n\n这款工具非常适合计算机视觉领域的研究人员、深度学习工程师以及希望深入理解 YOLO 算法内部机制的学生使用。对于需要快速搭建基线模型或进行自定义数据集训练的开发者而言，PyTorch-YOLOv3 是一个高效且易于修改的理想选择。","# PyTorch YOLO\nA minimal PyTorch implementation of YOLOv3, with support for training, inference and evaluation.\n\nYOLOv4 and YOLOv7 weights are also compatible with this implementation.\n\n[![CI](https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Factions\u002Fworkflows\u002Fmain.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Factions\u002Fworkflows\u002Fmain.yml) [![PyPI pyversions](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpytorchyolo.svg)](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fpytorchyolo\u002F) [![PyPI license](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fpytorchyolo.svg)](LICENSE)\n\n## Installation\n### Installing from source\n\nFor normal training and evaluation we recommend installing the package from source using a poetry virtual environment.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\ncd PyTorch-YOLOv3\u002F\npip3 install poetry --user\npoetry install\n```\n\nYou need to join the virtual environment by running `poetry shell` in this directory before running any of the following commands without the `poetry run` prefix.\nAlso have a look at the other installing method, if you want to use the commands everywhere without opening a poetry-shell.\n\n#### Download pretrained weights\n\n```bash\n.\u002Fweights\u002Fdownload_weights.sh\n```\n\n#### Download COCO\n\n```bash\n.\u002Fdata\u002Fget_coco_dataset.sh\n```\n\n### Install via pip\n\nThis installation method is recommended, if you want to use this package as a dependency in another python project.\nThis method only includes the code, is less isolated and may conflict with other packages.\nWeights and the COCO dataset need to be downloaded as stated above.\nSee __API__ for further information regarding the packages API.\nIt also enables the CLI tools `yolo-detect`, `yolo-train`, and `yolo-test` everywhere without any additional commands.\n\n```bash\npip3 install pytorchyolo --user\n```\n\n## Test\nEvaluates the model on COCO test dataset.\nTo download this dataset as well as weights, see above.\n\n```bash\npoetry run yolo-test --weights weights\u002Fyolov3.weights\n```\n\n| Model                   | mAP (min. 50 IoU) |\n| ----------------------- |:-----------------:|\n| YOLOv3 608 (paper)      | 57.9              |\n| YOLOv3 608 (this impl.) | 57.3              |\n| YOLOv3 416 (paper)      | 55.3              |\n| YOLOv3 416 (this impl.) | 55.5              |\n\n## Inference\nUses pretrained weights to make predictions on images. Below table displays the inference times when using as inputs images scaled to 256x256. The ResNet backbone measurements are taken from the YOLOv3 paper. The Darknet-53 measurement marked shows the inference time of this implementation on my 1080ti card.\n\n| Backbone                | GPU      | FPS      |\n| ----------------------- |:--------:|:--------:|\n| ResNet-101              | Titan X  | 53       |\n| ResNet-152              | Titan X  | 37       |\n| Darknet-53 (paper)      | Titan X  | 76       |\n| Darknet-53 (this impl.) | 1080ti   | 74       |\n\n```bash\npoetry run yolo-detect --images data\u002Fsamples\u002F\n```\n\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_2f0fb4ba1d58.png\" width=\"480\"\\>\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_608ec166769b.png\" width=\"480\"\\>\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_f9c634ed8a5a.png\" width=\"480\"\\>\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_fe647d29e6e4.png\" width=\"480\"\\>\u003C\u002Fp>\n\n## Train\nFor argument descriptions have a look at `poetry run yolo-train --help`\n\n#### Example (COCO)\nTo train on COCO using a Darknet-53 backend pretrained on ImageNet run:\n\n```bash\npoetry run yolo-train --data config\u002Fcoco.data  --pretrained_weights weights\u002Fdarknet53.conv.74\n```\n\n#### Tensorboard\nTrack training progress in Tensorboard:\n* Initialize training\n* Run the command below\n* Go to http:\u002F\u002Flocalhost:6006\u002F\n\n```bash\npoetry run tensorboard --logdir='logs' --port=6006\n```\n\nStoring the logs on a slow drive possibly leads to a significant training speed decrease.\n\nYou can adjust the log directory using `--logdir \u003Cpath>` when running `tensorboard` and `yolo-train`.\n\n## Train on Custom Dataset\n\n#### Custom model\nRun the commands below to create a custom model definition, replacing `\u003Cnum-classes>` with the number of classes in your dataset.\n\n```bash\ncd config \n.\u002Fcreate_custom_model.sh \u003Cnum-classes>  # Will create custom model 'yolov3-custom.cfg'\n```\n\n#### Classes\nAdd class names to `data\u002Fcustom\u002Fclasses.names`. This file should have one row per class name.\n\n#### Image Folder\nMove the images of your dataset to `data\u002Fcustom\u002Fimages\u002F`.\n\n#### Annotation Folder\nMove your annotations to `data\u002Fcustom\u002Flabels\u002F`. The dataloader expects that the annotation file corresponding to the image `data\u002Fcustom\u002Fimages\u002Ftrain.jpg` has the path `data\u002Fcustom\u002Flabels\u002Ftrain.txt`. Each row in the annotation file should define one bounding box, using the syntax `label_idx x_center y_center width height`. The coordinates should be scaled `[0, 1]`, and the `label_idx` should be zero-indexed and correspond to the row number of the class name in `data\u002Fcustom\u002Fclasses.names`.\n\n#### Define Train and Validation Sets\nIn `data\u002Fcustom\u002Ftrain.txt` and `data\u002Fcustom\u002Fvalid.txt`, add paths to images that will be used as train and validation data respectively.\n\n#### Train\nTo train on the custom dataset run:\n\n```bash\npoetry run yolo-train --model config\u002Fyolov3-custom.cfg --data config\u002Fcustom.data\n```\n\nAdd `--pretrained_weights weights\u002Fdarknet53.conv.74` to train using a backend pretrained on ImageNet.\n\n\n## API\n\nYou are able to import the modules of this repo in your own project if you install the pip package `pytorchyolo`.\n\nAn example prediction call from a simple OpenCV python script would look like this:\n\n```python\nimport cv2\nfrom pytorchyolo import detect, models\n\n# Load the YOLO model\nmodel = models.load_model(\n  \"\u003CPATH_TO_YOUR_CONFIG_FOLDER>\u002Fyolov3.cfg\",\n  \"\u003CPATH_TO_YOUR_WEIGHTS_FOLDER>\u002Fyolov3.weights\")\n\n# Load the image as a numpy array\nimg = cv2.imread(\"\u003CPATH_TO_YOUR_IMAGE>\")\n\n# Convert OpenCV bgr to rgb\nimg = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\n\n# Runs the YOLO model on the image\nboxes = detect.detect_image(model, img)\n\nprint(boxes)\n# Output will be a numpy array in the following format:\n# [[x1, y1, x2, y2, confidence, class]]\n```\n\nFor more advanced usage look at the method's doc strings.\n\n## Credit\n\n### YOLOv3: An Incremental Improvement\n_Joseph Redmon, Ali Farhadi_ \u003Cbr>\n\n**Abstract** \u003Cbr>\nWe present some updates to YOLO! We made a bunch\nof little design changes to make it better. We also trained\nthis new network that’s pretty swell. It’s a little bigger than\nlast time but more accurate. It’s still fast though, don’t\nworry. At 320 × 320 YOLOv3 runs in 22 ms at 28.2 mAP,\nas accurate as SSD but three times faster. When we look\nat the old .5 IOU mAP detection metric YOLOv3 is quite\ngood. It achieves 57.9 AP50 in 51 ms on a Titan X, compared\nto 57.5 AP50 in 198 ms by RetinaNet, similar performance\nbut 3.8× faster. As always, all the code is online at\nhttps:\u002F\u002Fpjreddie.com\u002Fyolo\u002F.\n\n[[Paper]](https:\u002F\u002Fpjreddie.com\u002Fmedia\u002Ffiles\u002Fpapers\u002FYOLOv3.pdf) [[Project Webpage]](https:\u002F\u002Fpjreddie.com\u002Fdarknet\u002Fyolo\u002F) [[Authors' Implementation]](https:\u002F\u002Fgithub.com\u002Fpjreddie\u002Fdarknet)\n\n```\n@article{yolov3,\n  title={YOLOv3: An Incremental Improvement},\n  author={Redmon, Joseph and Farhadi, Ali},\n  journal = {arXiv},\n  year={2018}\n}\n```\n\n## Other\n\n### YOEO — You Only Encode Once\n\n[YOEO](https:\u002F\u002Fgithub.com\u002Fbit-bots\u002FYOEO) extends this repo with the ability to train an additional semantic segmentation decoder. The lightweight example model is mainly targeted towards embedded real-time applications.\n","# PyTorch YOLO\nYOLOv3 的极简 PyTorch 实现，支持训练、推理和评估。\n\nYOLOv4 和 YOLOv7 的权重也与此实现兼容。\n\n[![CI](https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Factions\u002Fworkflows\u002Fmain.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Factions\u002Fworkflows\u002Fmain.yml) [![PyPI pyversions](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpytorchyolo.svg)](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fpytorchyolo\u002F) [![PyPI license](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fpytorchyolo.svg)](LICENSE)\n\n## 安装\n### 从源码安装\n\n对于常规的训练和评估，我们建议使用 poetry 虚拟环境从源码安装该包。\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\ncd PyTorch-YOLOv3\u002F\npip3 install poetry --user\npoetry install\n```\n\n在运行以下不带 `poetry run` 前缀的命令之前，您需要通过在此目录中运行 `poetry shell` 来进入虚拟环境。如果您希望在任何地方无需打开 poetry-shell 即可使用这些命令，请参阅其他安装方法。\n\n#### 下载预训练权重\n\n```bash\n.\u002Fweights\u002Fdownload_weights.sh\n```\n\n#### 下载 COCO 数据集\n\n```bash\n.\u002Fdata\u002Fget_coco_dataset.sh\n```\n\n### 通过 pip 安装\n\n如果您希望将此包作为依赖项用于其他 Python 项目，则推荐使用此安装方法。此方法仅包含代码，隔离性较差，可能会与其他包发生冲突。权重和 COCO 数据集仍需按照上述说明下载。有关软件包 API 的更多信息，请参阅 __API__ 部分。此外，它还使 CLI 工具 `yolo-detect`、`yolo-train` 和 `yolo-test` 在任何地方均可直接使用，无需额外命令。\n\n```bash\npip3 install pytorchyolo --user\n```\n\n## 测试\n在 COCO 测试数据集上评估模型。要下载此数据集以及权重，请参阅上方说明。\n\n```bash\npoetry run yolo-test --weights weights\u002Fyolov3.weights\n```\n\n| 模型                   | mAP (min. 50 IoU) |\n| ----------------------- |:-----------------:|\n| YOLOv3 608 (论文)      | 57.9              |\n| YOLOv3 608 (本实现)    | 57.3              |\n| YOLOv3 416 (论文)      | 55.3              |\n| YOLOv3 416 (本实现)    | 55.5              |\n\n## 推理\n使用预训练权重对图像进行预测。下表显示了输入图像缩放到 256x256 时的推理时间。ResNet 主干网络的测量结果取自 YOLOv3 论文。标有“本实现”的 Darknet-53 测量结果显示了我在 1080ti 显卡上的推理时间。\n\n| 主干网络                | GPU      | FPS      |\n| ----------------------- |:--------:|:--------:|\n| ResNet-101              | Titan X  | 53       |\n| ResNet-152              | Titan X  | 37       |\n| Darknet-53 (论文)      | Titan X  | 76       |\n| Darknet-53 (本实现)     | 1080ti   | 74       |\n\n```bash\npoetry run yolo-detect --images data\u002Fsamples\u002F\n```\n\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_2f0fb4ba1d58.png\" width=\"480\"\\>\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_608ec166769b.png\" width=\"480\"\\>\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_f9c634ed8a5a.png\" width=\"480\"\\>\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_readme_fe647d29e6e4.png\" width=\"480\"\\>\u003C\u002Fp>\n\n## 训练\n有关参数说明，请查看 `poetry run yolo-train --help`。\n\n#### 示例（COCO）\n要使用在 ImageNet 上预训练的 Darknet-53 后端在 COCO 数据集上训练，请运行：\n\n```bash\npoetry run yolo-train --data config\u002Fcoco.data  --pretrained_weights weights\u002Fdarknet53.conv.74\n```\n\n#### TensorBoard\n在 TensorBoard 中跟踪训练进度：\n* 初始化训练\n* 运行以下命令\n* 打开 http:\u002F\u002Flocalhost:6006\u002F\n\n```bash\npoetry run tensorboard --logdir='logs' --port=6006\n```\n\n如果将日志存储在速度较慢的磁盘上，可能会显著降低训练速度。\n\n您可以通过在运行 `tensorboard` 和 `yolo-train` 时使用 `--logdir \u003Cpath>` 来调整日志目录。\n\n## 自定义数据集训练\n\n#### 自定义模型\n运行以下命令以创建自定义模型定义，将 `\u003Cnum-classes>` 替换为您的数据集中的类别数。\n\n```bash\ncd config \n.\u002Fcreate_custom_model.sh \u003Cnum-classes>  # 将创建自定义模型 'yolov3-custom.cfg'\n```\n\n#### 类别\n将类别名称添加到 `data\u002Fcustom\u002Fclasses.names` 文件中。每个类别名称应占一行。\n\n#### 图像文件夹\n将您的数据集图像移动到 `data\u002Fcustom\u002Fimages\u002F` 目录中。\n\n#### 标注文件夹\n将您的标注文件移动到 `data\u002Fcustom\u002Flabels\u002F` 目录中。数据加载器期望与图像 `data\u002Fcustom\u002Fimages\u002Ftrain.jpg` 对应的标注文件路径为 `data\u002Fcustom\u002Flabels\u002Ftrain.txt`。标注文件中的每一行应定义一个边界框，格式为 `label_idx x_center y_center width height`。坐标应归一化到 `[0, 1]` 范围内，`label_idx` 应从零开始，并对应于 `data\u002Fcustom\u002Fclasses.names` 文件中类别名称的行号。\n\n#### 定义训练和验证集\n在 `data\u002Fcustom\u002Ftrain.txt` 和 `data\u002Fcustom\u002Fvalid.txt` 文件中，分别添加将用作训练和验证数据的图像路径。\n\n#### 训练\n要使用自定义数据集进行训练，请运行：\n\n```bash\npoetry run yolo-train --model config\u002Fyolov3-custom.cfg --data config\u002Fcustom.data\n```\n\n添加 `--pretrained_weights weights\u002Fdarknet53.conv.74` 可以使用在 ImageNet 上预训练的后端进行训练。\n\n## API\n\n如果您安装了 pip 包 `pytorchyolo`，则可以在自己的项目中导入此仓库中的模块。\n\n以下是一个简单的 OpenCV Python 脚本中的预测调用示例：\n\n```python\nimport cv2\nfrom pytorchyolo import detect, models\n\n# 加载 YOLO 模型\nmodel = models.load_model(\n  \"\u003CPATH_TO_YOUR_CONFIG_FOLDER>\u002Fyolov3.cfg\",\n  \"\u003CPATH_TO_YOUR_WEIGHTS_FOLDER>\u002Fyolov3.weights\")\n\n# 将图像加载为 numpy 数组\nimg = cv2.imread(\"\u003CPATH_TO_YOUR_IMAGE>\")\n\n# 将 OpenCV bgr 转换为 rgb\nimg = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\n\n# 在图像上运行 YOLO 模型\nboxes = detect.detect_image(model, img)\n\nprint(boxes)\n# 输出将是如下格式的 numpy 数组：\n# [[x1, y1, x2, y2, 置信度, 类别]]\n```\n\n有关更高级的用法，请参阅方法的文档字符串。\n\n## 致谢\n\n### YOLOv3：一次渐进式改进\n_约瑟夫·雷德蒙，阿里·法哈迪_ \u003Cbr>\n\n**摘要** \u003Cbr>\n我们对 YOLO 进行了一些更新！通过一系列小的设计改动使其性能更优。此外，我们还训练了一个非常出色的全新网络。它比之前的版本稍大一些，但精度更高。不过别担心，速度依然很快。在 320×320 分辨率下，YOLOv3 的推理时间为 22 毫秒，mAP 达到 28.2，与 SSD 精度相当，但速度快三倍。如果采用旧的 0.5 IoU mAP 检测指标，YOLOv3 的表现也非常出色。在 Titan X 显卡上，其 51 毫秒推理时间可达到 57.9 AP50，而 RetinaNet 在 198 毫秒内仅能取得 57.5 AP50，两者性能相近，但 YOLOv3 速度快了 3.8 倍。一如既往，所有代码均已公开，地址为：https:\u002F\u002Fpjreddie.com\u002Fyolo\u002F。\n\n[[论文]](https:\u002F\u002Fpjreddie.com\u002Fmedia\u002Ffiles\u002Fpapers\u002FYOLOv3.pdf) [[项目主页]](https:\u002F\u002Fpjreddie.com\u002Fdarknet\u002Fyolo\u002F) [[作者实现]](https:\u002F\u002Fgithub.com\u002Fpjreddie\u002Fdarknet)\n\n```\n@article{yolov3,\n  title={YOLOv3: An Incremental Improvement},\n  author={Redmon, Joseph and Farhadi, Ali},\n  journal = {arXiv},\n  year={2018}\n}\n```\n\n## 其他\n\n### YOEO — 你只需编码一次\n\n[YOEO](https:\u002F\u002Fgithub.com\u002Fbit-bots\u002FYOEO) 在本仓库的基础上扩展了功能，增加了训练额外语义分割解码器的能力。该轻量级示例模型主要面向嵌入式实时应用。","# PyTorch-YOLOv3 快速上手指南\n\n本指南基于 `PyTorch-YOLOv3` 官方文档整理，旨在帮助开发者快速完成环境搭建、模型测试及自定义训练。该实现支持 YOLOv3、YOLOv4 及 YOLOv7 权重。\n\n## 1. 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux 或 macOS (Windows 需使用 WSL)\n*   **Python**: 3.6+ (推荐 3.8+)\n*   **深度学习框架**: PyTorch (安装 poetry 时会自动处理依赖)\n*   **硬件**: 推荐使用 NVIDIA GPU 以获得最佳推理和训练速度\n*   **工具**: `git`, `pip`, `poetry`\n\n> **国内加速建议**：\n> *   克隆仓库时若速度慢，可使用 Gitee 镜像或配置 git 代理。\n> *   安装 Python 依赖时，建议指定清华或阿里镜像源：\n>     ```bash\n>     pip3 install poetry -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple --user\n>     ```\n\n## 2. 安装步骤\n\n推荐使用 **源码安装** 配合 `poetry` 虚拟环境，以确保依赖隔离和环境稳定。\n\n### 2.1 克隆项目并安装依赖\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\ncd PyTorch-YOLOv3\u002F\n\n# 安装 poetry (如已安装可跳过)\npip3 install poetry --user\n\n# 安装项目依赖\npoetry install\n```\n\n> **注意**：执行后续命令前，需激活虚拟环境：\n> ```bash\n> poetry shell\n> ```\n> 若不想每次激活，可在命令前加 `poetry run` 前缀。\n\n### 2.2 下载预训练权重与数据集\n\n```bash\n# 下载 YOLOv3 预训练权重\n.\u002Fweights\u002Fdownload_weights.sh\n\n# 下载 COCO 数据集 (用于测试和评估)\n.\u002Fdata\u002Fget_coco_dataset.sh\n```\n> **提示**：若脚本下载失败（网络原因），请手动访问相关链接下载权重文件至 `weights\u002F` 目录，并按脚本逻辑整理 COCO 数据至 `data\u002Fcoco\u002F` 目录。\n\n## 3. 基本使用\n\n### 3.1 模型测试 (Test)\n\n在 COCO 测试集上评估模型性能（mAP）。\n\n```bash\npoetry run yolo-test --weights weights\u002Fyolov3.weights\n```\n\n### 3.2 图像推理 (Inference)\n\n使用预训练权重对图片进行目标检测。默认会检测 `data\u002Fsamples\u002F` 目录下的图片并保存结果。\n\n```bash\npoetry run yolo-detect --images data\u002Fsamples\u002F\n```\n\n检测完成后，结果图片将保存在当前目录下，展示检测到的物体框及类别。\n\n### 3.3 快速训练 (Train)\n\n使用 COCO 数据集和 ImageNet 预训练的 Darknet-53 骨干网络进行训练。\n\n```bash\npoetry run yolo-train --data config\u002Fcoco.data --pretrained_weights weights\u002Fdarknet53.conv.74\n```\n\n**查看训练进度 (TensorBoard)**：\n在新终端中运行以下命令，然后浏览器访问 `http:\u002F\u002Flocalhost:6006\u002F`。\n\n```bash\npoetry run tensorboard --logdir='logs' --port=6006\n```\n\n### 3.4 自定义数据集训练简述\n\n若需训练自己的数据集，请按以下步骤操作：\n\n1.  **创建模型配置**：\n    ```bash\n    cd config\n    .\u002Fcreate_custom_model.sh \u003C类别数量>\n    ```\n2.  **准备数据**：\n    *   类名存入 `data\u002Fcustom\u002Fclasses.names` (每行一个类名)。\n    *   图片放入 `data\u002Fcustom\u002Fimages\u002F`。\n    *   标签文件 (`.txt`) 放入 `data\u002Fcustom\u002Flabels\u002F`，格式为：`class_id x_center y_center width height` (坐标归一化到 0-1)。\n    *   在 `data\u002Fcustom\u002Ftrain.txt` 和 `valid.txt` 中列出训练集和验证集图片的绝对路径。\n3.  **启动训练**：\n    ```bash\n    poetry run yolo-train --model config\u002Fyolov3-custom.cfg --data config\u002Fcustom.data\n    ```\n\n### 3.5 Python API 调用\n\n您也可以直接在 Python 代码中调用该库进行推理：\n\n```python\nimport cv2\nfrom pytorchyolo import detect, models\n\n# 加载模型\nmodel = models.load_model(\n  \"config\u002Fyolov3.cfg\",\n  \"weights\u002Fyolov3.weights\")\n\n# 读取图片 (OpenCV 默认为 BGR，需转为 RGB)\nimg = cv2.imread(\"data\u002Fsamples\u002Fgiraffe.png\")\nimg = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\n\n# 执行检测\nboxes = detect.detect_image(model, img)\n\nprint(boxes)\n# 输出格式：[[x1, y1, x2, y2, confidence, class]]\n```","某智慧交通初创团队需要快速构建一套实时车辆与行人检测系统，以部署在路侧边缘计算设备上。\n\n### 没有 PyTorch-YOLOv3 时\n- **环境搭建繁琐**：团队需从零复现 YOLOv3 复杂的网络结构，花费数周调试 Darknet 框架与 PyTorch 之间的算子兼容性问题。\n- **训练门槛极高**：缺乏开箱即用的训练脚本，开发人员必须手动编写数据加载器（DataLoader）和损失函数，难以利用 COCO 等标准数据集进行验证。\n- **推理性能不明**：无法直接获取在特定 GPU（如 1080ti）上的基准测试数据，难以评估模型是否满足实时性要求，导致硬件选型犹豫不决。\n- **迁移学习困难**：缺少对预训练权重（如 ImageNet 背骨网络）的原生支持，从头训练收敛慢且精度低，严重拖慢项目迭代进度。\n\n### 使用 PyTorch-YOLOv3 后\n- **一键部署运行**：通过 `pip install pytorchyolo` 即可集成最小化实现，直接调用 `yolo-detect` 命令完成图像推理，将环境配置时间从数周缩短至几小时。\n- **标准化训练流程**：内置完整的训练、评估管线，仅需一条 `yolo-train` 命令配合配置文件即可启动基于 COCO 数据集的训练，并自动记录 TensorBoard 日志。\n- **性能透明可控**：官方提供的基准测试表明 Darknet-53 后端在消费级显卡上可达 74 FPS，团队据此迅速确认了边缘设备的可行性。\n- **高效迁移学习**：原生支持加载 YOLOv3\u002Fv4\u002Fv7 预训练权重，团队利用 ImageNet 预训练模型进行微调，仅用少量交通数据便达到了高精度检测效果。\n\nPyTorch-YOLOv3 通过极简的代码实现和完善的工具链，让开发者能跳过底层架构陷阱，专注于业务数据的打磨与模型落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Feriklindernoren_PyTorch-YOLOv3_2f0fb4ba.png","eriklindernoren","Erik Linder-Norén","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Feriklindernoren_598153e0.jpg","ML engineer at Apple. Excited about machine learning, basketball and building things.",null,"Stockholm, Sweden","eriklindernoren@gmail.com","http:\u002F\u002Fwww.eriklindernoren.se","https:\u002F\u002Fgithub.com\u002Feriklindernoren",[85,89],{"name":86,"color":87,"percentage":88},"Python","#3572A5",88.4,{"name":90,"color":91,"percentage":92},"Shell","#89e051",11.6,7444,2599,"2026-04-02T08:37:19","GPL-3.0","Linux, macOS","需要 NVIDIA GPU 以获得最佳性能（文中测试使用 Titan X 和 GTX 1080ti），具体显存和 CUDA 版本未说明，但需支持 PyTorch CUDA 扩展","未说明",{"notes":101,"python":102,"dependencies":103},"推荐使用 Poetry 创建虚拟环境进行安装；支持 YOLOv3、YOLOv4 和 YOLOv7 权重；首次运行需手动下载预训练权重和 COCO 数据集；在慢速硬盘上存储日志可能会显著降低训练速度。","3.7+ (根据 PyPI badge 推断)",[104,105,106,107,108,109,110],"torch","numpy","opencv-python","pillow","tensorboard","tqdm","terminaltables",[14,13],"2026-03-27T02:49:30.150509","2026-04-06T07:05:55.462429",[115,120,125,130,135,140],{"id":116,"question_zh":117,"answer_zh":118,"source_url":119},10613,"训练时出现 'RuntimeError: CUDA error: device-side assert triggered' 错误怎么办？","该错误通常是因为边界框（bounding box）坐标超出了图像范围。原因可能是坐标未归一化（应在 0 到 1 之间），或者归一化后的坐标值异常（如 1.5）。解决方案是在 `utils\u002Futils.py` 的 `build_targets` 函数中添加边界检查代码，防止索引越界：\n```python\ngi[gi \u003C 0] = 0\ngj[gj \u003C 0] = 0\ngi[gi > nG - 1] = nG - 1\ngj[gj > nG - 1] = nG - 1\n```\n这能避免 `gi` 和 `gj` 超出掩码数组的边界。","https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Fissues\u002F157",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},10614,"在 VOC2007 数据集上训练后损失收敛但效果不佳，有什么建议？","这可能是权重保存或加载机制的问题。`Darknet.save_weights` 可能存在缺陷，建议改用保存和加载 `state_dict` 的方式。此外，对于小数据集，可以尝试先随机初始化权重，然后使用预训练的 `darknet53.conv.74` 文件加载前 73 层的权重，再冻结初始层或以较低学习率训练剩余层。","https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Fissues\u002F45",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},10615,"运行测试脚本时出现 'FileNotFoundError' 找不到图片文件怎么办？","如果在训练初期遇到此类错误或模型无法检测到目标（mAP not measured），尝试将数据加载器（DataLoader）中的 `shuffle` 参数设置为 `false`。有用户反馈在 COCO 数据集训练中，关闭 shuffle 后解决了相关问题。","https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Fissues\u002F372",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},10616,"从头开始在 COCO 数据集上训练后 mAP 为 0 如何解决？","该问题在最新版本中已修复，请确保更新到最新代码。如果问题仍然存在，或者需要更多功能支持，可以考虑使用 Ultralytics 维护的 YOLOv3 版本（https:\u002F\u002Fgithub.com\u002Fultralytics\u002Fyolov3），该版本更新频繁且效果良好，但需注意其当时可能不支持多 GPU 训练。","https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Fissues\u002F92",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},10617,"训练超过 100 个 epoch 仍不收敛，Loss 居高不下怎么办？","如果网络结构确认无误（通过 ONNX 导出验证），但训练不收敛且 AP 很低（如 28%），请检查是否与已知问题（如 Issue #489）类似。通常建议检查数据预处理是否正确、标签格式是否规范，或者尝试调整学习率策略。若问题持续，建议参考其他活跃分支或重新检查数据集的标注质量。","https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Fissues\u002F504",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},10618,"使用 yolov3-tiny 训练时出现 'ValueError: not enough values to unpack' 错误？","这通常是由于命令参数错误或代码解析输出维度不匹配导致的。虽然具体修复代码未在评论中完全展示，但维护者指出当前主分支代码可能存在不干净的情况。建议检查运行命令是否符合 tiny 模型的要求，或查看是否有针对该解包错误的 Pull Request 修复补丁，确保模型输出层数与预期一致。","https:\u002F\u002Fgithub.com\u002Feriklindernoren\u002FPyTorch-YOLOv3\u002Fissues\u002F178",[]]