Individual skill

dyn-object-masks

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

tasks/dynamic-object-aware-egomotion/environment/skills/dyn-object-masks/SKILL.md

Read pinned source

Source commit f860ecf02ef53412a030f8661c83d644b739ff01

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Network or broad shell
Last checked
Nov 9, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
1,911
Repository last updated
Nov 4, 2026
License
Apache-2.0

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# 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`
Back to top