惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
A
About on SuperTechFans
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
月光博客
月光博客
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
T
Tailwind CSS Blog
Jina AI
Jina AI
有赞技术团队
有赞技术团队
博客园_首页

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I built a real-time ASL interpreter for the Gemma4 challe...
Ngawang Tenz · 2026-05-17 · via DEV Community

This is a submission for the Gemma 4 Challenge: Build with Gemma 4

What I Built

A real-time American Sign Language (ASL) alphabet interpreter that runs 100% on your own machine - no api key, no cloud, no subscription. Hold up your hand showing a sign-lan in front of your webcam, hit capture, and Gemma4 tells you which letter it thinks it sees, how confident it is, and what it notice about your hand position.

The pipeline design is:
Webcam -> MediaPipe (hand detection + cropping only) -> Gemma4 does the hard work (i.e., ASL recognition) -> Result

Repo + setup: [https://github.com/cbms26/asl-interpreter]

Why this, and why Gemma4:e4b

Most ASL recognition tools out there either need a cloud API or have rely on a dedicated sign-language model pre-trained specifically on ASL datasets. Both approaches have real trade-offs; one cloud APIs mean your hand gestures are going to some server, and secondly, a purpose-built model means you're stuck with whatever letters it was trained on.
I wanted to see how well a general purpose vision model like Gemma4 could
handle ASL recognition just by being given a good specific-description of what each letter looks like. No fine-tuning, no dataset, just programmatic prompting. And everything had to run locally because privacy matters (esp. when your webcam is in use).

I went with gemma4:e4b specifically. E2B was too small to handle the
subtle differences between similar letters. The 31B Dense model is great
but won't run on most people's laptops. E4B hit the sweet spot — capable
enough to reason about fine hand shapes, light enough to run locally.

The one design decision worth explaining

The obvious approach is sending the raw webcam frame to Gemma 4 and asking
it to identify the sign. That works, but accuracy is noticeably worse
because the model splits its attention between the hand, the background,
the face, the lighting, and everything else in frame.

The fix was adding MediaPipe as a pre-processing step. It runs in the
browser at ~15fps, detects the hand, and crops a tight (512×512) square
around it. That cropped image, hand only, nothing else - is what Gemma4
actually sees.
MediaPipe handles where the hand is. Gemma 4 handles what letter it is. Separating those two jobs made the biggest accuracy difference of anything I tried.

Prompt engineering did real work here

Gemma 4 had no ASL training. To make up for that, I wrote precise specific-descriptions of all 26 letters and explicit disambiguation rules for the pairs the model kept getting confused:

"A vs S: In A the thumb is BESIDE the index finger. In S the thumb is
folded OVER the knuckles."

"M vs N vs T: All involve fingers folded over the thumb.
M = 3 fingers, N = 2 fingers, T = thumb between index and middle."

Writing those out forced me to actually understand the signs properly.
And it worked - the confused-pair accuracy improved significantly once
the model had explicit rules to fall back on. No fine-tuning needed.

How I measured it (not just vibes)

I didn't just demo the app and call it done. I built a proper evaluation
pipeline:

  1. Extract frames from an ASL tutorial video
  2. Let Gemma 4 auto-sort them into test_signs/<LETTER>/ folders
  3. Run batch_tester.py to measure per-letter accuracy with ground truth

Every interaction — webcam captures, batch runs, model sorts — gets
appended to a timestamped CSV log. The webcam UI also has a thumbs-up/thumbs-down feedback button. If the model is wrong, you pick the correct letter from an A-Z picker so the log captures what it got wrong, not just that it got it wrong.

Results so far:
folder 1 got created due to model thinking letter D sign as 1 - interesting

Baseline accuracy report from batch_tester.py
worst performing letters

Summary report:

  • Total images: 66
  • Overall: 59.1%
  • Best letters: B, D, E, F, G, H, K, R, T, U, X, Y, Z -> 100%
  • Worst letters: I (0%), O (0%), P (0%), V (22%)

During live webcam testing, the built-in feedback captured 15 sessions - 3 correct (thumbs up) and 12 incorrect (thumbs down with the actual letter logged). Common webcam misidentifications included O predicted instead of A, C, or E, and blank/low-confidence responses on letters like D and F.
Live webcam feedback_log.csv

What surprised me

The hardest letters aren't the ones I expected. J and Z both involve
motion in real ASL - J traces an arc, Z traces a Z shape in the air.
In a still image they look almost identical to I and A. Gemma 4 actually
handles this well by flagging them as low confidence rather than
guessing confidently wrong. That's the honest answer.
Clean input also mattered more than prompt length. The biggest accuracy jump came from cropping with MediaPipe and clear background, not from making the prompt more detailed.

Demo

Short demo walkthrough - Goes to YouTube

It was really fun to take on this challenge. Thank you DEV community!