Inspiration
Maths and science are taught through diagrams: triangles, graphs, circuits, bar charts. For a blind or low-vision student, that page is often the hardest part of the lesson. Refreshable tactile displays like the Dot Pad cost lakhs of rupees. Screen readers can read text, but a triangle is just "image". Swell-paper diagrams take a teacher hours to make and can't be made on the spot.
Almost every student we know already carries an Android phone with a vibration motor, a speaker and a camera. We asked: what if that phone could let you feel a diagram?
What it does
Ghost Touch turns any diagram into something you can trace with your finger.
- Capture: take a photo of a textbook page, pick a screenshot, or open a PDF page.
- Understand: a vision AI turns the diagram into a structured scene: points, lines, labels, axes and curves.
- Explore by touch:
- the phone vibrates while your finger is on a line
- at a corner it gives a distinct "bzzz-tap" and speaks the label ("Point B")
- on graphs, a tone rises and falls with the curve, so you hear its shape
- Ask: by voice or text: "Where is the right angle?", "What is the peak of the graph?" Common questions are answered instantly from the scene itself, without an AI call.
- Raw Mode: if the AI fails or there's no internet, OpenCV edge detection still gives you something to trace.
It speaks English, Hindi and Gujarati, works with TalkBack using a relative-cursor design (double-tap-and-hold, then drag), and runs as an installable PWA in Chrome on Android. No app store, no special hardware.
We also built two features that are still behind flags while we test them on phones:
- Guide my finger: ask "take me to point B" and the phone leads your finger there with hot/cold pulses, pitch and spoken hints.
- Teacher verify & share: a sighted teacher corrects the AI's labels and shares the diagram as a link or QR code, and students open a teacher-verified version.
How we built it
- Frontend: React + Vite + TypeScript PWA. Haptics use the Web Vibration API, speech uses the Web Speech API (fast, offline, the user's own voice and rate), and the graph tone uses Web Audio.
- Backend: FastAPI + Pydantic v2 on Render. Gemini is the primary vision model, with NVIDIA as a fallback, and OpenCV for Raw Mode.
- The scene format is a normalised JSON
DiagramScene, and every scene (from the AI or from a shared link) goes through the same strict validator before the student touches it. - Graphs: instead of trusting the model to trace a curve, we ask it for the equation and axis ranges and sample the curve ourselves with a safe parser (no
eval). The pitch follows the height of the curve under your finger:
$$ f(y) = 200 + 800 \cdot \frac{y - y_{\min}}{y_{\max} - y_{\min}} \ \text{Hz} $$
- Haptics were tuned by hand: line pulses of \(80\) ms every \(70\) ms, a corner pattern of \([50, 90, 50]\) ms followed by \(450\) ms of quiet, and hit radii of \(22\) px for corners and \(14\) px for lines.
- Testing: 1,500+ frontend tests (Vitest + fast-check property tests) and 400+ backend tests (pytest + Hypothesis), with CI, CodeQL and secret scanning on every push.
Challenges we ran into
- Blind users don't touch screens the way sighted users do. With TalkBack on, a normal touch is captured by the screen reader. We found that double-tap-and-hold passes the touch through, but the finger then starts from the centre, so we redesigned Explore around a relative cursor with spoken hints.
- Speed vs accuracy. The most accurate model took 29–169 s per diagram; the fast one took ~2.6 s but failed every graph. We split the work: the fast model for shapes, equation extraction plus our own sampling for graphs, and a cache by image hash.
- A property test that found a bug in itself. A flaky hit-testing test turned out not to be a hit-testing bug at all: its generator could create two points \(10^{-45}\) apart that land on the same pixel. Fixing the generator taught us to test our tests.
- Untrusted input everywhere. Shared diagrams arrive in a URL, so we added size caps before decompression (zip-bomb guard), version checks and the same validator used for AI output.
- Real phones are different. Testing on a second Android phone surfaced a layout bug where the diagram kept resizing during a long hold, which emulators never showed us.
What we learned
- Accessibility isn't a feature you add at the end; it decides the interaction model from day one.
- Vibration is a surprisingly rich channel when timing, rhythm and silence all carry meaning.
- Don't let the AI be the final word. Validate its output, and give a human (a teacher) a way to correct it.
What's next
- Sessions with blind and low-vision students and teachers, and redesigning based on what they tell us.
- Turning on Guide my finger and Teacher verify & share after phone testing.
- A shared library of teacher-verified NCERT diagrams.
- More diagram types (circuits, chemistry structures) and more Indian languages.
AI tools disclosure
We built Ghost Touch with AI coding assistants: Kiro (specs, tasks, property tests, core fixes), Antigravity (feature implementation) and Claude Code (planning and code review). Every change was reviewed and tested before merging, and the build log in the repo records which tool did what.
Built With
- antigravity
- claude-code
- fast-check
- fastapi
- gemini
- github-actions
- hypothesis
- javascript
- kiro
- nvidia-nim
- opencv
- pwa
- pydantic
- pytest
- python
- react
- render
- typescript
- vercel
- vite
- vitest
- web-audio-api
- web-speech-api
- web-vibration-api