Repository navigation
Preserve fine foreground edges in App Bokeh - #340
Merged
Merged
Conversation
Reviewer's GuideApp Bokeh now refines coarse depth blur weights with a full-resolution luminance-guided filter, reuses the bounded mask for background sampling and compositing, preserves the original model depth output with explicit renderer metadata, and adds focused JVM/device validation plus updated architecture and validation documentation. Sequence diagram for luminance-guided App Bokeh renderingsequenceDiagram
participant AppBokehProcessor
participant RelativeDepth
participant BokehMask
participant DepthBokeh
participant MediaLibrary
AppBokehProcessor->>RelativeDepth: infer relative depth
RelativeDepth-->>AppBokehProcessor: model depth
AppBokehProcessor->>DepthBokeh: render(pixels, depth, focusX, focusY, strength)
DepthBokeh->>BokehMask: refine(pixels, width, height, coarseWeights)
BokehMask-->>DepthBokeh: bounded luminance-guided weights
DepthBokeh->>DepthBokeh: blur(weights, width, height, radius)
DepthBokeh-->>AppBokehProcessor: bokeh JPEG pixels
AppBokehProcessor->>MediaLibrary: save JPEG, model depth PNG, renderer metadata
Flow diagram for shared App Bokeh blur maskflowchart LR
Source["Processing source RGB"] --> Luma["Full-resolution luminance"]
Depth["256×256 model relative depth"] --> Coarse["Coarse blur weights"]
Luma --> BokehMask["BokehMask.refine"]
Coarse --> BokehMask
BokehMask --> Mask["Bounded refined weights"]
Mask --> Sampling["Background color sampling"]
Mask --> Composite["Final blur compositing"]
Depth --> DepthPNG["Original model depth PNG"]
Metadata["renderer=guided_luma_mask_v1"] --> Output["Saved App Bokeh outputs"]
Sampling --> Output
Composite --> Output
DepthPNG --> Output
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제와 변경
App Bokeh의 256×256 깊이 맵에서 놓친 가는 잎 끝이 배경으로 분류돼 함께 흐려지는 문제를 줄입니다. 처리용 원본의 밝기로 guided filter를 적용해 흐림 가중치를 보정하고, 같은 가중치를 배경 색 표본과 최종 합성에 사용합니다. 기존에 보호하던 전경에 흐림을 추가하지 않습니다.
저장 메타데이터에
renderer=guided_luma_mask_v1을 추가했습니다. 깊이 PNG는 기존 모델 출력이며 합성 마스크와 구분합니다. 처리 계약·검증 기록·구조 문서 및 생성 사이트를 함께 갱신했습니다.리뷰와 검증
lintDebug, 앱 및 기기 검사 APK 빌드를 통과했습니다.남은 한계
밝기가 비슷하거나 깊이 모델이 넓게 놓친 가는 구조물은 일부 흐려질 수 있고 경계 주변 배경 무늬가 더 선명해질 수 있습니다. 한 기기의 역광 사물 사진으로 확인했으며 다른 기기나 머리카락 품질을 보장하지 않습니다. 관찰된 강도 50/100 렌더 시간은 2264/1776 ms였고, 처리용 원본의 최대 긴 변은 1600픽셀입니다.
상세 검증:
docs/validation/app-bokeh.md의 가는 잎 경계 보정 재검증.Summary by Sourcery
Preserve fine App Bokeh foreground edges while maintaining background blur and clarifying the rendering output contract.
New Features:
Bug Fixes:
Documentation:
Tests: