Skip to content

Add exact-mask media regions with stabilized head fixtures - #90

Merged
joaomarcoscrs merged 8 commits into
mainfrom
joao/region-media-source
Aug 21, 2026
Merged

Add exact-mask media regions with stabilized head fixtures#90
joaomarcoscrs merged 8 commits into
mainfrom
joao/region-media-source

Conversation

@joaomarcoscrs

@joaomarcoscrs joaomarcoscrs commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds exact-mask current-frame media crops to the multi-instance region annotation renderer. Media regions can now use a detection mask or polygon as transparent coverage, while explicit screen- or media-space sizing keeps asset overlays independent from detection size.

The Regions playground uses frozen SAM3 head masks associated offline with stable C-BIoU player tracks. High-confidence observations start a head track, lower-confidence observations continue it, crop bounds are smoothed without excluding mask pixels, and gaps of up to seven frames are filled deterministically from tracked player motion. This removes rectangular backgrounds and short prediction flicker without a runtime model or video tracker.

Team badges and the animated fire GIF use fixed screen-pixel sizes, so each player receives the same-sized asset.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation or example update
  • Refactor or maintenance
  • Performance improvement

Validation

  • npm run verify (102 files, 836 tests)
  • npm run package:tarball:smoke (8 tests)
  • Production Pages build and browser QA of exact head-mask crops, playback, transforms, fixed-size badges, and animated GIFs
  • Confirmed all 270 fixture frames contain head predictions and no track has an internal gap of 1-7 frames
  • Added overlap, dense-frame, fallback-artifact, and paused-viewport regression coverage

Notes For Reviewers

  • Exact mask coverage is prepared as compact per-detection alpha crops in a channel separate from visible mask composition. Overlapping detections remain independent, custom mask styles cannot replace the semantic Region mask, and coverage survives both PNG and RGBA mask artifact paths without a palette or detection-count limit.
  • Static Region targets restrict coverage preparation before semantic masks are decoded. Dynamic resolver predicates stay draw-time-only over that conservative static target set.
  • Semantic RLE masks stay in preparation workers and never enter the playback hot path.
  • Existing relative scale behavior is unchanged; the explicit size option is mutually exclusive with it.
  • Frozen SAM3 inference is authoring-only. Runtime playback performs no inference and runs no tracker.
  • The frozen SAM3 authoring output is stored through Git LFS; the runtime demo loads the existing chunked fixture artifacts.
  • React Native continues to reject region descriptors explicitly until it has a native backend implementation.

@joaomarcoscrs joaomarcoscrs changed the title Add media-backed region crops Add media-backed region crops with SAM3 head masks Aug 21, 2026
@joaomarcoscrs joaomarcoscrs self-assigned this Aug 21, 2026
@joaomarcoscrs joaomarcoscrs changed the title Add media-backed region crops with SAM3 head masks Add exact-mask media regions with stabilized head fixtures Aug 21, 2026
@joaomarcoscrs
joaomarcoscrs temporarily deployed to joao/region-media-source - supervision-js-demo PR #90 August 21, 2026 12:42 — with Render Destroyed
@joaomarcoscrs
joaomarcoscrs merged commit c34e9ce into main Aug 21, 2026
3 checks passed
@joaomarcoscrs
joaomarcoscrs deleted the joao/region-media-source branch August 21, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

render-preview Creates a demo render preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant