feat: read fingerspelled LSE letters from the camera - #9
Merged
Conversation
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.
The camera now works and the app spells. First engine end to end: MediaPipe → segmenter → handshape table → stabiliser → transcript.
What landed
MediaPipeLandmarkSource— camera → 21 hand landmarks, WASM served same-origin. Releases the tracks on stop so the camera indicator actually goes off.HandshapeAlphabetClassifier— scores the live handshape against a table of LSE fingerspelling shapes. No dataset, no download, useful on first launch.RecognizeSignsUseCase— routesframeengines (a held letter) andwindowengines (a travelled sign) differently, each with its own stabiliser.Container— constructor injection, no framework.Two things worth a look
The fixture was lying. It modelled a curled finger as a straight finger pointing backwards, so the joint angle stayed at 180° and every handshape measured as fully straight —
curlwas 0.00 for every input. Probing before writing assertions is the only reason this was caught; tests written against it would have passed while measuring nothing.Averaging alone picks confident wrong letters.
dandldiffer only in the thumb, so a completely wrong thumb cost one fifth of the score andlwon on its three matching curled fingers. Any feature outside tolerance now vetoes the letter outright, so an ambiguous shape returns nothing. A missing letter is obvious to the signer; a wrong one is not.Deliberately not recognised
g h j m n ñ p q r t x z— traced through the air, or dependent on palm orientation, which the invariant features discard on purpose. Listed in the UI so the gap is visible rather than mysterious. They are the trained model's job.Camera untested under WSL2 (no device access); the pipeline's logic is covered by 43 tests against synthetic hands.