GM

groundlight/mcp-vision

Deployment & DevOps

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

64 stars 14 forks Качество 59 Тренд 0MIT

groundlight/mcp-vision - кандидат на сервер MCP, импортированный из https://github.com/groundlight/mcp-vision.

Обзор

groundlight/mcp-vision - кандидат на сервер MCP, импортированный из https://github.com/groundlight/mcp-vision.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP), разоблачающий модели компьютерного зрения HuggingFace, такие как обнаружение объектов с нулевым выстрелом, в качестве инструментов, повышающих возможности видения больших языков или моделей языка зрения.

Этот репо находится в активном развитии. Ниже приведены подробности имеющихся в настоящее время инструментов.

##Установка

Клонировать репо:

Создайте локальное изображение докера:

Настройка Claude Desktop

Добавьте это к своему [0]:

Если ваша локальная среда имеет доступ к графическому процессору NVIDIA:

Или только CPU:

При работе на CPU модель обнаружения крупных объектов по умолчанию занимает много времени, чтобы просчитать и сделать вывод. Подумайте об использовании модели меньшего размера как DEFAULT_OBJDET_MODEL (вы можете сказать Клоду напрямую, чтобы он также использовал конкретную модель).

(Бета) Можно запускать публичное изображение докера напрямую, не создавая локально, однако время загрузки может помешать загрузке сервера Клодом.

Инструменты

В настоящее время через сервер mcp-vision доступны следующие инструменты:

  1. locate objects Описание: Обнаружение и нахождение объектов на изображении с использованием одного из доступных трубопроводов обнаружения объектов с нулевым выстрелом Скриншоты из игры HuggingFace (список для справки https://huggingface.)

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

mcp-vision by

A Model Context Protocol (MCP) server exposing HuggingFace computer vision models such as zero-shot object detection as tools, enhancing the vision capabilities of large language or vision-language models.

This repo is in active development. See below for details of currently available tools.

Installation

Clone the repo:

git clone [email protected]:groundlight/mcp-vision.git

Build a local docker image:

cd mcp-vision
make build-docker

Configuring Claude Desktop

Add this to your claude_desktop_config.json:

If your local environment has access to a NVIDIA GPU:

"mcpServers": {
  "mcp-vision": {
    "command": "docker",
    "args": ["run", "-i", "--rm", "--runtime=nvidia", "--gpus", "all", "mcp-vision"],
	"env": {}
  }
}

Or, CPU only:

"mcpServers": {
  "mcp-vision": {
    "command": "docker",
    "args": ["run", "-i", "--rm", "mcp-vision"],
	"env": {}
  }
}

When running on CPU, the default large-size object detection model make take a long time to laod and run inference. Consider using a smaller model as DEFAULT_OBJDET_MODEL (you can tell Claude directly to use a specific model too).

(Beta) It is possible to run the public docker image directly without building locally, however the download time may interfere with Claude’s loading of the server.

"mcpServers": {
  "mcp-vision": {
    "command": "docker",
    "args": ["run", "-i", "--rm", "--runtime=nvidia", "--gpus", "all", "groundlight/mcp-vision:latest"],
	"env": {}
  }
}

Tools

The following tools are currently available through the mcp-vision server:

  1. locate_objects
  • Description: Detect and locate objects in an image using one of the zero-shot object detection pipelines available through HuggingFace (list for reference [https://huggingface.co/models?pipeline_tag=zero-shot-object-detection&sort=trending]).
  • Input: image_path (string) URL or file path, candidate_labels (list of strings) list of possible objects to detect, hf_model (optional string), will use "google/owlvit-large-patch14" by default, which could be slow on a non-GPU machine
  • Returns: List of dicts in HF object-detection format
  1. zoom_to_object
  • Description: Zoom into an object in the image, allowing you to analyze it more closely. Crop image to the object bounding box and return the cropped image. If many objects are present in the image, will return the ‘best’ one as represented by object score.
Открыть полный README на GitHub

Установка

docker run -i --rm --runtime=nvidia --gpus all mcp-vision
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

"mcpServers": { "mcp-vision": { "command": "docker", "args": ["run", "-i", "--rm", "--runtime=nvidia", "--gpus", "all", "mcp-vision"], "env": {} } }