
MCP服务器将PlantCV暴露为测量工具——植物性状及其测量来源的分段叠加层
概览
作为MCP的PlantCV:它返回植物性状编号,且在分段退化时拒绝返回编号。 非官方。与唐纳德·丹福斯植物科学中心或PlantCV维护者无关联、不认可或赞助。详见通知。 下面的两张图片来自同一个文件和相同的阈值方法——唯一的区别是一个参数。 右边的失败正是这个服务器存在的目的。没有图片,两个测试都返回了十七个特征,单位正确且幅度完全可信。右边那个测量植物后面的墙壁。 红色标记了被测量的像素;一条青色线条沿着遮罩的边界画在遮罩边缘像素上,这样它从未接触到任何未遮罩的物体(仅红色调在红豆照片上是看不见的)。 segment() 返回覆盖层和诊断,但 。
概述(AI 翻译)
plantcv-mcp 是一个 MCP 服务器,允许 AI 代理运行 PlantCV 植物 表型分析。它返回性状编号及其测量时的分段叠加层,以及 当分段退化时,拒绝返回数字。
左侧,channel="a", object_type="dark":遮罩覆盖画面的3.1%,9个组件,
area=32427。**对,channel="s", object_type="dark":面罩覆盖96.1%;它是
背景,area=1007829。
你为什么要有叠加层
两张图像来自同一个文件和相同的阈值方法;只有通道不同。 没有图片时,两次运行都返回了17个特征,单位正确且可信 大小。右边那个正在测量植物后面的墙。红色标记 测量像素;一条青色线条沿着遮罩的边缘描绘。
所以 segment() 返回覆盖层和诊断,但没有特征,而且 measure() 需要
session_id segment() 铸币:在你看到图像之前,不会被测量。该
例外是measure_images(),它对最多200张图片应用一个配方,且不加叠加。
先在一张图片的叠加层上确定配方(服务器不会检查);每张图片都静止不动
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
plantcv-mcp
plantcv-mcp is an MCP server that lets AI agents run PlantCV plant phenotyping. It returns trait numbers and the segmentation overlay they were measured from, and refuses to return numbers when the segmentation is degenerate.
Left, channel="a", object_type="dark": the mask covers 3.1% of the frame, 9 components,
area=32427. Right, channel="s", object_type="dark": the mask covers 96.1%; it is the
background, area=1007829.
Why you get the overlay
Both images come from the same file and the same threshold method; only the channel differs. Without the picture, both runs return 17 traits with correct units and believable magnitudes. The one on the right is measuring the wall behind the plants. Red marks the measured pixels; a cyan line traces the mask’s edge.
So segment() returns the overlay and diagnostics but no traits, and measure() needs the
session_id that segment() mints: no single image is measured before you are shown it. The
exception is measure_images(), which applies one recipe to up to 200 images without overlays.
Settle the recipe on one image’s overlay first (the server does not check); every image still
passes the segment() guards, and one that trips a blocking guard gets no traits.
Measured with PlantCV 4.11.3 on a synthetic render (first row:
tests/fixtures/multi_specimen.png) and on photographs, each of these returns believable
numbers with correct units:
| Failure | What you get without the overlay |
|---|
安装
uvx --python 3.13 plantcv-mcp配置
{ "mcpServers": { "plantcv": { "command": "uvx", "args": ["--python", "3.13", "plantcv-mcp"] } } }