Skip to content

Fix Remove fringe cleanup and Blur matte edges - #93

Draft
Hkshoonya wants to merge 4 commits into
mainfrom
fix/fused-remove-fringe-cleanup
Draft

Hkshoonya wants to merge 4 commits into
mainfrom
fix/fused-remove-fringe-cleanup

Conversation

@Hkshoonya

@Hkshoonya Hkshoonya commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • repair contaminated soft-edge colors in fused DocZeus/Killer Remove mode on the GPU
  • keep Blur foreground colors untouched because it blends against the same camera scene
  • make Blur Dilate and Softness controls affect both CPU and CUDA mattes
  • remove the broad Blur close that bridged legitimate hand and arm gaps
  • fix signed 64-bit CuPy component reductions that caused live GPU matte fallback
  • add the change to the Unreleased changelog
  • leave Replace behavior unchanged

Related to #91.

Why

Remove composites onto synthetic green, so contaminated physical-background colors need an on-device clean-subject reference. Blur composites against a blurred copy of the same camera frame; applying the same color repair made its feathered matte visible as a distinct rim.

Live testing also proved that Blur ignored Dilate and Softness. It always used a fixed two-pass 7x7 dilation, several wide Gaussian passes, and a 25x25 close at half resolution. That inflated the body outline and could seal the exterior gap between raised hands. The revised Blur path honors the configured kernels, retains minimal anti-aliasing and bounded tiny-hole cleanup, and does not broadly close exterior gaps.

The live pass exposed a separate CuPy failure in small-hole cleanup. Connected-component coordinates were signed 64-bit integers, which indexed min/max reductions do not support. They now use safe component-label reductions instead of forcing matte refinement back to the CPU.

Validation

  • indoor live testing held 29-30 fps on an RTX 5070 while cycling Blur and Remove without a crash, original-only fallback, or VRAM growth
  • the maintainer judged the revised body boundary substantially better and the raised-hands result improved and good
  • 83 focused effect, installer-selector, and contributor tests plus 18 subtests pass after synchronizing with current main
  • all five GitHub checks pass at e1fbffb
  • the September 5 synchronization preserves both Unreleased entries; video source and effect tests are unchanged from the live-tested 4086723 revision

Remaining merge gate

Keep this PR in draft until one controlled direct-sunlight/backlit camera comparison confirms that hair, facial hair, body edges, and gaps between raised fingers or hands remain natural in motion. If that visual pass holds, this is ready to merge.

@Hkshoonya Hkshoonya changed the title Fix fused Remove fringe cleanup Fix fused Blur and Remove fringe cleanup Sep 1, 2026
@Hkshoonya

Hkshoonya commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

Live runtime validation completed on the exact PR head feba69c:

  • EMEET SmartCam S600, 640x360 at 30 fps, YUY2
  • RVM Ultra, DocZeus, GPU Focused, CuPy fused path
  • Remove held 29 fps at roughly 16-18% GPU
  • Blur held 30 fps at roughly 15-19% GPU
  • one continuous stream completed Blur -> Remove -> Blur -> Remove
  • no CUDA error, pipeline crash, mode-switch failure, original-only fallback, or VRAM growth

No camera frames were recorded or saved. This validates runtime stability and performance only; visual acceptance for gray/dark fringe, fine-hair retention, and motion flicker is still pending, so the PR remains draft.

@Hkshoonya

Copy link
Copy Markdown
Owner Author

Visual acceptance did not pass.

During the live patched run, the maintainer observed a distinct body boundary that did not fade naturally. Runtime stability and FPS remained good, but those results are not sufficient for merge.

Keep this draft blocked. The next pass must identify whether the outline occurs in Blur, Remove, or both, and whether it is dark, bright, or simply over-sharpened before changing the repair curve. Any revision must retain fine hair and pass the same live mode-cycle test.

@Hkshoonya Hkshoonya changed the title Fix fused Blur and Remove fringe cleanup Fix Remove fringe cleanup and Blur matte edges Sep 1, 2026
@Hkshoonya

Hkshoonya commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

Follow-up validation completed on exact head 55a833e.

The first Blur approach was rejected because it made the feathered body boundary more visible. The revised implementation keeps that color repair only in Remove, restores working Dilate and Softness controls for Blur, and removes the broad close that was bridging raised hands. The live pass also exposed and fixed a CuPy signed-int64 reduction failure that had forced matte refinement onto CPU.

Final checks:

  • 633 project tests passed
  • 355 release-smoke tests passed; wheel and assets validated
  • 67 RTX/CuPy-focused tests passed
  • no known dependency vulnerabilities and no medium/high Bandit findings
  • EMEET S600, 640x360 at 30 fps, RVM Ultra, DocZeus, fused CuPy
  • body edge judged substantially better
  • raised-hands gap judged improved and good
  • no CUDA matte fallback, pipeline error, mode failure, or original-only fallback in the final run
  • no camera frames recorded or saved
  • all exact-head GitHub checks passed

The PR remains draft only because issue #91 still calls for a controlled direct-sunlight/backlit comparison.

@Hkshoonya
Hkshoonya force-pushed the fix/fused-remove-fringe-cleanup branch from 55a833e to 05bad1c Compare September 4, 2026 21:48
@Hkshoonya

Hkshoonya commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

Rebased this onto current main after the v1.5.2 metadata, attribution, package-record, and changelog work. The PR description now renders correctly instead of showing literal \\n characters, and the edge fix has its own Unreleased changelog entry.

Exact head 4086723 is mergeable and all five GitHub checks pass. Local verification also passed 60 focused Blur/Remove tests with 9 subtests, plus 76 project identity, contributor, and packaging tests with 14 subtests.

The code gate is clear. I am keeping the PR in draft only for the final controlled direct-sunlight/backlit camera comparison, especially hair, facial hair, body edges, and gaps between raised fingers or hands. If that visual pass holds, this is the next PR to merge.

@Hkshoonya
Hkshoonya force-pushed the fix/fused-remove-fringe-cleanup branch from 05bad1c to 4086723 Compare September 4, 2026 22:09
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