- Model: Google's official MediaPipe Selfie Segmenter (landscape, Apache-2.0 per model card), converted to ONNX by tools/selfie-seg/convert_tflite_to_onnx.py (custom op Convolution2DTransposeBias -> ConvTranspose) and verified against MediaPipe's own runtime (verify_against_mediapipe.py: max |diff| 5e-5, 100% binary agreement). Embedded resource, 430 KB. - Services/BackgroundEffects: IPersonSegmenter seam, OnnxPersonSegmenter (onnxruntime 1.31.0 CPU, never throws), BackgroundEffectProcessor (None passthrough, Remove = alpha mask). Not wired yet. - Tests: Remove integration test (fake segmenter) + bundled-model contract test vs MediaPipe reference mask. Full suite 407/408 — the one failure is the documented interactive-desktop flake RealMouseDrag_OnTheLayerList_PersistsTheReorder (passed in the run before; code path untouched). - Docs: ai.md reversal + section + licensing guard, THIRD-PARTY-NOTICES 11-12, TASK 51, indexes, MyMistakes recipe, HANDOFF. References: obs-backgroundremoval (approach only — ONNX Runtime on CPU, 2 threads; GPL-3.0, no code used) https://github.com/royshil/obs-backgroundremoval ; MediaPipe image segmenter https://ai.google.dev/edge/mediapipe/solutions/vision/image_segmenter
2.6 KiB
2.6 KiB
HANDOFF — 2026-10-09 (TASK 51 slice 1 shipped: background-effects engine)
Branch
- main (no feature branch). Pushed through
f8dd107; the TASK 51 slice-1 commit sits on top, not pushed (push at the user's call).
Dirty files (NOT mine — do NOT commit or co-edit)
- The in-flight "pinned chat" work unit:
Models/YouTube.cs,ViewModels/MainViewModel.Chat.cs,Controls/LeftPanel.xaml, untrackedHelpers/RelayCommandGeneric.cs. - The creator's untracked logo art in
Assets/(llamacasty text.*,llamacasty-text-nobg*.png,thin logo wordmark.png).
What just happened — TASK 51 slice 1 (engine)
- Model: Google's official MediaPipe Selfie Segmenter (landscape, 144×256, Apache-2.0),
converted to ONNX by our own
tools/selfie-seg/convert_tflite_to_onnx.pyand verified against MediaPipe's own runtime (verify_against_mediapipe.py, max |diff| 5e-5). Embedded in the exe (Assets/Models/selfie_segmenter_landscape.onnx, 430 KB, in git). - Code:
Services/BackgroundEffects/—IPersonSegmenterseam,OnnxPersonSegmenter(onnxruntime 1.31.0 CPU, never throws),BackgroundEffectProcessor(None passthrough, Remove = alpha mask, Blur = passthrough until slice 2).Models/BackgroundEffect.csenum. - Not wired: nothing calls it yet — no config, UI, or camera hookup. Zero risk to the live path.
- Docs: ai.md (stale "background removal PERMANENTLY OUT" bullet replaced by the reversal + a "Webcam background effects" section + a model-provenance licensing guard), THIRD-PARTY-NOTICES items 11 (ONNX Runtime, MIT) + 12 (MediaPipe model, Apache-2.0 with §4b change note), TASK 51 file + TASKS.md row, Services/Models indexes, MyMistakes conversion recipe.
Tests
- Full suite 408 passed / 0 failed, 0 build warnings. New:
BackgroundEffectEngineTests(Remove integration test with a fake segmenter; bundled-model contract test vs a MediaPipe reference mask, fixtures inytLive.Tests/Fixtures/).
Known issues / follow-ups
onnxruntime.dllis ~17 MB; an RID-less build copies every RID's native folder — TASK 48's MSIX publish must pin win-x64.THIRD-PARTY-NOTICES.txtheader still says "paid, closed-source product" (pre free-forever) — noted, not changed (out of scope).- Carried: "Use default background" toggle still not working (from 2026-10-07).
Next step
- TASK 51 slice 2: Blur in
BackgroundEffectProcessor(separable box/gaussian, strength), one integration test. Then slice 3 config + persistence, slice 4 camera-path hookup + perf check on the creator's box, slice 5 properties-panel UI.