Install
openclaw skills install smyx-stranger-recognition-analysisIdentifies strangers appearing in surveillance areas through facial comparison; supports video stream and image detection, suitable for stranger warnings in...
openclaw skills install smyx-stranger-recognition-analysisBased on high-precision facial recognition algorithms and feature vector comparison technology, this skill constructs an intelligent stranger early warning mechanism for surveillance areas. The system supports dual-mode input via real-time video stream analysis and static image detection, capable of performing millisecond-level feature matching between captured facial information and a preset whitelist database (such as residents, employees, and regular visitors). Once an unauthorized陌生 face is detected in scenarios like community entrances, key enterprise areas, or smart access control points, the system immediately triggers a warning, automatically captures and stores the image, and pushes alert information to the management terminal. This realizes a security upgrade from passive monitoring to active defense, effectively safeguarding area security and privacy.
本技能基于高精度人脸识别算法与特征向量比对技术,构建了一套针对监控区域的智能陌生人预警机制。系统支持实时视频流分析与静态图片检测双模态输入,能够将采集到的人脸信息与预设的白名单数据库(如业主、员工、常客)进行毫秒级特征匹配。一旦在小区出入口、企事业单位重点区域或智能门禁场景中检测到未授权的陌生面孔,系统将立即触发预警,自动抓拍留存并推送告警信息至管理端,实现从被动监控到主动防御的安防升级,有效保障区域安全与隐私
本技能明确约定:
memory/YYYY-MM-DD.md、MEMORY.md 等本地文件python -m scripts.stranger_recognition_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.stranger_recognition_analysis 处理素材(必须在技能根目录下运行脚本)--input: 本地视频/图片文件路径(使用 multipart/form-data 方式上传)--url: 网络视频/图片 URL 地址(API 服务自动下载)--media-type: 媒体类型,可选值:video/image,默认 video--threshold: 人脸比对相似度阈值,默认 0.6,分值越高要求越严格--open-id: 当前用户的 open-id(必填,按上述流程获取)--enroll: 是否录入新人员到人脸识别底库,yes/no,默认 no--person-name: 人员姓名,录入底库时必须提供--person-id: 人员ID,录入底库时可选--list: 显示陌生人识别历史分析报告列表清单(可以输入起始日期参数过滤数据范围)--api-key: API 访问密钥(可选)--api-url: API 服务地址(可选,使用默认值)--detail: 输出详细程度(basic/standard/json,默认 json)--output: 结果输出文件路径(可选)陌生人识别分析报告-{记录id}形式拼接, "点击查看"
列使用
[🔗 查看报告](reportImageUrl)
格式的超链接,用户点击即可直接跳转到对应的完整报告页面。| 报告名称 | 识别时间 | 识别结果 | 点击查看 |
|---|---|---|---|
| 陌生人识别分析报告-20260312172200001 | 2026-03-12 17:22:00 | ||
| 检测到1名陌生人 | 🔗 查看报告 |
# 识别本地监控视频(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.stranger_recognition_analysis --input /path/to/monitor.mp4 --media-type video --open-id openclaw-control-ui
# 识别本地图片,设置 stricter 阈值(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.stranger_recognition_analysis --input /path/to/capture.jpg --media-type image --threshold 0.7 --open-id openclaw-control-ui
# 录入新人脸到人脸识别底库(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.stranger_recognition_analysis --input /path/to/zhangsan.jpg --media-type image --enroll yes --person-name "张三" --open-id openclaw-control-ui
# 显示历史识别报告/显示识别报告清单列表/显示历史陌生人报告(自动触发关键词:查看历史识别报告、历史报告、识别报告清单等)
python -m scripts.stranger_recognition_analysis --list --open-id openclaw-control-ui
# 输出精简报告
python -m scripts.stranger_recognition_analysis --input video.mp4 --media-type video --open-id your-open-id --detail basic
# 保存结果到文件
python -m scripts.stranger_recognition_analysis --input video.mp4 --media-type video --open-id your-open-id --output result.json