Install
openclaw skills install smyx-driver-head-pose-abnormality-analysisUsing an in-cabin DMS camera, the system analyzes the driver's head pose in real time, computing head pitch (down/up) and yaw (left/right turn). When the head-down angle exceeds a threshold (default > 30°) and lasts more than 2 seconds (possibly looking at a phone or checking objects), or the side-view yaw angle exceeds a threshold (default > 45°) lasting more than 2 seconds (possibly chatting with passengers or looking out the window), it outputs a distracted-driving alert and triggers voice reminders, helping prevent traffic accidents. Application scenarios: passenger cars, commercial vehicles, ride-hailing fleets, freight fleets. The system monitors in real time; when long-duration head-down or head-side behavior is detected, it raises alerts and records distraction events. Skill features: distracted driving (especially looking down at a phone) has become a major cause of traffic accidents. AI real-time head-pose monitoring can promptly remind drivers to refocus and reduce accident risk. Can be integrated into dashcams, in-vehicle smart boxes, or fleet-management platforms to enhance driving safety. | 通过车载DMS摄像头实时分析驾驶员头部姿态,计算头部俯仰角(低头/抬头)和偏航角(左/右转头)。当低头角度超过阈值(默认>30°)且持续时间超过2秒(可能为看手机、查看物品),或侧视角度超过阈值(默认>45°)持续时间超过2秒(可能为与乘客聊天、看窗外)时,输出分心驾驶预警,联动语音提醒,预防交通事故。应用场景:乘用车、商用车、网约车、货运车队。系统实时监测,当驾驶员出现长时间低头或侧头时发出警报,并记录分心事件。技能特点:分心驾驶(尤其是低头看手机)已成为交通事故的主要原因之一。通过AI实时检测头部姿态异常,可及时提醒驾驶员集中注意力,降低事故风险。该技能可集成到行车记录仪、车载智能盒子或车队管理平台中,提升驾驶安全水平。
openclaw skills install smyx-driver-head-pose-abnormality-analysisUsing an in-cabin DMS camera, the system analyzes the driver's head pose in real time, computing head pitch (down/up) and yaw (left/right turn). When the head-down angle exceeds a threshold (default > 30°) and lasts more than 2 seconds (possibly looking at a phone or checking objects), or the side-view yaw angle exceeds a threshold (default > 45°) lasting more than 2 seconds (possibly chatting with passengers or looking out the window), it outputs a distracted-driving alert and triggers voice reminders, helping prevent traffic accidents. Application scenarios: passenger cars, commercial vehicles, ride-hailing fleets, freight fleets. The system monitors in real time; when long-duration head-down or head-side behavior is detected, it raises alerts and records distraction events. Skill features: distracted driving (especially looking down at a phone) has become a major cause of traffic accidents. AI real-time head-pose monitoring can promptly remind drivers to refocus and reduce accident risk. Can be integrated into dashcams, in-vehicle smart boxes, or fleet-management platforms to enhance driving safety.
通过车载DMS摄像头实时分析驾驶员头部姿态,计算头部俯仰角(低头/抬头)和偏航角(左/右转头)。当低头角度超过阈值(默认>30°)且持续时间超过2秒(可能为看手机、查看物品),或侧视角度超过阈值(默认>45°)持续时间超过2秒(可能为与乘客聊天、看窗外)时,输出分心驾驶预警,联动语音提醒,预防交通事故。应用场景:乘用车、商用车、网约车、货运车队。系统实时监测,当驾驶员出现长时间低头或侧头时发出警报,并记录分心事件。技能特点:分心驾驶(尤其是低头看手机)已成为交通事故的主要原因之一。通过AI实时检测头部姿态异常,可及时提醒驾驶员集中注意力,降低事故风险。该技能可集成到行车记录仪、车载智能盒子或车队管理平台中,提升驾驶安全水平。
假设你是一个专业的驾驶员分心监测 AI。你的任务是分析驾驶员面部视频,计算头部姿态角(俯仰角 pitch、偏航角 yaw、翻滚角 roll),检测低头和侧视行为。当头部姿态超出预设阈值且持续时间超过设定值(默认 2 秒)时,输出分心预警。不要提供其他安全建议或医学诊断,仅输出基于头部姿态的检测结果。
python -m scripts.smyx_driver_head_pose_abnormality_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_driver_head_pose_abnormality_analysis 处理输入(必须在技能根目录下运行脚本)--input: 本地车载 DMS 驾驶员面部视频文件路径--url: 网络车载 DMS 驾驶员面部视频 URL 地址(API 服务自动下载)--pet-type: 类别标识,驾驶员分心监测场景默认 other--open-id: 当前用户的 open-id(必填,按上述流程获取)--list: 显示驾驶员头部姿态异常历史分析报告列表清单(可以输入起始日期参数过滤数据范围)--api-key: API 访问密钥(可选)--api-url: API 服务地址(可选,使用默认值)--detail: 输出详细程度(basic/standard/json,默认 json)--output: 结果输出文件路径(可选)驾驶员头部姿态异常报告-{记录id}形式拼接, "点击查看"
列使用
[🔗 查看报告](reportImageUrl)
格式的超链接,用户点击即可直接跳转到对应的完整报告页面。| 报告名称 | 预警类型 | 分析时间 | 点击查看 |
|---|---|---|---|
| 驾驶员头部姿态异常报告-20260312172200001 | head_down_distraction(低头 3.2s / -38°) | 2026-03-12 17:22:00 | 🔗 查看报告 |
# 分析本地车载 DMS 驾驶员视频(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.smyx_driver_head_pose_abnormality_analysis --input /path/to/dms.mp4 --open-id your-open-id
# 分析网络车载 DMS 驾驶员视频(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.smyx_driver_head_pose_abnormality_analysis --url https://example.com/dms.mp4 --open-id your-open-id
# 显示历史驾驶员头部姿态异常报告(自动触发关键词:查看驾驶员分心历史报告、分心驾驶预警清单等)
python -m scripts.smyx_driver_head_pose_abnormality_analysis --list --open-id your-open-id
# 输出精简报告
python -m scripts.smyx_driver_head_pose_abnormality_analysis --input dms.mp4 --open-id your-open-id --detail basic
# 保存结果到文件
python -m scripts.smyx_driver_head_pose_abnormality_analysis --input dms.mp4 --open-id your-open-id --output result.json