cd /news/open-source/i-turned-my-gesture-calculator-hobby… · home topics open-source article
[ARTICLE · art-9778] src=dev.to ↗ pub= topic=open-source verified=true sentiment=↑ positive

I turned my gesture calculator hobby project into a pip package — so you can detect and use hand gestures in your project in just 3 lines of Python code

The article describes how a developer turned their gesture-controlled calculator hobby project into a pip package called `mp-gesture-lib`, which allows users to add hand gesture recognition to their Python projects with just three lines of code. The library, built using MediaPipe, includes a bundled zero-configuration model, supports custom model files, and detects gestures from any BGR webcam frame. The package is available for installation via pip, with documentation and source code hosted on GitHub.

read1 min views18 publishedMay 22, 2026

Built a gesture-controlled calculator a while back using MediaPipe. Extracted the detection logic into a standalone library so anyone can add gesture recognition to their project without touching CV code.

from mp_gesture_lib import GestureDetector
detector = GestureDetector()          # bundled model, zero config
result = detector.detect(frame)       # pass any BGR webcam frame
print(result.gesture, result.confidence)

What it detects out of the box:

  • Finger count 1–10 (geometry-based, no ML)
  • Math ops: plus, minus, multiply, divide, equal, clear (ML model, bundled)
  • Two-hand rules for plus/multiply (landmark geometry)
  • Returns "unknown"

cleanly when nothing matches

Custom model support — drop your own .task

file, it's checked first. Bundled model is fallback. Any label passes through raw, no hard-coded mapping.

pip install mp-gesture-lib

📖 Docs: debabratasaha-dev.github.io/mp-gesture-lib-package

🐙 GitHub: github.com/debabratasaha-dev/mp-gesture-lib-package

Feedback welcome — especially on the gesture pipeline priority logic. If you find it useful, I’d really appreciate a ⭐️ on GitHub!

── more in #open-source 4 stories · sorted by recency
── more on @mediapipe 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-turned-my-gesture-…] indexed:0 read:1min 2026-05-22 ·