Back to MCP directory
publicPublicdnsLocal runtime

YOLO Computer Vision

YOLO MCP服务是一个强大的计算机视觉服务,通过模型上下文协议(MCP)与Claude AI集成,提供物体检测、分割、分类和实时摄像头分析功能。

article

README

🚀 YOLO 服务使用指南

本指南详细介绍了如何安装、配置和使用 YOLO 模型进行图像分析,涵盖从基础操作到高级功能的完整流程,助您高效利用 YOLO 模型开展图像相关工作。

🚀 快速开始

本指南将引导您完成 YOLO 模型的安装、配置和使用,让您能够快速上手进行图像分析。

📦 安装指南

1. 环境搭建

在开始之前,请确保已安装 Python3 及以下依赖项:

pip install -r requirements.txt

2. 模型下载

将 YOLO 预训练模型下载到models/目录下。支持的模型包括但不限于:

  • yolov8n.pt
  • yolov8s.pt
  • yolov8m.pt
  • yolov8l.pt

✨ 主要特性

  • 自动硬件适配:服务将自动检测并使用可用硬件(CPU 或 GPU)进行推理。
  • 丰富功能支持:涵盖图像分析基础操作、物体检测、综合图像分析、图像分割和图像分类等功能。

💻 使用示例

基础用法

检查服务状态

<function_calls>
<invoke name="test_connection">
</invoke>

列出支持的模型目录

<function_calls>
<invoke name="get_model_directories">
</invoke>

使用默认模型进行检测

<function_calls>
<invoke name="analyze_image_from_path">
<parameter name="image_path">/path/to/your/image.jpg</parameter>
<parameter name="confidence">0.3</parameter>
</invoke>

高级用法

指定特定模型进行检测

<function_calls>
<invoke name="analyze_image_from_path">
<parameter name="image_path">/path/to/your/image.jpg</parameter>
<parameter name="model_name">yolov8n.pt</parameter>
<parameter name="confidence">0.4</parameter>
</invoke>

综合图像分析

<function_calls>
<invoke name="comprehensive_image_analysis">
<parameter name="image_path">/path/to/your/image.jpg</parameter>
<parameter name="confidence">0.3</parameter>
</invoke>

图像分割

<function_calls>
<invoke name="segment_objects">
<parameter name="image_data">/path/to/your/image.jpg</parameter>
<parameter name="is_path">true</parameter>
<parameter name="model_name">yolov8n-seg.pt</parameter>
</invoke>

图像分类

<function_calls>
<invoke name="classify_image">
<parameter name="image_data">/path/to/your/image.jpg</parameter>
<parameter name="is_path">true</parameter>
<parameter name="model_name">yolov8n-cls.pt</parameter>
<parameter name="top_k">5</parameter>
</invoke>

🔧 技术细节

设备支持

服务将自动检测并使用可用硬件(CPU 或 GPU)进行推理,以提高处理效率。

故障排除

模型加载失败

  • 确保模型文件存在且路径正确。
  • 检查 Python 环境是否满足最低版本要求。

性能问题

  • 建议使用更高性能的硬件(如 NVIDIA GPU)。
  • 调整模型大小(从nl)以匹配计算资源。

📚 详细文档

注意事项

⚠️ 重要提示

  1. 所有图像路径均需为绝对路径。
  2. 参数值范围请参考具体文档说明。
  3. 保持服务端口畅通,避免防火墙拦截。

通过以上步骤,您可以顺利完成 YOLO 模型的部署与使用。如需进一步帮助,请参阅完整文档或联系技术支持团队。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client