AGENT SKILL

dyn-object-masks

Generate dynamic-object binary masks after global motion compensation, output CSR sparse format.

License 许可
Apache-2.0
最近更新
2026-11-14
Stars
★ 0
Forks
1

01 前言 Front Matter

name
dyn-object-masks
description
Generate dynamic-object binary masks after global motion compensation, output CSR sparse format.

03 SKILL.md 正文

When to use

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

Workflow

  1. 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.
  2. Morphology + area filter: open then close; keep connected components above a minimum area (tune as fraction of image area or a fixed pixel threshold).

Code sketch

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.

04 同仓库更多 Skills