Loading...

文章背景图

mmdetection 保姆级部署教程:OpenMMLab 目标检测工具箱,主流算法一站式实现

2026-11-09
1
- 字
- 分钟
|

mmdetection

[{"source":{"position":0,"lines":["<h1 id="mmdetection">mmdetection 保姆级部署教程:<img src="resources/mmdet-logo.png" width="600"/>","

mmdetection(仓库 <a href="https://github.com/open-mmlab/mmdetection">open-mmlab/mmdetection)<img src="resources/mmdet-logo.png" width="600"/>。本文基于官方 README 整理,从零开始带你完成环境搭建、配置、启动与日常使用全流程。

","

<img alt="mmdetection 官方预览图" src="/upload/_cover_mmdetection.png"/>

"]},"target":{"position":0,"lines":["<h1 id="mmdetection">mmdetection 保姆级部署教程:<img src="resources/mmdet-logo.png" width="600" />","

mmdetection(仓库 <a href="https://github.com/open-mmlab/mmdetection" target="_blank" rel="noopener">open-mmlab/mmdetection)<img src="resources/mmdet-logo.png" width="600" />。本文基于官方 README 整理,从零开始带你完成环境搭建、配置、启动与日常使用全流程。

","

<img alt="mmdetection 官方预览图" src="/upload/_cover_mmdetection.png" />

"]},"type":"CHANGE"},{"source":{"position":4,"lines":["

mmdetection 是一款开源项目,<img src="resources/mmdet-logo.png" width="600"/>。它解决了实际开发和运维中的具体痛点,无论是个人开发者还是团队使用,都可以快速自托管部署,掌握数据自主权。

"]},"target":{"position":4,"lines":["

mmdetection 是一款开源项目,<img src="resources/mmdet-logo.png" width="600" />。它解决了实际开发和运维中的具体痛点,无论是个人开发者还是团队使用,都可以快速自托管部署,掌握数据自主权。

"]},"type":"CHANGE"},{"source":{"position":136,"lines":["
<code
class="language-bash">sudo tee
/etc/systemd/system/mmdetection.service
<<EOF","[Unit]","Description=mmdetection
Service","After=network.target","","[Service]","Type=simple","WorkingDirectory=/opt/mmdetection","ExecStart=/opt/mmdetection/start.sh","Restart=always","RestartSec=5","User=www-data","","[Install]","WantedBy=multi-user.target","EOF","","sudo
systemctl daemon-reload","sudo systemctl enable --now
mmdetection","
"]},"target":{"position":136,"lines":["
<code
class="language-bash">sudo tee
/etc/systemd/system/mmdetection.service <<eof [unit]
description="mmdetection" service after="network.target" [service]
type="simple" workingdirectory="/opt/mmdetection"
execstart="/opt/mmdetection/start.sh" restart="always" restartsec="5"
user="www-data" [install] wantedby="multi-user.target" eof sudo
systemctl daemon-reload sudo systemctl enable --now mmdetection <
code>
"]},"type":"CHANGE"},{"source":{"position":210,"lines":["- <a href="https://github.com/open-mmlab/mmdetection">GitHub 仓库","- <a href="https://github.com/open-mmlab/mmdetection/blob/main/README.md\">官方 README"]},"target":{"position":191,"lines":["- <a href="https://github.com/open-mmlab/mmdetection" target="_blank" rel="noopener">GitHub 仓库","- <a href="https://github.com/open-mmlab/mmdetection/blob/main/README.md" target="_blank" rel="noopener">官方 README"]},"type":"CHANGE"}]

安装部署(实操步骤)

1. 前置准备

  • 项目仓库:open-mmlab/mmdetection(https://github.com/open-mmlab/mmdetection)
  • 需要本机具备 Git;按项目语言准备对应运行时(Python / Node.js / Go / Java 等)
  • 建议先在本机或测试服务器上跑通,再部署到生产环境
  • 遇到依赖版本问题时,以仓库 README 与 Releases 说明为准

3. 部署流程

  1. 克隆仓库:git clone https://github.com/open-mmlab/mmdetection
  2. 进入目录后按上面的官方命令安装依赖
  3. 参考 README 的配置说明填写配置文件或环境变量
  4. 按官方说明启动服务,确认监听端口与访问地址
  5. 浏览器访问验证功能,确认无报错后再开放外网

4. 常见问题排查

  • 依赖安装失败:先升级包管理器,再确认运行时版本符合 README 要求
  • 启动报端口占用:修改配置中的端口或释放被占用端口
  • 页面打不开:检查防火墙 / 安全组是否放行对应端口
  • 功能异常:查看运行日志,对照 Issues 中同类问题处理

5. 官方链接

评论交流

文章目录