Incremental Smile Detection to improve hosted web detection pass rates#558
Incremental Smile Detection to improve hosted web detection pass rates#558Kwame Yeboah (Yeboahmedia) wants to merge 9 commits intomainfrom
Conversation
PR Reviewer Guide 🔍(Review updated until commit ced4edd)Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the hosted Smart Selfie capture flow to use incremental (progress-based) smile detection and tighter neutral-expression gating, aiming to improve detection pass rates and align behavior more closely with the Android SDK.
Changes:
- Introduces progressive smile detection logic (delta + consecutive-frame requirements) instead of a single-frame threshold check.
- Adds neutral-expression enforcement during the pre-smile phase (pauses capture until a light neutral expression is detected).
- Adjusts zone checkpoint logic to account for the reference photo and changes pause/resume alert handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/web-components/lib/components/selfie/src/smartselfie-capture/hooks/useFaceCapture.ts | Implements progressive smile tracking, neutral-expression gating, and updated pause/resume + checkpoint logic. |
| packages/web-components/lib/components/selfie/src/smartselfie-capture/SmartSelfieCapture.tsx | Wires new smile/neutral tuning parameters into useFaceCapture. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/review |
|
Persistent review updated to latest commit ced4edd |
Chris DeLauder (beaglebets)
left a comment
There was a problem hiding this comment.
Tell the machine to write some tests for you
I hate you too Chris DeLauder (@beaglebets) .. |
Seriously! I tried it and that is the smoothest capture I've ever experienced on the web app. Feels like a huge improvement. I'd smash that approve button if we had some tests for it. |
Chris DeLauder (beaglebets)
left a comment
There was a problem hiding this comment.
thank you
|
This branch has been deployed to s3 / cloudfront. ✅ Preview URL for Smart Camera Web: https://cdn.smileidentity.com/js/preview-feat/incremental-smile-detection/smart-camera-web.js ✅ Preview URL for Embed: https://cdn.smileidentity.com/inline/preview-feat/incremental-smile-detection/js/script.min.js ✅ Preview URL for Web Client (Sandbox): ✅ Preview URL for Web Client (Production): |
|
This branch has been deployed to s3 / cloudfront. ✅ Preview URL for Smart Camera Web: ✅ Preview URL for Embed: ✅ Preview URL for Web Client (Sandbox): ✅ Preview URL for Web Client (Production): |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
User description
PR Type
Enhancement
Description
Implement incremental smile detection with progressive thresholds
Add neutral expression enforcement during non-smile capture zones
Track smile baseline samples and consecutive frame confirmation
Adjust smile zone boundaries to align with Android SDK behavior
Diagram Walkthrough
File Walkthrough
SmartSelfieCapture.tsx
Add incremental smile detection configuration parameterspackages/web-components/lib/components/selfie/src/smartselfie-capture/SmartSelfieCapture.tsx
neutralSmileMaxThreshold,smileProgressDelta,mouthDeformationDelta,smileProgressConsecutiveFrames,smileBaselineSampleSizeuseFaceCapturehookuseFaceCapture.ts
Implement progressive smile tracking and neutral expression gatingpackages/web-components/lib/components/selfie/src/smartselfie-capture/hooks/useFaceCapture.ts
trackSmileProgressfunction implementing incremental smiledetection with baseline sampling, progressive delta thresholds, and
consecutive frame confirmation
hasLightNeutralExpressioncheck to enforce neutral expressionduring non-smile capture zones
>=to>(capturesTaken >smileCheckpoint) and recalculatedsmileCheckpointas half of livenesscapture count
counter, and zone minimum scores
pauseCaptureto accept amessageKeyparameter, defaulting to'smile-required'startCaptureIntervalandresumeCaptureto pause/block capture when expression is not neutralstartCaptureandresetCaptureneutral expression is detected instead of requiring a smile