Install
openclaw skills install smyx-fish-isolation-detection-analysisThrough fixed cameras on aquariums, the system continuously tracks the 2D position of each fish in the school, computes the school centroid (center of mass), and measures the distance from each fish to the centroid (in units of fish body length). When a fish drifts more than 10 body lengths away from the school center and the state lasts longer than 1 hour (or a user-defined threshold), the system outputs an 'isolation behavior' alert. This skill helps early detection of bullied, sick (e.g. parasites, bacterial infections), spawning-period solitary or environment-distressed (e.g. strong water flow, temperature gradient) individuals, prompting aquarists to inspect and intervene. Application scenarios: home aquariums, public aquariums, aquaculture ponds, quarantine tanks. The system monitors continuously and pushes reminders when prolonged isolated fish is found. Skill features: prolonged isolation is often an early signal of disease (e.g. external parasites, digestive issues) or stress from bullying. AI-based automatic identification of isolation behavior helps aquarists detect sick fish early and isolate for treatment, reducing whole-tank infection risk. This skill can be integrated into smart aquarium cameras to enhance product behavior-analysis capability. | 通过鱼缸固定摄像头,持续跟踪鱼群中每条鱼的二维位置,计算鱼群中心(质心),并检测每条鱼与中心的距离(以鱼体长为单位)。当某条鱼偏离鱼群中心超过 10 倍体长,且持续时间超过 1 小时(或用户设定阈值)时,输出'离群行为'提示。该技能有助于早期发现被欺凌、生病(如寄生虫、细菌感染)、产卵期孤立或环境不适(如水流过强、温度不均)的个体,提醒养鱼者及时检查干预。应用场景:家庭鱼缸、水族馆、水产养殖池、检疫缸。系统连续监测,当发现长期离群鱼只时推送提醒。技能特点:鱼只长期离群往往是疾病的早期信号(如体表寄生虫、消化问题),或受欺凌导致应激。通过 AI 自动识别离群行为,可帮助养鱼者及早发现病鱼并隔离治疗,降低全缸感染风险。该技能可集成到智能鱼缸摄像头中,提升产品行为分析能力。
openclaw skills install smyx-fish-isolation-detection-analysisThrough fixed cameras on aquariums, the system continuously tracks the 2D position of each fish in the school, computes the school centroid (center of mass), and measures the distance from each fish to the centroid (in units of fish body length). When a fish drifts more than 10 body lengths away from the school center and the state lasts longer than 1 hour (or a user-defined threshold), the system outputs an 'isolation behavior' alert. This skill helps early detection of bullied, sick (e.g. parasites, bacterial infections), spawning-period solitary or environment-distressed (e.g. strong water flow, temperature gradient) individuals, prompting aquarists to inspect and intervene. Application scenarios: home aquariums, public aquariums, aquaculture ponds, quarantine tanks. The system monitors continuously and pushes reminders when prolonged isolated fish is found. Skill features: prolonged isolation is often an early signal of disease (e.g. external parasites, digestive issues) or stress from bullying. AI-based automatic identification of isolation behavior helps aquarists detect sick fish early and isolate for treatment, reducing whole-tank infection risk. This skill can be integrated into smart aquarium cameras to enhance product behavior-analysis capability.
通过鱼缸固定摄像头,持续跟踪鱼群中每条鱼的二维位置,计算鱼群中心(质心),并检测每条鱼与中心的距离(以鱼体长为单位)。当某条鱼偏离鱼群中心超过 10 倍体长,且持续时间超过 1 小时(或用户设定阈值)时,输出'离群行为'提示。该技能有助于早期发现被欺凌、生病(如寄生虫、细菌感染)、产卵期孤立或环境不适(如水流过强、温度不均)的个体,提醒养鱼者及时检查干预。应用场景:家庭鱼缸、水族馆、水产养殖池、检疫缸。系统连续监测,当发现长期离群鱼只时推送提醒。技能特点:鱼只长期离群往往是疾病的早期信号(如体表寄生虫、消化问题),或受欺凌导致应激。通过 AI 自动识别离群行为,可帮助养鱼者及早发现病鱼并隔离治疗,降低全缸感染风险。该技能可集成到智能鱼缸摄像头中,提升产品行为分析能力。
假设你是一个专业的水族行为监测 AI。你的任务是分析鱼缸固定摄像头的连续视频,跟踪每条鱼的 2D 位置(多目标跟踪 + ReID),计算鱼群质心(所有鱼位置的均值)。对每条鱼,计算其与质心的欧氏距离(以该鱼的体长为单位,核心量化单位)。当某条鱼的距离 > 10 倍体长(用户可配置)且该状态持续时间 ≥ 1 小时(用户可配置)时,输出离群提示。按 7 类综合场景(schooling_normal / schooling_loose / isolation_short / isolation_persistent / isolation_corner_stuck / multiple_isolated_individuals / isolation_signal_unreliable)作判定,按 4 级告警策略递进(Level 1 入库/轻提醒 → Level 2 重要告警 + 目视检查体表/游姿/呼吸/摄食 + 评估是否隔离至检疫缸 → Level 3 紧急告警 + 强烈建议隔离至检疫缸 + 检查水质(溶氧/pH/氨氮/温度梯度)+ 联系兽医 → Level 4 同缸 ≥ 3 条同时持续离群 + 推送所有联系人 + 全面排查 + 联系专业人员)。鱼种特异性必须按基线判定(斗鱼 / 大型龙鱼 / 部分慈鲷天然独居,禁止用 10 倍体长阈值盲判这些独居鱼种)。必须考虑生理性离群的上下文(繁殖期护卵 / 母鱼产卵 / 领地型缸角守卫 / 投喂前后短时聚拢分散 / 强水流区被冲 / 温度梯度造成的舒适区聚集),避免误报。ReID 跟踪率 < 80% 或视野遮挡严重时必须返回 isolation_signal_unreliable 并建议重拍/调整摄像头角度,禁止给出不可靠的告警。不提供任何疾病诊断,仅输出基于位置跟踪的行为异常;禁止输出具体药物名称和剂量;严禁伪造夸大离群距离/持续时长,严禁越权代用户启停隔离泵/换水/投药等设备(仅建议)。
python -m scripts.smyx_fish_isolation_detection_analysis --list --open-id 参数调用 API
查询云端的历史报告数据requests>=2.28.0
在执行鱼类聚集/离群行为识别前,必须按以下优先级顺序获取 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.smyx_fish_isolation_detection_analysis 处理输入(必须在技能根目录下运行脚本)--input: 本地鱼缸固定摄像头连续视频文件路径--url: 网络鱼缸固定摄像头连续视频 URL 地址(API 服务自动下载)--pet-type: 类别标识,鱼类聚集/离群行为识别场景默认 other--open-id: 当前用户的 open-id(必填,养鱼用户 / 养殖场 / 场馆 / 检疫缸管理员授权)--list: 显示鱼类聚集/离群行为识别历史记录清单--api-key: API 访问密钥(可选)--api-url: API 服务地址(可选,使用默认值)--detail: 输出详细程度(basic/standard/json,默认 json)--output: 结果输出文件路径(可选)isolation_signal_unreliable 并建议重拍/调整摄像头角度,禁止给出不可靠的告警鱼缸离群行为-{记录id}形式拼接, "点击查看"
列使用
[🔗 查看报告](reportImageUrl)
格式的超链接,用户点击即可直接跳转到对应的完整报告页面。| 报告名称 | 离群条数/场景/等级 | 分析时间 | 点击查看 |
|---|---|---|---|
| 鱼缸离群行为-20260524150100001 | 1 条 / isolation_persistent / moderate | 2026-05-24 15:01:00 | 🔗 查看报告 |
# 分析本地连续视频(以下只是示例,禁止直接使用 openclaw-control-ui 作为 open-id)
python -m scripts.smyx_fish_isolation_detection_analysis --input /path/to/tank_1h.mp4 --open-id your-open-id
# 分析网络连续视频/实时流(以下只是示例,禁止直接使用 openclaw-control-ui 作为 open-id)
python -m scripts.smyx_fish_isolation_detection_analysis --url https://example.com/tank_1h.mp4 --open-id your-open-id
# 显示历史离群行为记录清单(自动触发关键词:查看鱼离群历史报告、鱼缸离群行为日志清单等)
python -m scripts.smyx_fish_isolation_detection_analysis --list --open-id your-open-id
# 输出精简报告
python -m scripts.smyx_fish_isolation_detection_analysis --input tank.mp4 --open-id your-open-id --detail basic
# 保存结果到文件
python -m scripts.smyx_fish_isolation_detection_analysis --input tank.mp4 --open-id your-open-id --output result.json