← 返回 Skills 市场
wu-uk

dyn-object-masks

作者 wu-uk · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
79
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install dynamic-object-aware-egomotion-dyn-object-masks
功能描述
Generate dynamic-object binary masks after global motion compensation, output CSR sparse format.
使用说明 (SKILL.md)

When to use

  • Detect moving objects in scenes with camera motion; produce sparse masks aligned to sampled frames.

Workflow

  1. Global alignment: warp previous gray frame to current using estimated affine/homography.
  2. Valid region: also warp an all-ones mask to get valid pixels, avoiding border fill.
  3. Difference + adaptive threshold: diff = abs(curr - warp_prev); on diff[valid] compute median + 3×MAD; use a reasonable minimum threshold to avoid triggering on noise.
  4. Morphology + area filter: open then close; keep connected components above a minimum area (tune as fraction of image area or a fixed pixel threshold).
  5. CSR encoding: for final bool mask
    • rows, cols = nonzero(mask)
    • indices = cols.astype(int32); data = ones(nnz, uint8)
    • counts = bincount(rows, minlength=H); indptr = cumsum(counts, prepend=0)
    • store as f_{i}_data/indices/indptr

Code sketch

warped_prev = cv2.warpAffine(prev_gray, M, (W,H), flags=cv2.INTER_LINEAR, borderValue=0)
valid = cv2.warpAffine(np.ones((H,W),uint8), M, (W,H), flags=cv2.INTER_NEAREST)>0
diff = cv2.absdiff(curr_gray, warped_prev)
vals = diff[valid]
thr = max(20, np.median(vals) + 3*1.4826*np.median(np.abs(vals - np.median(vals))))
raw = (diff>thr) & valid
m = cv2.morphologyEx(raw.astype(uint8)*255, cv2.MORPH_OPEN, k3)
m = cv2.morphologyEx(m, cv2.MORPH_CLOSE, k7)
n, cc, stats, _ = cv2.connectedComponentsWithStats(m>0, connectivity=8)
mask = np.zeros_like(raw, dtype=bool)
for cid in range(1,n):
    if stats[cid, cv2.CC_STAT_AREA] >= min_area:
        mask |= (cc==cid)

Self-check

  • Masks only for sampled frames; keys match sampled indices.
  • shape stored as [H, W] int32; len(indptr)==H+1; indptr[-1]==indices.size.
  • Border fill not treated as foreground; threshold stats computed on valid region only.
  • Threshold + morphology + area filter applied.
安全使用建议
This skill appears internally consistent and focused on computing sparse dynamic-object masks. Before installing or running it, verify the runtime has Python with numpy and OpenCV (cv2) available, or ask the author to include an explicit install/dependency spec. Review what image frames (prev_gray, curr_gray) and transforms (M) the agent will be given and avoid feeding sensitive video if you don't want it processed. If you want stricter controls, request the skill declare its dependencies (pip packages or a container) and exact input/output data formats to reduce ambiguity.
功能分析
Type: OpenClaw Skill Name: dynamic-object-aware-egomotion-dyn-object-masks Version: 0.1.0 The skill bundle describes a standard computer vision workflow for generating dynamic-object masks using motion compensation. The instructions in SKILL.md and the accompanying Python code sketch utilize legitimate libraries (OpenCV, NumPy) for image processing and CSR encoding, with no evidence of malicious intent, data exfiltration, or unauthorized execution.
能力评估
Purpose & Capability
Name/description match the instructions: all steps are image-processing operations to produce CSR sparse masks. Minor mismatch: SKILL.md presumes a Python runtime with numpy/OpenCV but the skill metadata lists no required binaries or dependencies.
Instruction Scope
Instructions stay within scope: they describe warping, thresholding, morphology, connected-component filtering, and CSR encoding. No steps read unrelated files, environment variables, or transmit data externally.
Install Mechanism
No install spec (instruction-only), which is low risk. However the runtime sketch depends on Python, numpy, and OpenCV (cv2); those are not declared. This is an operational omission rather than an active risk.
Credentials
The skill requests no environment variables, credentials, or config paths — appropriate for a local image-processing helper.
Persistence & Privilege
No elevated persistence requested (always:false). Autonomous invocation is allowed by platform default but the skill does not request broader privileges or modify other skill/config state.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dynamic-object-aware-egomotion-dyn-object-masks
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dynamic-object-aware-egomotion-dyn-object-masks 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Bulk publish from all-task-skills-dedup
元数据
Slug dynamic-object-aware-egomotion-dyn-object-masks
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

dyn-object-masks 是什么?

Generate dynamic-object binary masks after global motion compensation, output CSR sparse format. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 79 次。

如何安装 dyn-object-masks?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dynamic-object-aware-egomotion-dyn-object-masks」即可一键安装,无需额外配置。

dyn-object-masks 是免费的吗?

是的,dyn-object-masks 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

dyn-object-masks 支持哪些平台?

dyn-object-masks 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 dyn-object-masks?

由 wu-uk(@wu-uk)开发并维护,当前版本 v0.1.0。

💬 留言讨论