植物物种识别技能
by @smyx-sunjinhui
Accurately identifies plant species from images based on deep learning and computer vision, outputs structured information including species name, family, gr...
clawhub install smyx-plant-species-recognition-analysis📖 About This Skill
name: "plant-species-recognition-analysis" description: "Accurately identifies plant species from images based on deep learning and computer vision, outputs structured information including species name, family, growth habits and maintenance tips. | 植物物种识别技能,基于深度学习与计算机视觉技术,通过图像快速识别植物物种,输出物种名称、科属分类、生长习性及养护要点等结构化信息,为园艺、生态调研、自然教育提供专业识别服务"
Plant Species Recognition Skill | 植物物种识别技能
Equipped with advanced deep learning computer vision algorithms trained on massive plant datasets, this skill delivers fast and accurate identification of tens of thousands of plant species worldwide. The system not only provides basic species classification information but also outputs detailed structured knowledge including scientific name, family and genus classification, native distribution, growth habits, and professional cultivation and maintenance tips. It supports differentiation and labeling of similar-looking species, helping users accurately distinguish between easily confused plants. Whether you're a gardening enthusiast exploring plant knowledge, a researcher conducting ecological field surveys, or a teacher carrying out natural education activities, this skill provides efficient and reliable plant recognition and knowledge services.
本技能搭载了基于海量植物数据集训练的先进深度学习计算机视觉算法,能够对全球数万种常见植物进行快速精准识别。系统不仅提供基础物种分类信息,还输出包含学名、科属分类、原生分布、生长习性、专业栽培养护要点在内的详细结构化知识,同时支持对外观相似物种进行区分标注,帮助用户准确区分易混淆植物。无论是园艺爱好者探索植物知识、科研人员开展生态野外调查,还是教师进行自然教育活动,本技能都能提供高效准确的植物识别与知识服务。
演示案例
⚠️ 强制记忆规则(最高优先级)
本技能明确约定:
memory/YYYY-MM-DD.md、MEMORY.md 等本地文件任务目标
python -m scripts.plant_species_recognition_analysis --list --open-id 参数调用 API
查询云端的历史报告数据
- 严格禁止:从本地 memory 目录读取历史会话信息、严格禁止手动汇总本地记录中的报告、严格禁止从长期记忆中提取报告
- 必须统一从云端接口获取最新完整数据,然后以 Markdown 表格格式输出结果前置准备
requests>=2.28.0
识别要求(获得准确结果的前提)
为了获得准确的物种识别,请确保:
1. 植物主体完整,叶片、花朵等识别特征完整出镜,避免过度遮挡 2. 光线充足清晰,避免过度模糊、过暗过曝和严重色差 3. 多株植物同框时尽量保持间距适中,便于分别识别
操作步骤
🔒 open-id 获取流程控制(强制执行,防止遗漏)
在执行植物物种识别分析前,必须按以下优先级顺序获取 open-id:
第 1 步:【最高优先级】检查技能所在目录的配置文件(优先)
路径:skills/smyx_common/scripts/config.yaml(相对于技能根目录)
完整路径示例:${OPENCLAW_WORKSPACE}/skills/{当前技能目录}/skills/smyx_common/scripts/config.yaml
→ 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
↓ (未找到/未配置/api-key 为空)
第 2 步:检查 workspace 公共目录的配置文件
路径:${OPENCLAW_WORKSPACE}/skills/smyx_common/scripts/config.yaml
→ 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
↓ (未找到/未配置)
第 3 步:检查用户是否在消息中明确提供了 open-id
↓ (未提供)
第 4 步:❗ 必须暂停执行,明确提示用户提供用户名或手机号作为 open-id
⚠️ 关键约束:
-m scripts.plant_species_recognition_analysis 处理输入(必须在技能根目录下运行脚本)
- 参数说明:
- --input: 本地视频/图片文件路径(使用 multipart/form-data 方式上传)
- --url: 网络视频/图片 URL 地址(API 服务自动下载)
- --open-id: 当前用户的 open-id(必填,按上述流程获取)
- --list: 显示历史植物物种识别分析报告列表清单(可以输入起始日期参数过滤数据范围)
- --api-key: API 访问密钥(可选)
- --api-url: API 服务地址(可选,使用默认值)
- --detail: 输出详细程度(basic/standard/json,默认 json)
- --output: 结果输出文件路径(可选)
4. 查看分析结果
- 接收结构化的植物物种识别分析报告
- 包含:输入基本信息、检测到的植物数量、物种名称、科属分类、生长习性、养护要点、识别置信度资源索引
注意事项
植物物种识别报告-{记录id}形式拼接, "点击查看"
列使用
🔗 查看报告
格式的超链接,用户点击即可直接跳转到对应的完整报告页面。
使用示例
# 识别本地视频/图片中的植物(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.plant_species_recognition_analysis --input /path/to/plant.mp4 --open-id openclaw-control-ui识别网络视频/图片(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.plant_species_recognition_analysis --url https://example.com/flower.mp4 --open-id openclaw-control-ui显示历史识别报告/显示识别报告清单列表/显示历史植物识别(自动触发关键词:查看历史识别报告、历史报告、识别报告清单等)
python -m scripts.plant_species_recognition_analysis --list --open-id openclaw-control-ui输出精简报告
python -m scripts.plant_species_recognition_analysis --input plant.jpg --open-id your-open-id --detail basic保存结果到文件
python -m scripts.plant_species_recognition_analysis --input plant.jpg --open-id your-open-id --output result.json