{"slug": "i-turned-my-gesture-calculator-hobby-project-into-a-pip-package-so-you-can-and-3", "title": "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", "summary": "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.", "body_md": "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.\n\n``` python\nfrom mp_gesture_lib import GestureDetector\ndetector = GestureDetector()          # bundled model, zero config\nresult = detector.detect(frame)       # pass any BGR webcam frame\nprint(result.gesture, result.confidence)\n```\n\n**What it detects out of the box:**\n\n- Finger count 1–10 (geometry-based, no ML)\n- Math ops: plus, minus, multiply, divide, equal, clear (ML model, bundled)\n- Two-hand rules for plus/multiply (landmark geometry)\n- Returns\n`\"unknown\"`\n\ncleanly when nothing matches\n\n**Custom model support** — drop your own `.task`\n\nfile, it's checked first. Bundled model is fallback. Any label passes through raw, no hard-coded mapping.\n\n`pip install mp-gesture-lib`\n\n📖 Docs: [debabratasaha-dev.github.io/mp-gesture-lib-package](https://debabratasaha-dev.github.io/mp-gesture-lib-package)\n\n🐙 GitHub: [github.com/debabratasaha-dev/mp-gesture-lib-package](https://github.com/debabratasaha-dev/mp-gesture-lib-package)\n\nFeedback welcome — especially on the gesture pipeline priority logic. If you find it useful, I’d really appreciate a ⭐️ on GitHub!", "url": "https://wpnews.pro/news/i-turned-my-gesture-calculator-hobby-project-into-a-pip-package-so-you-can-and-3", "canonical_source": "https://dev.to/dipankar_das/i-turned-my-gesture-calculator-hobby-project-into-a-pip-package-so-you-can-detect-and-use-hand-4ajm", "published_at": "2026-05-22 18:23:18+00:00", "updated_at": "2026-05-22 19:04:00.225504+00:00", "lang": "en", "topics": ["open-source", "developer-tools", "machine-learning", "artificial-intelligence", "products"], "entities": ["MediaPipe", "mp-gesture-lib", "debabratasaha-dev", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/i-turned-my-gesture-calculator-hobby-project-into-a-pip-package-so-you-can-and-3", "markdown": "https://wpnews.pro/news/i-turned-my-gesture-calculator-hobby-project-into-a-pip-package-so-you-can-and-3.md", "text": "https://wpnews.pro/news/i-turned-my-gesture-calculator-hobby-project-into-a-pip-package-so-you-can-and-3.txt", "jsonld": "https://wpnews.pro/news/i-turned-my-gesture-calculator-hobby-project-into-a-pip-package-so-you-can-and-3.jsonld"}}