[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-qfgaohao--pytorch-ssd":3,"tool-qfgaohao--pytorch-ssd":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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[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":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":80,"owner_email":81,"owner_twitter":79,"owner_website":79,"owner_url":82,"languages":83,"stars":88,"forks":89,"last_commit_at":90,"license":91,"difficulty_score":23,"env_os":92,"env_gpu":93,"env_ram":92,"env_deps":94,"category_tags":103,"github_topics":104,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":109,"updated_at":110,"faqs":111,"releases":137},977,"qfgaohao\u002Fpytorch-ssd","pytorch-ssd","MobileNetV1, MobileNetV2, VGG based SSD\u002FSSD-lite implementation in Pytorch 1.0 \u002F Pytorch 0.4. Out-of-box support for retraining on Open Images dataset. ONNX and Caffe2 support. Experiment Ideas like CoordConv.","pytorch-ssd 是一个基于 PyTorch 的轻量级目标检测开源实现，专注于 SSD（Single Shot MultiBox Detector）系列模型的模块化开发。它完整支持 MobileNetV1、MobileNetV2 和 VGG 三种骨干网络的 SSD 及 SSD-Lite 变体，并兼容 PyTorch 1.0 与 0.4 版本，方便不同环境下的部署需求。\n\n这个项目特别适合需要在资源受限设备上运行实时目标检测的开发者与研究人员。MobileNet 系列的引入让模型在保持较高精度的同时大幅降低了计算开销——MobileNetV1 SSD 在 VOC 数据集上达到 67.55% 的平均精度，而 MobileNetV2 SSD-Lite 更是提升至 68.6%，且后者在手机等移动端设备上推理速度更快。项目还内置了对 Google Open Images 大规模数据集的即开即用重训练支持，并完整打通 ONNX 与 Caffe2 部署链路，方便模型转换与生产环境落地。\n\n技术亮点方面，pytorch-ssd 采用了高度模块化的代码架构，便于研究者快速实验改进策略，例如 Coo","pytorch-ssd 是一个基于 PyTorch 的轻量级目标检测开源实现，专注于 SSD（Single Shot MultiBox Detector）系列模型的模块化开发。它完整支持 MobileNetV1、MobileNetV2 和 VGG 三种骨干网络的 SSD 及 SSD-Lite 变体，并兼容 PyTorch 1.0 与 0.4 版本，方便不同环境下的部署需求。\n\n这个项目特别适合需要在资源受限设备上运行实时目标检测的开发者与研究人员。MobileNet 系列的引入让模型在保持较高精度的同时大幅降低了计算开销——MobileNetV1 SSD 在 VOC 数据集上达到 67.55% 的平均精度，而 MobileNetV2 SSD-Lite 更是提升至 68.6%，且后者在手机等移动端设备上推理速度更快。项目还内置了对 Google Open Images 大规模数据集的即开即用重训练支持，并完整打通 ONNX 与 Caffe2 部署链路，方便模型转换与生产环境落地。\n\n技术亮点方面，pytorch-ssd 采用了高度模块化的代码架构，便于研究者快速实验改进策略，例如 CoordConv 等位置感知卷积技术的集成。无论是想快速搭建演示原型、在边缘设备部署检测服务，还是开展轻量级检测算法的学术研究，pytorch-ssd 都能提供稳定可靠的基础框架。项目附带预训练模型与实时摄像头演示脚本，新手也能在几分钟内跑通第一个检测程序。","# Single Shot MultiBox Detector Implementation in Pytorch\n\nThis repo implements [SSD (Single Shot MultiBox Detector)](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.02325). The implementation is heavily influenced by the projects [ssd.pytorch](https:\u002F\u002Fgithub.com\u002Famdegroot\u002Fssd.pytorch) and [Detectron](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FDetectron).\nThe design goal is modularity and extensibility.\n\nCurrently, it has MobileNetV1, MobileNetV2, and VGG based SSD\u002FSSD-Lite implementations. \n\nIt also has out-of-box support for retraining on Google Open Images dataset.\n\n![Example of Mobile SSD](readme_ssd_example.jpg  \"Example of Mobile SSD(Courtesy of https:\u002F\u002Fwww.pexels.com\u002F@mirit-assaf-299757 for the image.\")\n\n## Dependencies\n1. Python 3.6+\n2. OpenCV\n3. Pytorch 1.0 or Pytorch 0.4+\n4. Caffe2\n5. Pandas\n6. Boto3 if you want to train models on the Google OpenImages Dataset.\n\n## Download models\n\n**Please download the models and put them into the folder \".\u002Fmodels\". The following sections will need them.** URL: https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing\n\n## Run the demo\n### Run the live MobilenetV1 SSD demo\n\n```bash\n# If you haven't downloaded the models, please download from https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython run_ssd_live_demo.py mb1-ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth models\u002Fvoc-model-labels.txt \n```\n### Run the live demo in Caffe2\n\n```bash\n# If you haven't downloaded the models, please download from https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython run_ssd_live_caffe2.py models\u002Fmobilenet-v1-ssd_init_net.pb models\u002Fmobilenet-v1-ssd_predict_net.pb models\u002Fvoc-model-labels.txt \n```\n\nYou can see a decent speed boost by using Caffe2.\n\n### Run the live MobileNetV2 SSD Lite demo\n\n```bash\n# If you haven't downloaded the models, please download from https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython run_ssd_live_demo.py mb2-ssd-lite models\u002Fmb2-ssd-lite-mp-0_686.pth models\u002Fvoc-model-labels.txt \n```\n\nThe above MobileNetV2 SSD-Lite model is not ONNX-Compatible, as it uses Relu6 which is not supported by ONNX.\nThe code supports the ONNX-Compatible version. Once I have trained a good enough MobileNetV2 model with Relu, I will upload\nthe corresponding Pytorch and Caffe2 models.\n\nYou may notice MobileNetV2 SSD\u002FSSD-Lite is slower than MobileNetV1 SSD\u002FLite on PC. However, MobileNetV2 is faster on mobile devices.\n\n## Pretrained Models\n\n### Mobilenet V1 SSD\n\nIf you haven't downloaded the models, please download from https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\n\nModel: mobilenet-v1-ssd-mp-0_675.pth\n\n```\nAverage Precision Per-class:\naeroplane: 0.6742489426027927\nbicycle: 0.7913672875238116\nbird: 0.612096015101108\nboat: 0.5616407126931772\nbottle: 0.3471259064860268\nbus: 0.7742298893362103\ncar: 0.7284171192326804\ncat: 0.8360675520354323\nchair: 0.5142295855384792\ncow: 0.6244090341627014\ndiningtable: 0.7060035669312754\ndog: 0.7849252606216821\nhorse: 0.8202146617282785\nmotorbike: 0.793578272243471\nperson: 0.7042670984734087\npottedplant: 0.40257147509774405\nsheep: 0.6071252282334352\nsofa: 0.7549120254763918\ntrain: 0.8270992920206008\ntvmonitor: 0.6459903029666852\n\nAverage Precision Across All Classes:0.6755\n```\n\n### MobileNetV2 SSD-Lite\n\nIf you haven't downloaded the models, please download from https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\n\nModel: mb2-ssd-lite-mp-0_686.pth\n\n```\nAverage Precision Per-class:\naeroplane: 0.6973327307871002\nbicycle: 0.7823755921687233\nbird: 0.6342429230125619\nboat: 0.5478160937380846\nbottle: 0.3564069147093762\nbus: 0.7882037885117419\ncar: 0.7444122242934775\ncat: 0.8198865557991936\nchair: 0.5378973422880109\ncow: 0.6186076149254742\ndiningtable: 0.7369559500950861\ndog: 0.7848265495754562\nhorse: 0.8222948787839229\nmotorbike: 0.8057808854619948\nperson: 0.7176976451996411\npottedplant: 0.42802932547480066\nsheep: 0.6259124005994047\nsofa: 0.7840368059271103\ntrain: 0.8331588002612781\ntvmonitor: 0.6555051795079904\nAverage Precision Across All Classes:0.6860690100560214\n```\n\nThe code to re-produce the model:\n\n```bash\n# If you haven't downloaded the models, please download from https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython train_ssd.py --dataset_type voc  --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007 ~\u002Fdata\u002FVOC0712\u002FVOC2012 --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net mb2-ssd-lite --base_net models\u002Fmb2-imagenet-71_8.pth  --scheduler cosine --lr 0.01 --t_max 200 --validation_epochs 5 --num_epochs 200\n```\n\n### VGG SSD\n\nModel: vgg16-ssd-mp-0_7726.pth\n\n\n```\nAverage Precision Per-class:\naeroplane: 0.7957406334737802\nbicycle: 0.8305351156180996\nbird: 0.7570969203281721\nboat: 0.7043869846367731\nbottle: 0.5151666571756393\nbus: 0.8375121237865507\ncar: 0.8581508869699901\ncat: 0.8696185705648963\nchair: 0.6165431194526735\ncow: 0.8066422244852381\ndiningtable: 0.7629391213959706\ndog: 0.8444541531856452\nhorse: 0.8691922094815812\nmotorbike: 0.8496564646906418\nperson: 0.793785185549561\npottedplant: 0.5233462463152305\nsheep: 0.7786762429478917\nsofa: 0.8024887701948746\ntrain: 0.8713861172265407\ntvmonitor: 0.7650514925384194\nAverage Precision Across All Classes:0.7726184620009084\n```\n\nThe code to re-produce the model:\n\n```bash\nwget -P models https:\u002F\u002Fs3.amazonaws.com\u002Famdegroot-models\u002Fvgg16_reducedfc.pth\npython train_ssd.py --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007\u002F ~\u002Fdata\u002FVOC0712\u002FVOC2012\u002F --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net vgg16-ssd --base_net models\u002Fvgg16_reducedfc.pth  --batch_size 24 --num_epochs 200 --scheduler \"multi-step” —-milestones “120,160”\n```\n## Training\n\n```bash\npython train_ssd.py --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007\u002F ~\u002Fdata\u002FVOC0712\u002FVOC2012\u002F --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net mb1-ssd --base_net models\u002Fmobilenet_v1_with_relu_69_5.pth  --batch_size 24 --num_epochs 200 --scheduler cosine --lr 0.01 --t_max 200\n```\n\n\nThe dataset path is the parent directory of the folders: Annotations, ImageSets, JPEGImages, SegmentationClass and SegmentationObject. You can use multiple datasets to train.\n\n\n## Evaluation\n\n```bash\npython eval_ssd.py --net mb1-ssd  --dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --trained_model models\u002Fmobilenet-v1-ssd-mp-0_675.pth --label_file models\u002Fvoc-model-labels.txt \n```\n\n## Convert models to ONNX and Caffe2 models\n\n```bash\npython convert_to_caffe2_models.py mb1-ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth models\u002Fvoc-model-labels.txt \n```\n\nThe converted models are models\u002Fmobilenet-v1-ssd.onnx, models\u002Fmobilenet-v1-ssd_init_net.pb and models\u002Fmobilenet-v1-ssd_predict_net.pb. The models in the format of pbtxt are also saved for reference.\n\n## Retrain on Open Images Dataset\n\nLet's we are building a model to detect guns for security purpose.\n\nBefore you start you can try the demo.\n\n```bash\npython run_ssd_example.py mb1-ssd models\u002Fgun_model_2.21.pth models\u002Fopen-images-model-labels.txt ~\u002FDownloads\u002Fbig.JPG\n```\n\n![Example of Gun Detection](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fqfgaohao_pytorch-ssd_readme_66d1e3b20121.jpg)\n\n\nIf you manage to get more annotated data, the accuracy could become much higher.\n\n### Download data\n\n```bash\npython open_images_downloader.py --root ~\u002Fdata\u002Fopen_images --class_names \"Handgun,Shotgun\" --num_workers 20\n```\n\nIt will download data into the folder ~\u002Fdata\u002Fopen_images.\n\nThe content of the data directory looks as follows.\n\n```\nclass-descriptions-boxable.csv       test                        validation\nsub-test-annotations-bbox.csv        test-annotations-bbox.csv   validation-annotations-bbox.csv\nsub-train-annotations-bbox.csv       train\nsub-validation-annotations-bbox.csv  train-annotations-bbox.csv\n```\n\nThe folders train, test, validation contain the images. The files like sub-train-annotations-bbox.csv \nis the annotation file.\n\n### Retrain\n\n```bash\npython train_ssd.py --dataset_type open_images --datasets ~\u002Fdata\u002Fopen_images --net mb1-ssd --pretrained_ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth --scheduler cosine --lr 0.01 --t_max 100 --validation_epochs 5 --num_epochs 100 --base_net_lr 0.001  --batch_size 5\n```\n\nYou can freeze the base net, or all the layers except the prediction heads. \n\n```\n  --freeze_base_net     Freeze base net layers.\n  --freeze_net          Freeze all the layers except the prediction head.\n```\n\nYou can also use different learning rates \nfor the base net, the extra layers and the prediction heads.\n\n```\n  --lr LR, --learning-rate LR\n  --base_net_lr BASE_NET_LR\n                        initial learning rate for base net.\n  --extra_layers_lr EXTRA_LAYERS_LR\n```\n\nAs subsets of open images data can be very unbalanced, it also provides\na handy option to roughly balance the data.\n\n```\n  --balance_data        Balance training data by down-sampling more frequent\n                        labels.\n```\n\n### Test on image\n\n```bash\npython run_ssd_example.py mb1-ssd models\u002Fmobilenet-v1-ssd-Epoch-99-Loss-2.2184619531035423.pth models\u002Fopen-images-model-labels.txt ~\u002FDownloads\u002Fgun.JPG\n```\n\n\n## ONNX Friendly VGG16 SSD\n\n! The model is not really ONNX-Friendly due the issue mentioned here \"https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd\u002Fissues\u002F33#issuecomment-467533485\"\n\nThe Scaled L2 Norm Layer has been replaced with BatchNorm to make the net ONNX compatible.\n\n### Train\n\nThe pretrained based is borrowed from https:\u002F\u002Fs3.amazonaws.com\u002Famdegroot-models\u002Fvgg16_reducedfc.pth .\n\n```bash\npython train_ssd.py --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007\u002F ~\u002Fdata\u002FVOC0712\u002FVOC2012\u002F --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net \"vgg16-ssd\" --base_net models\u002Fvgg16_reducedfc.pth  --batch_size 24 --num_epochs 150 --scheduler cosine --lr 0.0012 --t_max 150 --validation_epochs 5\n```\n\n### Eval\n\n```bash\npython eval_ssd.py --net vgg16-ssd  --dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --trained_model models\u002Fvgg16-ssd-Epoch-115-Loss-2.819455094383535.pth --label_file models\u002Fvoc-model-labels.txt\n```\n\n## TODO\n\n1. Resnet34 Based Model.\n2. BatchNorm Fusion.\n","# PyTorch 实现的 Single Shot MultiBox Detector（单次多框检测器）\n\n本仓库实现了 [SSD（Single Shot MultiBox Detector，单次多框检测器）](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.02325)。该实现深受项目 [ssd.pytorch](https:\u002F\u002Fgithub.com\u002Famdegroot\u002Fssd.pytorch) 和 [Detectron](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FDetectron) 的影响。设计目标是模块化和可扩展性。\n\n目前，该实现包含基于 MobileNetV1、MobileNetV2 和 VGG 的 SSD\u002FSSD-Lite 版本。\n\n此外，它还支持开箱即用地在 Google Open Images 数据集上进行重新训练。\n\n![Mobile SSD 示例](readme_ssd_example.jpg  \"Mobile SSD 示例（图片由 https:\u002F\u002Fwww.pexels.com\u002F@mirit-assaf-299757 提供）\")\n\n## 依赖项\n\n1. Python 3.6+\n2. OpenCV\n3. Pytorch 1.0 或 Pytorch 0.4+\n4. Caffe2\n5. Pandas\n6. 如果要在 Google OpenImages 数据集上训练模型，需要 Boto3\n\n## 下载模型\n\n**请下载模型并将其放入 \".\u002Fmodels\" 文件夹中。以下章节将需要这些模型。** 下载地址：https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing\n\n## 运行演示\n\n### 运行实时 MobilenetV1 SSD 演示\n\n```bash\n# 如果尚未下载模型，请从 https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing 下载。\npython run_ssd_live_demo.py mb1-ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth models\u002Fvoc-model-labels.txt \n```\n\n### 在 Caffe2 中运行实时演示\n\n```bash\n# 如果尚未下载模型，请从 https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing 下载。\npython run_ssd_live_caffe2.py models\u002Fmobilenet-v1-ssd_init_net.pb models\u002Fmobilenet-v1-ssd_predict_net.pb models\u002Fvoc-model-labels.txt \n```\n\n使用 Caffe2 可以获得显著的速度提升。\n\n### 运行实时 MobileNetV2 SSD Lite 演示\n\n```bash\n# 如果尚未下载模型，请从 https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing 下载。\npython run_ssd_live_demo.py mb2-ssd-lite models\u002Fmb2-ssd-lite-mp-0_686.pth models\u002Fvoc-model-labels.txt \n```\n\n上述 MobileNetV2 SSD-Lite 模型与 ONNX 不兼容，因为它使用了 ONNX 不支持的 Relu6。代码支持 ONNX 兼容版本。一旦我使用 Relu 训练出足够好的 MobileNetV2 模型，我将上传相应的 Pytorch 和 Caffe2 模型。\n\n您可能会注意到，在 PC 上 MobileNetV2 SSD\u002FSSD-Lite 比 MobileNetV1 SSD\u002FLite 慢。然而，在移动设备上 MobileNetV2 更快。\n\n## 预训练模型\n\n### Mobilenet V1 SSD\n\n如果尚未下载模型，请从 https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing 下载。\n\n模型：mobilenet-v1-ssd-mp-0_675.pth\n\n```\nAverage Precision Per-class:\naeroplane: 0.6742489426027927\nbicycle: 0.7913672875238116\nbird: 0.612096015101108\nboat: 0.5616407126931772\nbottle: 0.3471259064860268\nbus: 0.7742298893362103\ncar: 0.7284171192326804\ncat: 0.8360675520354323\nchair: 0.5142295855384792\ncow: 0.6244090341627014\ndiningtable: 0.7060035669312754\ndog: 0.7849252606216821\nhorse: 0.8202146617282785\nmotorbike: 0.793578272243471\nperson: 0.7042670984734087\npottedplant: 0.40257147509774405\nsheep: 0.6071252282334352\nsofa: 0.7549120254763918\ntrain: 0.8270992920206008\ntvmonitor: 0.6459903029666852\n\nAverage Precision Across All Classes:0.6755\n```\n\n### MobileNetV2 SSD-Lite\n\n如果尚未下载模型，请从 https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing 下载。\n\n模型：mb2-ssd-lite-mp-0_686.pth\n\n```\nAverage Precision Per-class:\naeroplane: 0.6973327307871002\nbicycle: 0.7823755921687233\nbird: 0.6342429230125619\nboat: 0.5478160937380846\nbottle: 0.3564069147093762\nbus: 0.7882037885117419\ncar: 0.7444122242934775\ncat: 0.8198865557991936\nchair: 0.5378973422880109\ncow: 0.6186076149254742\ndiningtable: 0.7369559500950861\ndog: 0.7848265495754562\nhorse: 0.8222948787839229\nmotorbike: 0.8057808854619948\nperson: 0.7176976451996411\npottedplant: 0.42802932547480066\nsheep: 0.6259124005994047\nsofa: 0.7840368059271103\ntrain: 0.8331588002612781\ntvmonitor: 0.6555051795079904\nAverage Precision Across All Classes:0.6860690100560214\n```\n\n复现该模型的代码：\n\n```bash\n# 如果尚未下载模型，请从 https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing 下载。\npython train_ssd.py --dataset_type voc  --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007 ~\u002Fdata\u002FVOC0712\u002FVOC2012 --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net mb2-ssd-lite --base_net models\u002Fmb2-imagenet-71_8.pth  --scheduler cosine --lr 0.01 --t_max 200 --validation_epochs 5 --num_epochs 200\n```\n\n### VGG SSD\n\n模型：vgg16-ssd-mp-0_7726.pth\n\n```\nAverage Precision Per-class:\naeroplane: 0.7957406334737802\nbicycle: 0.8305351156180996\nbird: 0.7570969203281721\nboat: 0.7043869846367731\nbottle: 0.5151666571756393\nbus: 0.8375121237865507\ncar: 0.8581508869699901\ncat: 0.8696185705648963\nchair: 0.6165431194526735\ncow: 0.8066422244852381\ndiningtable: 0.7629391213959706\ndog: 0.8444541531856452\nhorse: 0.8691922094815812\nmotorbike: 0.8496564646906418\nperson: 0.793785185549561\npottedplant: 0.5233462463152305\nsheep: 0.7786762429478917\nsofa: 0.8024887701948746\ntrain: 0.8713861172265407\ntvmonitor: 0.7650514925384194\nAverage Precision Across All Classes:0.7726184620009084\n```\n\n复现该模型的代码：\n\n```bash\nwget -P models https:\u002F\u002Fs3.amazonaws.com\u002Famdegroot-models\u002Fvgg16_reducedfc.pth\npython train_ssd.py --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007\u002F ~\u002Fdata\u002FVOC0712\u002FVOC2012\u002F --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net vgg16-ssd --base_net models\u002Fvgg16_reducedfc.pth  --batch_size 24 --num_epochs 200 --scheduler \"multi-step” —-milestones “120,160”\n```\n\n## 训练\n\n```bash\npython train_ssd.py --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007\u002F ~\u002Fdata\u002FVOC0712\u002FVOC2012\u002F --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net mb1-ssd --base_net models\u002Fmobilenet_v1_with_relu_69_5.pth  --batch_size 24 --num_epochs 200 --scheduler cosine --lr 0.01 --t_max 200\n```\n\n数据集路径是以下文件夹的父目录：Annotations、ImageSets、JPEGImages、SegmentationClass 和 SegmentationObject。您可以使用多个数据集进行训练。\n\n## 评估\n\n```bash\npython eval_ssd.py --net mb1-ssd  --dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --trained_model models\u002Fmobilenet-v1-ssd-mp-0_675.pth --label_file models\u002Fvoc-model-labels.txt \n```\n\n## 将模型转换为 ONNX 和 Caffe2 模型\n\n```bash\npython convert_to_caffe2_models.py mb1-ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth models\u002Fvoc-model-labels.txt \n```\n\n转换后的模型为 models\u002Fmobilenet-v1-ssd.onnx、models\u002Fmobilenet-v1-ssd_init_net.pb 和 models\u002Fmobilenet-v1-ssd_predict_net.pb。pbtxt 格式的模型也会保存以供参考。\n\n## 在 Open Images 数据集上重新训练\n\n假设我们正在构建一个用于安全目的的枪支检测模型。\n\n在开始之前，你可以先尝试演示。\n\n```bash\npython run_ssd_example.py mb1-ssd models\u002Fgun_model_2.21.pth models\u002Fopen-images-model-labels.txt ~\u002FDownloads\u002Fbig.JPG\n```\n\n![枪支检测示例](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fqfgaohao_pytorch-ssd_readme_66d1e3b20121.jpg)\n\n\n如果你能获取更多标注数据，准确率可能会大幅提高。\n\n### 下载数据\n\n```bash\npython open_images_downloader.py --root ~\u002Fdata\u002Fopen_images --class_names \"Handgun,Shotgun\" --num_workers 20\n```\n\n数据将下载到 ~\u002Fdata\u002Fopen_images 文件夹中。\n\n数据目录的内容如下所示。\n\n```\nclass-descriptions-boxable.csv       test                        validation\nsub-test-annotations-bbox.csv        test-annotations-bbox.csv   validation-annotations-bbox.csv\nsub-train-annotations-bbox.csv       train\nsub-validation-annotations-bbox.csv  train-annotations-bbox.csv\n```\n\ntrain、test、validation 文件夹包含图像。sub-train-annotations-bbox.csv 等文件是标注文件。\n\n### 重新训练\n\n```bash\npython train_ssd.py --dataset_type open_images --datasets ~\u002Fdata\u002Fopen_images --net mb1-ssd --pretrained_ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth --scheduler cosine --lr 0.01 --t_max 100 --validation_epochs 5 --num_epochs 100 --base_net_lr 0.001  --batch_size 5\n```\n\n你可以冻结基础网络（base net），或除预测头（prediction heads）外的所有层。\n\n```\n  --freeze_base_net     冻结基础网络层。\n  --freeze_net          冻结除预测头外的所有层。\n```\n\n你还可以为基础网络、额外层和预测头使用不同的学习率。\n\n```\n  --lr LR, --learning-rate LR\n  --base_net_lr BASE_NET_LR\n                        基础网络的初始学习率。\n  --extra_layers_lr EXTRA_LAYERS_LR\n```\n\n由于 Open Images 数据的子集可能非常不平衡，它还提供了一个方便的选项来大致平衡数据。\n\n```\n  --balance_data        通过对更频繁的标签进行下采样来平衡训练数据。\n```\n\n### 在图像上测试\n\n```bash\npython run_ssd_example.py mb1-ssd models\u002Fmobilenet-v1-ssd-Epoch-99-Loss-2.2184619531035423.pth models\u002Fopen-images-model-labels.txt ~\u002FDownloads\u002Fgun.JPG\n```\n\n\n## ONNX 友好的 VGG16 SSD\n\n! 由于此处提到的问题 \"https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd\u002Fissues\u002F33#issuecomment-467533485\"，该模型实际上并不完全兼容 ONNX。\n\nScaled L2 Norm 层已被替换为 BatchNorm，以使网络兼容 ONNX。\n\n### 训练\n\n预训练基础网络借用自 https:\u002F\u002Fs3.amazonaws.com\u002Famdegroot-models\u002Fvgg16_reducedfc.pth 。\n\n```bash\npython train_ssd.py --datasets ~\u002Fdata\u002FVOC0712\u002FVOC2007\u002F ~\u002Fdata\u002FVOC0712\u002FVOC2012\u002F --validation_dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --net \"vgg16-ssd\" --base_net models\u002Fvgg16_reducedfc.pth  --batch_size 24 --num_epochs 150 --scheduler cosine --lr 0.0012 --t_max 150 --validation_epochs 5\n```\n\n### 评估\n\n```bash\npython eval_ssd.py --net vgg16-ssd  --dataset ~\u002Fdata\u002FVOC0712\u002Ftest\u002FVOC2007\u002F --trained_model models\u002Fvgg16-ssd-Epoch-115-Loss-2.819455094383535.pth --label_file models\u002Fvoc-model-labels.txt\n```\n\n## 待办事项\n\n1. 基于 ResNet34 的模型。\n2. BatchNorm 融合。","# pytorch-ssd 快速上手指南\n\n## 环境准备\n\n### 系统要求\n- Python 3.6+\n- PyTorch 1.0+（或 0.4+）\n\n### 前置依赖\n```bash\npip install opencv-python torch pandas boto3\n```\n\n> 如需训练 Google Open Images 数据集，需安装 `boto3` 用于数据下载。\n\n## 安装步骤\n\n### 1. 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd.git\ncd pytorch-ssd\n```\n\n### 2. 下载预训练模型\n从 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing) 下载模型文件，放入 `.\u002Fmodels` 目录。\n\n```bash\nmkdir -p models\n# 手动下载或使用 gdown（需安装: pip install gdown）\n```\n\n## 基本使用\n\n### 实时摄像头检测（MobileNetV1 SSD）\n\n```bash\npython run_ssd_live_demo.py mb1-ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth models\u002Fvoc-model-labels.txt\n```\n\n### 实时检测（MobileNetV2 SSD-Lite）\n\n```bash\npython run_ssd_live_demo.py mb2-ssd-lite models\u002Fmb2-ssd-lite-mp-0_686.pth models\u002Fvoc-model-labels.txt\n```\n\n### 单张图片检测\n\n```bash\npython run_ssd_example.py mb1-ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth models\u002Fvoc-model-labels.txt your_image.jpg\n```\n\n### Caffe2 加速版本\n\n```bash\npython run_ssd_live_caffe2.py models\u002Fmobilenet-v1-ssd_init_net.pb models\u002Fmobilenet-v1-ssd_predict_net.pb models\u002Fvoc-model-labels.txt\n```\n\n---\n\n### 模型转换（ONNX\u002FCaffe2）\n\n```bash\npython convert_to_caffe2_models.py mb1-ssd models\u002Fmobilenet-v1-ssd-mp-0_675.pth models\u002Fvoc-model-labels.txt\n```\n\n输出文件：\n- `models\u002Fmobilenet-v1-ssd.onnx`\n- `models\u002Fmobilenet-v1-ssd_init_net.pb`\n- `models\u002Fmobilenet-v1-ssd_predict_net.pb`","某智能安防创业公司需要为老旧小区开发一套\"电动车进电梯自动识别报警系统\"，要求在边缘设备（如海思Hi3519芯片）上实时运行，且开发周期只有6周。\n\n### 没有 pytorch-ssd 时\n\n- 团队从零实现SSD算法，需手写多尺度特征提取、先验框生成、NMS后处理等模块，预计耗时3周以上，且容易引入边界框回归的数值稳定性bug\n- 目标平台算力仅2Tops，直接移植通用检测模型（如YOLOv5s）推理速度不足5FPS，无法满足电梯场景实时性要求\n- 缺乏Open Images数据集的预训练权重，团队需自行标注数万张电梯场景图片，数据准备成本高昂\n- 模型部署时需手动转换Caffe格式，中间出现Conv-ReLU6算子不支持问题，反复调试消耗1周时间\n\n### 使用 pytorch-ssd 后\n\n- 直接调用`mb2-ssd-lite`实现，模块化设计让团队2天内完成模型搭建，专注业务逻辑而非底层算法复现\n- MobileNetV2 SSD-Lite在同等输入分辨率下推理速度提升至22FPS，满足电梯摄像头实时检测需求，且mAP@0.5达到68.6%\n- 利用开箱即用的Open Images重训练接口，仅用500张电梯场景图片微调，3天即完成模型适配，识别\"电动车\"类别准确率达94%\n- 一键导出Caffe2模型并通过`run_ssd_live_caffe2.py`验证，ONNX兼容性支持后续无缝迁移到海思NNIE推理引擎\n\npytorch-ssd 让边缘AI检测项目从\"算法研究\"变为\"工程配置\"，6周内完成从原型到量产部署的全流程。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fqfgaohao_pytorch-ssd_66d1e3b2.jpg","qfgaohao","Hao","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fqfgaohao_6574254c.png",null,"Auckland NZ","qfgaohao@gmail.com","https:\u002F\u002Fgithub.com\u002Fqfgaohao",[84],{"name":85,"color":86,"percentage":87},"Python","#3572A5",100,1430,541,"2026-04-05T15:51:29","MIT","未说明","未说明（支持 CPU 运行，Caffe2 模式可加速）",{"notes":95,"python":96,"dependencies":97},"1. 需从 Google Drive 下载预训练模型文件至 .\u002Fmodels 目录；2. 支持 MobileNetV1\u002FV2 和 VGG 骨干网络的 SSD\u002FSSD-Lite 实现；3. 提供 ONNX 和 Caffe2 模型转换功能；4. 支持在 Google Open Images 数据集上重新训练；5. MobileNetV2 SSD-Lite 默认使用 ReLU6（非 ONNX 兼容），但代码支持 ONNX 兼容版本；6. 训练时可冻结基础网络或仅训练预测头，支持分层学习率设置","3.6+",[98,99,100,101,102],"torch>=0.4","opencv-python","caffe2","pandas","boto3",[14,13],[105,106,107,108],"ssd","pytorch","open-images","object-detection","2026-03-27T02:49:30.150509","2026-04-06T08:45:32.221287",[112,117,122,127,132],{"id":113,"question_zh":114,"answer_zh":115,"source_url":116},4339,"训练时出现验证回归损失为无穷大（inf）的问题如何解决？","这个问题通常与模型实现有关。建议参考以下两个替代实现来排查问题：\n1. 原始 SSD 实现：https:\u002F\u002Fgithub.com\u002Famdegroot\u002Fssd.pytorch\n2. 重写版本：https:\u002F\u002Fgithub.com\u002Fsacmehta\u002FEdgeNets\n\n可以将你的模型集成到上述代码库中进行测试，以定位错误来源。","https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd\u002Fissues\u002F21",{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},4340,"无法复现 VGG16 SSD 的 mAP 指标怎么办？","常见原因是预训练 VGG16 模型加载错误。请检查：\n1. 确保预训练模型正确加载\n2. 确认使用的评估指标方法（如 use_voc2007_metric）\n\n用户反馈修正预训练模型加载方式后，即可达到预期性能。","https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd\u002Fissues\u002F70",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},4341,"Windows 上出现 \"Can't pickle local object\" 多进程错误如何解决？","Windows 系统下 multiprocessing 的 pickle 问题，有两种解决方案：\n\n**方案一（简单但较慢）：**\n设置 `num_workers = 0`\n\n**方案二（推荐，更快）：**\n1. 保持 `num_workers = 4`\n2. 修改 `data_preprocessing.py` 中的 `TrainAugmentation`，将 lambda 表达式：\n   `lambda img, boxes=None, labels=None: (img \u002F std, boxes, labels)`\n   替换为函数调用 `ScaleStd(std)`\n3. 在 `transforms.py` 中添加对应的 `ScaleStd` 函数\n4. 在 `train_ssd.py` 中添加保护代码：\n   ```python\n   if __name__ == '__main__':\n       main()\n   ```\n\n性能对比：num_workers=0 时约 77秒\u002F100步，num_workers=4 时约 25秒\u002F100步。","https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd\u002Fissues\u002F19",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},4342,"Python 版本低于 3.6 时出现 f-string 语法错误如何解决？","代码使用了 Python 3.6+ 的 f-string 特性，低版本会出现 SyntaxError。解决方案：\n\n**方案一：升级 Python**\n升级到 Python 3.6 或更高版本\n\n**方案二：使用 future-fstrings（可能不稳定）**\n```bash\npip install future-fstrings\n```\n然后在代码文件顶部添加：\n```python\n# coding: future_fstrings\n```\n\n**方案三：手动替换 f-string**\n将所有 `f\"...\"` 格式替换为传统的字符串格式化方法，如 `str.format()` 或 `%` 格式化。\n\n注意：方案二对某些复杂用法（如列表中的 f-string）可能无效。","https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd\u002Fissues\u002F1",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},4343,"出现 \"IndexError: too many indices for array\" 错误如何解决？","此错误通常发生在 `voc_dataset.py` 的 `__getitem__` 方法中，原因是 `box_a` 或 `box_b` 为空数组（没有检测到任何目标对象）。\n\n排查步骤：\n1. 在 `image = self._read_image(image_id)` 行前添加打印语句，检查 `boxes` 的形状\n2. 确认是否为 empty array\n3. 检查类别标签配置是否正确，必要时修改 classes labels\n\n如果是自定义数据集，请确保标注文件格式正确且包含有效的边界框信息。","https:\u002F\u002Fgithub.com\u002Fqfgaohao\u002Fpytorch-ssd\u002Fissues\u002F62",[]]