Skip to content

video-matting#1378

Open
1NL1 wants to merge 12 commits into
suitenumerique:mainfrom
alexandrebayssiere7-cmd:blur-pr
Open

video-matting#1378
1NL1 wants to merge 12 commits into
suitenumerique:mainfrom
alexandrebayssiere7-cmd:blur-pr

Conversation

@1NL1

@1NL1 1NL1 commented Jun 1, 2026

Copy link
Copy Markdown

Summary
Adds a GPU-accelerated background blur effect to the in-call effects panel. Introduces a modular matting pipeline (segmentation → preprocessing → renderer → compositor) that runs entirely client-side using MediaPipe models and a WebGL2 guided filter, with a Canvas2D fallback for unsupported browsers.

What's included:

  • Matting pipeline core (blur/) - segmenters (multiclass + landscape) with on-the-fly benchmarking for selection, ROI cropper, video frame tracker, mask post-processor, and render-loop runner.
  • WebGL2 renderer with guided filter (for edge-aware upsampling), Canvas2D fallback
  • i18n : strings added for de, en, fr, nl
  • Docs : pipeline architecture documented in blur/README.md

Examples:
Background for reference:
Photo le 02-06-2026 à 11 15

Old pipeline:
https://github.com/user-attachments/assets/4890a97b-661d-4193-9cb0-34e007a71660

New pipeline:
With Mediapipe Multiclass (heavier but more precise model):
https://github.com/user-attachments/assets/194b0c67-3658-4f01-a9c2-330c27ff40f1

With Mediapipe Selfie Landscape (lighter but less accurate model):
https://github.com/user-attachments/assets/20d7ace2-c0d3-4d7d-a9a4-a0318f53df83

Alexis Noé and others added 11 commits June 1, 2026 14:27
Introduce the AdvancedMattingProcessor orchestrator and the supporting
shared modules (entry index, debug helpers, timer worker, error store).
Add the package dependencies required by the background matting feature.
Introduce the Segmenter abstraction along with Landscape and Multiclass
implementations, the loop runner, and a benchmarker so the pipeline can
pick the best model at runtime.
Build a preprocessing pipeline that tracks video frames, manages the
matting canvases, and crops a region of interest from face landmarks
before passing the frame to the segmenter.
Modularize the WebGL2 renderer, extract its shaders, and add a fast
GPU guided filter together with the mask post-processor and segmo
compositor. The render loop runner and Canvas2D fallback live next to
them. The old standalone postprocessing helpers (Morphology, Sigmoid,
TemporalEMA) are removed since they are now folded into the renderer
pipeline.
Wire the matting pipeline into the effects configuration panel, persist
the user's blur choice, and add the matching translations for de, en,
fr and nl.
Cover the RoiCropper behavior with Vitest and add the matching Vitest
configuration so the suite can run in the frontend workspace.
Add a README walking through the blur module's architecture, and
record the feature in the changelog.
Resolve SonarCloud warnings across the matting pipeline, extract an
abstract Segmenter base class to remove duplication, add an isSupported
guard and module README, trim the effects configuration, drop the
standalone Vitest config and consolidate room locales across languages.
… module

Strip verbose inline documentation and commentary from the matting
pipeline, also dropping a few duplicated try/catch blocks left over
from the refactor.
Add the background blur and virtual background entry under Unreleased.
@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@1NL1 1NL1 marked this pull request as ready for review June 4, 2026 09:06
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