Repository navigation
Roll/Scene baselines: pool by whole frame, outliers keep their own bounds - #1145
Merged
Merged
Conversation
…rs keep own bounds Roll and Scene Analysis IQR-trimmed each channel independently, so every channel of the baseline could average a different set of frames, and a frame far from the pool still received the baseline. On marbella_1, frame 019 rendered neon cyan with its scene baseline: its G/B sat 0.5-0.9 D denser than the scene average. Across three rolls (99 frames) the outliers were the first or last frame of each 6-frame strip. The scans were balanced per frame so that the brightest area reads white: orange film base mid-strip, bare light past the cut at a strip end, which leaves the orange mask in. The film-base level alone classifies 95 of 99 frames. - pool_frame_bounds: compare frames on luma-free color, flag whole frames further than 0.3 D from the median, pool luma (median) and color (mean) from the inliers only. - Outliers keep their own bounds (both averages off). Taking the baseline's luma alone rendered washed out on every real outlier, since the color offset also shifts luma through G. - The outlier list is stored with the roll/scene baseline, so a later apply keeps it. - Each frame is measured with its own crosstalk, as it renders, instead of the active frame's.
3 of 4 tasks
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.
Problem
With Use Luma/Color Average on, some frames rendered with a heavy cast (marbella_1 #19: neon cyan) while their own bounds rendered correctly.
Across three rolls (99 frames), the outliers are the first or last frame of each 6-frame strip. The scans were balanced per frame so that the brightest area reads white: the orange base mid-strip, bare light past the cut at a strip end. So strip-end frames keep the orange mask (0.4–0.6 D denser in G/B). The film-base level alone classifies 95 of 99 frames. The scanner-side fix (an exposure lock in the nkscan backend) is a separate change.
Change
pool_frame_bounds(normalization.py): compares frames on luma-free color, and flags whole frames further thanPOOL_OUTLIER_DISTANCE(0.3 D) from the median. The baseline pools the inliers only: luma is the median, color the mean.outliers), so a later Apply keeps it. Old records read as empty.override_crosstalk_*fields are removed.Validation
Test plan
make all: lint, ty and the full pytest suitetests/test_baseline_pooling.py, plus worker, controller and rolls tests