Skip to content
← All posts

Engineering

How we read Pakistan Sign Language on a phone, with no internet

21 hand points, 96 features and a model small enough for an Android phone. What worked, what broke, and how we got to 97.8%.

Daniyal Hayat

8 min read · 25 November 2026

Most sign language demos you see online are trained on American Sign Language and run on a server. Neither helps a deaf student in Rawalpindi. Pakistan Sign Language has its own alphabet, 36 Urdu letter signs, and a phone camera pointed at someone's hand is a stream of video most people would rather not upload anywhere.

So we set two rules before writing any code: it reads PSL, and nothing leaves the phone.

Don't classify pixels. Classify the hand.

Feeding raw camera frames into a model means it has to learn lighting, skin tone, backgrounds and sleeves before it learns a single letter. That needs a lot of data and a model too big for a mid-range Android phone.

Instead, MediaPipe's Hand Landmarker finds the hand and returns 21 points in 3D for every frame. On Android this runs natively and the points are passed up to Flutter over a method channel. From that point on, the model never sees an image at all.

96 numbers per frame

21 raw points aren't enough on their own. The same letter signed closer to the camera, or with the hand turned slightly, produces very different coordinates. So we turn each frame into 96 features that describe the shape of the hand rather than where it is:

Feature Count
21 landmarks, normalised to the wrist (x, y, z) 63
Fingertip distances 5
Fingertip to fingertip distances 10
Joint angles 15
Palm direction 3

A small model on purpose

With good features, the classifier can be boring. A StandardScaler, then a small dense network with BatchNorm and Dropout, scoring all 36 letters. We exported it to TensorFlow Lite so it runs in real time on the phone.

The app shows the letter in Nastaleeq script, lets you build a word letter by letter, and reads it aloud with Urdu text to speech.

What broke

The model worked on the laptop long before it worked on the phone. Three things got in the way:

  • Normalisation drift. Training and the app normalised landmarks in slightly different ways, so the phone was feeding the model numbers it had never seen. Matching the two exactly fixed most of the "random letters" problem.
  • Label mismatch. The label count in the exported model and the app's class list didn't agree, which shifted predictions by one letter. Painful to spot, easy to fix.
  • Dependency conflicts. Getting MediaPipe, TFLite and Flutter to agree on versions took longer than training the model.

Results

We ran the exact TFLite model the app ships with across the project dataset. MediaPipe found a hand in 1,943 of 1,986 images. On those, the model picked the right letter 97.8% of the time. Counting the images where no hand was found as failures, it's 95.7%.

The interesting failures weren't wrong letters. They were frames where no hand was found at all. Better hand detection will do more for accuracy than a bigger model.

What's next

Letters are a start, but people sign words and sentences, and those move. We've experimented with sequence models (an LSTM on landmark sequences) for dynamic signs, and that's where this goes next.

If you're working on accessibility, education or public services and want something like this for your users, we'd like to talk. The code is on GitHub.

Want this kind of engineering on your project?

Tell us the workflow. In one call we'll tell you if an agent can run it, what it would take, and what could go wrong.