Promote to production: pas foto guide proportions + detection calibration - #303
Merged
Conversation
…ction Three fixes from real-device feedback: 1. The oval was far too narrow. Its width came from the FRAME width while its height came from the crown/chin band, so in a 3x4 frame it rendered at a width/height of ~0.51 — nothing like a head, and a different shape in every photo size. The width is now DERIVED from the head height with an anatomical ratio (0.68), so the guide is head-shaped in 2x3, 3x4 and 4x6 alike. The plain ellipse is replaced by headOutlinePath(), an egg shape with a rounded cranium tapering to the chin, and the SVG viewBox now matches the photo aspect instead of stretching a square one. 2. Framing feedback said 'looks good' while the subject was still too far away. HEAD_TO_FACE was a guessed 1.4; measuring a real detection (436px box vs a true 521px crown-to-chin, chin sitting above the box bottom) gives 1.20, split into CHIN_AT/CROWN_ABOVE so the chin is placed correctly too. A test pins the model to that measurement. 3. Background removal could fail with 'Failed to fetch' because the background-removal and face-detection models were downloaded at the same time; they now run in sequence. Also widens the vertical-position range to +/-1 frame height: a test showed a small (distant) face needs more travel than +/-0.5 allowed, which left such photos misaligned.
fix(pas-foto): head guide proportions + calibrated face detection
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.
Promotes the head-guide proportion fix (head-shaped outline, correct width in every photo size), the calibrated face-detection model, sequential model loading, and the wider vertical-position range. CI green on develop.