A browser-based mini-trainer for recognising selected Namibian Sign Language (NSL) fingerspelling letters from a webcam. The application runs hand tracking and classification locally in the browser, so camera frames are not uploaded to a server by this project.
# NSL Fingerspelling Mini-Trainer
A browser-based mini-trainer for recognising selected Namibian Sign Language (NSL) fingerspelling letters from a webcam. The application runs hand tracking and classification locally in the browser, so camera frames are not uploaded to a server by this project.
## Features
- Real-time webcam hand tracking with MediaPipe Hand Landmarker.
- Recognition of nine trained letters: `B`, `C`, `D`, `I`, `L`, `O`, `V`, `W`, and `Y`.
- Live predicted letter, confidence score, confidence bar, and top-three alternatives.
- Reference cards for the supported letters.
- Separate data-collection page for recording new landmark samples.
- Browser persistence for recorded samples using `localStorage`.
- JSON export for retraining the classifier.
## Quick Start
This is a static web project and has no `npm` or Python package dependencies for running the trainer. It does need to be served from a local web server; opening `index.html` directly with a `file://` URL can prevent module imports, model loading, or webcam access from working.
From the project directory, run one of the following:
```powershell
# Python
python -m http.server 8000
```
Or use any equivalent static server, such as the VS Code Live Server extension. Then open:
```text
localhost
```
Allow camera access when the browser asks. A modern browser with WebGL support is recommended because the application requests the MediaPipe GPU delegate.
## Using the Trainer
1. Start the local server and open `index.html`.
2. Allow webcam access.
3. Place one hand in view of the camera.
4. Hold the sign steady and watch the prediction and confidence.
5. A prediction is displayed as recognised only when confidence is at least `70%`.
The displayed result is smoothed over five frames to reduce flicker. The page mirrors the webcam image and draws the detected hand landmarks over the video.
## Recording Training Data
Open `record.html` from the same local server:
```text …