# 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

> 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: 2026-05-22 18:23:18+00:00

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.

``` python
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](https://debabratasaha-dev.github.io/mp-gesture-lib-package)

🐙 GitHub: [github.com/debabratasaha-dev/mp-gesture-lib-package](https://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!
