Skip to content

Add MediaPipe MPS-based nodes via the MPS-MediaPipe SPM package - #344

Open
vade wants to merge 27 commits into
mainfrom
feature/media-pipe-mps
Open

vade wants to merge 27 commits into
mainfrom
feature/media-pipe-mps

Conversation

@vade

@vade vade commented Sep 14, 2026

Copy link
Copy Markdown
Member

Adds the MediaPipe Face/Hand/Pose Detection + Landmark and Selfie Segmentation nodes, backed by the MPSGraph-based MPS-MediaPipe package (extracted so it's usable standalone), plus the Joint Bilateral Filter and MPS Guided Filter nodes selfie segmentation's mask refinement uses.

Adds the MediaPipe Face/Hand/Pose Detection + Landmark and Selfie
Segmentation nodes, backed by the MPSGraph-based MPS-MediaPipe package
(extracted so it's usable standalone), plus the Joint Bilateral Filter
and MPS Guided Filter nodes selfie segmentation's mask refinement uses.

Via Claude Sonnet 5
@vade
vade force-pushed the feature/media-pipe-mps branch from b9173f9 to 8508f75 Compare September 18, 2026 22:10
vade and others added 13 commits September 19, 2026 16:58
…icient encoding/submission/memory usage for larger MPS models.
…lfie Segmentation, and rework Guided/Joint Bilateral filtering

- Replace each MediaPipe node's own static model cache + lock with a
  single process-wide SharedModelCache, so node instances sharing a
  detector/landmark model share one compile and enough in-flight
  slots instead of starving each other.
- Rework MediaPipeSelfieSegmentationNode to stay entirely on the GPU:
  the projection kernel now reads the model's output buffer directly,
  removing the CPU round-trip through lastMaskLogits.
- Rework MPSGuidedFilterNode's low-resolution regression stage to use
  a new CanonicalResample kernel so the guide is resampled through its
  own texture transform to the signal's resolution before filtering.
- Fix and extend JointBilateralFilterNode/JointBilateralFilter.metal
  and their tests.
- Add mps-architecture-spec.html documenting the MPS SPM package
  command-buffer ownership design.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6bPVeUMgqekBD8TQ4uRsW
Converts the MPS execution architecture doc to Markdown and updates it
to reflect the command-buffer ownership design actually implemented
(GraphRenderer.preDraw() owns the one shared MPSCommandBuffer; MPS SPM
packages take MPSCommandBuffer directly and never wrap or commit it),
superseding the earlier commit: Bool-inside-the-package approach the
HTML doc described. Referenced from ARCHITECTURE.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6bPVeUMgqekBD8TQ4uRsW
Adds EfficientTAMTrackerNode (video object tracking from a point
prompt, forward-only, single object; 128x128 mask + region, centroid,
presence; MPSGraph), backed by the local MPS-EfficientTAM package, and
registers it with FabricCoreNodesPlugin.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6bPVeUMgqekBD8TQ4uRsW
Adds the MediaPipe Face/Hand/Pose Detection + Landmark and Selfie
Segmentation nodes, backed by the MPSGraph-based MPS-MediaPipe package
(extracted so it's usable standalone), plus the Joint Bilateral Filter
and MPS Guided Filter nodes selfie segmentation's mask refinement uses.

Via Claude Sonnet 5
…icient encoding/submission/memory usage for larger MPS models.
…lfie Segmentation, and rework Guided/Joint Bilateral filtering

- Replace each MediaPipe node's own static model cache + lock with a
  single process-wide SharedModelCache, so node instances sharing a
  detector/landmark model share one compile and enough in-flight
  slots instead of starving each other.
- Rework MediaPipeSelfieSegmentationNode to stay entirely on the GPU:
  the projection kernel now reads the model's output buffer directly,
  removing the CPU round-trip through lastMaskLogits.
- Rework MPSGuidedFilterNode's low-resolution regression stage to use
  a new CanonicalResample kernel so the guide is resampled through its
  own texture transform to the signal's resolution before filtering.
- Fix and extend JointBilateralFilterNode/JointBilateralFilter.metal
  and their tests.
- Add mps-architecture-spec.html documenting the MPS SPM package
  command-buffer ownership design.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6bPVeUMgqekBD8TQ4uRsW
Converts the MPS execution architecture doc to Markdown and updates it
to reflect the command-buffer ownership design actually implemented
(GraphRenderer.preDraw() owns the one shared MPSCommandBuffer; MPS SPM
packages take MPSCommandBuffer directly and never wrap or commit it),
superseding the earlier commit: Bool-inside-the-package approach the
HTML doc described. Referenced from ARCHITECTURE.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6bPVeUMgqekBD8TQ4uRsW
@vade
vade force-pushed the feature/media-pipe-mps branch from bea2094 to 2fa55a0 Compare September 21, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant