关于 Dino X 图像检测 (image Detection)
DINO-X MCP 服务将 DINO-X 和 Grounding DINO 的图像理解能力提供给多模态应用。通过本地 STDIO 或 Streamable HTTP 返回物体位置、类别、数量、属性、描述和人体姿态关键点。
主要功能
- 01全场景物体检测
- 02文本提示物体检测
- 03人体姿态关键点检测
- 04可选检测描述
- 05本地保存标注图像
适用场景
- 01定位并统计图像中的物体
- 02查找符合文字描述的物体
- 03分析人体姿态关键点
- 04在本地保存检测标注结果
MCP 相关
向 MCP 客户端提供图像检测、文本引导检测、姿态估计工具,以及仅限 STDIO 的结果可视化工具。支持 STDIO 和 Streamable HTTP 传输。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
4收录的工具列表 · 更新于 3 周前
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| imageFileUri | string | 是 | 输入图像的 URI。远程或本地文件优先使用此项。必须以 'https://' 或 'file://' 开头。 |
| textPrompt | string | 是 | 目标物体的名词(仅限英文,避免使用形容词)。多个类别之间用句点分隔(例如,'person.car.traffic light')。 |
| includeDescription | boolean | 是 | 是否返回图像中检测到的物体的描述;启用后处理时间会更长。 |
详细介绍
DINO-X MCP 服务
English | 中文
DINO-X 官方 MCP 服务由 DINO-X 和 Grounding DINO 模型提供支持,为多模态应用带来精细的目标检测和图像理解能力。
为什么选择 DINO-X MCP?
借助 DINO-X MCP,您可以:
-
精细理解:完整图像检测、目标检测和区域级描述。
-
结构化输出:获取目标类别、数量、位置和属性,用于 VQA 和多步推理任务。
-
可组合:与其他 MCP 服务无缝协作,构建端到端视觉 Agent 或自动化流水线。
传输模式
DINO-X MCP 支持两种传输模式:
| 特性 | STDIO(默认) | Streamable HTTP |
|---|---|---|
| 运行环境 | 本地 | 本地或云端 |
| 传输方式 | 标准输入/输出 | HTTP(流式响应) |
| 输入来源 | file:// 和 https:// | 仅 https:// |
| 可视化 | 支持(在本地保存标注图像) | 不支持(暂不支持) |
快速开始
1. 准备 MCP 客户端
任何兼容 MCP 的客户端均可使用,例如:
2. 获取 API 密钥
在 DINO-X 平台申请:申请 API 密钥(新用户可获得免费额度)。
3. 配置 MCP
选项 A:官方托管的 Streamable HTTP(推荐)
添加到 MCP 客户端配置中,并替换为您的 API 密钥:
{
"mcpServers": {
"dinox-mcp": {
"url": "https://mcp.deepdataspace.com/mcp?key=your-api-key"
}
}
}
选项 B:在本地使用 NPM 包(STDIO)
先安装 Node.js
-
从 nodejs.org 下载安装程序
-
或使用命令:
# macOS / Linux
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# or
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# load nvm into current shell (choose the one you use)
source ~/.bashrc || true
source ~/.zshrc || true
# install and use LTS Node.js
nvm install --lts
nvm use --lts
# Windows (one of the following)
winget install OpenJS.NodeJS.LTS
# or with Chocolatey (in admin PowerShell)
iwr -useb https://raw.githubusercontent.com/chocolatey/chocolatey/master/chocolateyInstall/InstallChocolatey.ps1 | iex
choco install nodejs-lts -y
配置 MCP 客户端:
{
"mcpServers": {
"dinox-mcp": {
"command": "npx",
"args": ["-y", "@deepdataspace/dinox-mcp"],
"env": {
"DINOX_API_KEY": "your-api-key-here",
"IMAGE_STORAGE_DIRECTORY": "/path/to/your/image/directory"
}
}
}
}
注意:将 your-api-key-here 替换为您的真实密钥。
选项 C:在本地从源代码运行
确保已安装 Node.js(参见选项 B),然后:
# clone
git clone https://github.com/IDEA-Research/DINO-X-MCP.git
cd DINO-X-MCP
# install deps
npm install
# build
npm run build
配置 MCP 客户端:
{
"mcpServers": {
"dinox-mcp": {
"command": "node",
"args": ["/path/to/DINO-X-MCP/build/index.js"],
"env": {
"DINOX_API_KEY": "your-api-key-here",
"IMAGE_STORAGE_DIRECTORY": "/path/to/your/image/directory"
}
}
}
}
CLI 标志和环境变量
-
常用标志
--http:以 Streamable HTTP 模式启动(否则默认使用 STDIO)--stdio:强制使用 STDIO 模式--dinox-api-key=...:设置 API 密钥--enable-client-key:允许通过 URL?key=传入 API 密钥(仅限 Streamable HTTP)--port=8080:HTTP 端口(默认 3020)
-
环境变量
DINOX_API_KEY(必需/有条件必需):DINO-X 平台 API 密钥IMAGE_STORAGE_DIRECTORY(可选,STDIO):用于保存标注图像的目录AUTH_TOKEN(可选,HTTP):如果已设置,客户端必须发送Authorization: Bearer <token>
示例:
# STDIO (local)
node build/index.js --dinox-api-key=your-api-key
# Streamable HTTP (server provides a shared API key)
node build/index.js --http --dinox-api-key=your-api-key
# Streamable HTTP (custom port)
node build/index.js --http --dinox-api-key=your-api-key --port=8080
# Streamable HTTP (require client-provided API key via URL)
node build/index.js --http --enable-client-key
使用 ?key= 时的客户端配置:
{
"mcpServers": {
"dinox-mcp": {
"url": "http://localhost:3020/mcp?key=your-api-key"
}
}
}
通过注入 Authorization: Bearer <token> 的网关使用 AUTH_TOKEN:
AUTH_TOKEN=my-token node build/index.js --http --enable-client-key
使用 supergateway 的客户端示例:
{
"mcpServers": {
"dinox-mcp": {
"command": "npx",
"args": [
"-y",
"supergateway",
"--streamableHttp",
"http://localhost:3020/mcp?key=your-api-key",
"--oauth2Bearer",
"my-token"
]
}
}
}
工具
| 能力 | 工具 ID | 传输方式 | 输入 | 输出 |
|---|---|---|---|---|
| 全场景目标检测 | detect-all-objects | STDIO / HTTP | 图像 URL | 类别 + 边界框 +(可选)说明 |
| 文本提示目标检测 | detect-objects-by-text | STDIO / HTTP | 图像 URL + 英文名词(多个名词用点分隔,例如 person.car) | 目标对象边界框 +(可选)说明 |
| 人体姿态估计 | detect-human-pose-keypoints | STDIO / HTTP | 图像 URL | 17 个关键点 + 边界框 +(可选)说明 |
| 可视化 | visualize-detection-result | 仅 STDIO | 图像 URL + 检测结果数组 | 已标注图像的本地路径 |
🎬 使用场景
| 🎯 场景 | 📝 输入 | ✨ 输出 |
|---|---|---|
| 检测与定位 | 💬 提示词:Detect and visualize the fire areas in the forest 🖼️ 输入图像: | |
| 对象计数 | 💬 提示词:Please analyze thiswarehouse image, detectall the cardboard boxes,count the total number🖼️ 输入图像: | |
| 特征检测 | 💬 提示词:Find all red carsin the image🖼️ 输入图像: | |
| 属性推理 | 💬 提示词:Find the tallest personin the image, describetheir clothing🖼️ 输入图像: | |
| 全场景检测 | 💬 提示词:Find the fruit withthe highest vitamin Ccontent in the image🖼️ 输入图像: | 答案:猕猴桃(93mg/100g) |
| 姿态分析 | 💬 提示词:Please analyze whatyoga pose this is🖼️ 输入图像: |
常见问题
- 支持哪些图像来源?
- STDIO:
file://和https:// - Streamable HTTP:仅
https://
- STDIO:
- 支持哪些图像格式?
- jpg、jpeg、webp、png
开发与调试
开发期间使用监视模式自动重新构建:
npm run watch
使用 MCP Inspector 进行调试:
npm run inspector
许可证
Apache License 2.0
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。