Repository navigation
feat(curation): technical_quality scorer + curate_for_character/environment facades - #1
Merged
Merged
Conversation
…onment facades Add a derived `technical_quality` scorer (blur + exposure + resolution composite, 0..1) — the non-face counterpart of `face_quality`, giving `top_k` a single rankable metric for environment/prop/style pools. Add two opinionated facades over `curate()`: - `curate_for_character` — picks the most usable reference frame of a known character (resolution/sharpness/exposure/face quality), ranked by `face_quality`. `face_detector` defaults to real insightface, swappable to `mock_face` for tests. - `curate_for_environment` — same for non-person pools, ranked by `technical_quality`; needs no ML dependency.
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.
Summary
Adds the curation capability the reelee lookbook bridge (reelee #33) needs — opinionated facades for picking the best reference image(s) from a pool.
technical_qualityscorer — a derived 0..1 composite ofblur+exposure+resolution. The non-face counterpart offace_quality: givestop_ka single rankable metric for environment / prop / style pools. Sharpness-dominant, with exposure-clipping and resolution as secondary terms.curate_for_character(source, *, k=1, face_detector="insightface")— opinionated facade overcurate()for picking the most usable reference frame of a known character (IP-adapter conditioning, model-sheet seeding). Scores resolution/sharpness/exposure/face-quality, ranks byface_quality.face_detectorswaps the real RetinaFace detector for the deterministicmock_facein tests/demos. No-face images sort last; the pool is never filtered to empty.curate_for_environment(source, *, k=1)— same for non-person pools, ranked bytechnical_quality. Needs no ML dependency.Test plan
tests/test_curators.py— 8 new tests:technical_qualityformula (perfect / clipped / missing-blur), both facades rank sharp above soft,klimiting, no-face best-effort fallback. Driven throughmock_faceso the suite stays offline.insightfacepath end-to-end (no crash; CPU, model auto-downloads once).