An open API service indexing awesome lists of open source software.

https://github.com/surajkareppagol/hgr

๐Ÿ‘ Hand Gesture Recognition And Cross-Platform API Built With Mediapipe.
https://github.com/surajkareppagol/hgr

hand-gesture-recognition mediapipe mediapipe-hands

Last synced: 8 months ago
JSON representation

๐Ÿ‘ Hand Gesture Recognition And Cross-Platform API Built With Mediapipe.

Awesome Lists containing this project

README

          

# ๐Ÿ‘ HGR - Hand Gesture Recognition

HGR is a hand gesture recognition system built with Google MediaPipe.

> ๐Ÿšง Under Development

## โš™๏ธ Usage

```sh
git clone https://github.com/surajkareppagol/HGR
cd HGR
```

```sh
python3 -m venv venv
```

```sh
source venv/bin/activate
```

```sh
pip install -r requirements.txt
```

```sh
python3 hgr/main.py
```

`deactivate` the virtual environment.

```sh
deactivate
```

## โœ… Requirements

- ๐Ÿ Python3.7+
- โœจ mediapipe
- โœจ mediapipe-model-maker
- โšก rich
- ๐ŸŒŸ ttkbootstrap
- ๐Ÿ–ฑ๏ธ pyautogui

Mediapipe requires `Python` versions between `3.7` and `3.10`. In `Windows` there are some problems with mediapipe installation, so it is recommended to install these using `pip`.

Recent changes in tensorflow broke the model maker, so use the following to install `mediapipe-model-maker`.

```sh
pip install "keras<3.0.0" mediapipe-model-maker
```

## โ†”๏ธ API Class

The `hgr/mp/api.py` provides a `API Class`, that has following methods.

- `get_gestures()`

Returns a list of available gestures.

- `get_landmarks_image()`

Returns landmarks from a image passed as argument.

- `draw_landmarks_image()`

Draws points on landmarks and connects them.

- `get_landmark_image()`

Returns landmarks for a specific point, between 0 - 20.

![MediaPipe Hands](https://developers.google.com/static/mediapipe/images/solutions/hand-landmarks.png)

- `get_gesture_image()`

Classifies the gesture from image, and returns it.

## ๐Ÿ–ฅ๏ธ GUI

![HGR Main](https://raw.githubusercontent.com/surajkareppagol/Assets/main/16%20-%20HGR/HGR%20Main.png)

![HGR Actions](https://raw.githubusercontent.com/surajkareppagol/Assets/main/16%20-%20HGR/HGR%20Actions.png)

![HGR Train](https://raw.githubusercontent.com/surajkareppagol/Assets/main/16%20-%20HGR/HGR%20Train.png)

![HGR Test](https://raw.githubusercontent.com/surajkareppagol/Assets/main/16%20-%20HGR/HGR%20Test.png)

## ๐ŸŽฏ Model Maker Scores

```txt
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ Iteration โ”‚ Gesture โ”‚ Score โ•‘
โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
โ•‘ 1 โ”‚ none โ”‚ 0.8584573268890381 โ•‘
โ•‘ 2 โ”‚ none โ”‚ 0.568006694316864 โ•‘
โ•‘ 3 โ”‚ paper โ”‚ 0.9921259880065918 โ•‘
โ•‘ 4 โ”‚ paper โ”‚ 0.991919994354248 โ•‘
โ•‘ 5 โ”‚ paper โ”‚ 0.9897699356079102 โ•‘
โ•‘ 6 โ”‚ paper โ”‚ 0.9981831908226013 โ•‘
โ•‘ 7 โ”‚ paper โ”‚ 0.9804528951644897 โ•‘
โ•‘ 8 โ”‚ none โ”‚ 0.893876314163208 โ•‘
โ•‘ 9 โ”‚ paper โ”‚ 0.9854918122291565 โ•‘
โ•‘ 10 โ”‚ none โ”‚ 0.8718634247779846 โ•‘
โ•‘ 11 โ”‚ none โ”‚ 0.760579526424408 โ•‘
โ•‘ 12 โ”‚ scissors โ”‚ 0.5368748307228088 โ•‘
โ•‘ 13 โ”‚ none โ”‚ 0.8792762160301208 โ•‘
โ•‘ 14 โ”‚ none โ”‚ 0.7174986600875854 โ•‘
โ•‘ 15 โ”‚ none โ”‚ 0.9842039942741394 โ•‘
โ•‘ 16 โ”‚ none โ”‚ 0.9359919428825378 โ•‘
โ•‘ 17 โ”‚ none โ”‚ 0.948810338973999 โ•‘
โ•‘ 18 โ”‚ none โ”‚ 0.9333010911941528 โ•‘
โ•‘ 19 โ”‚ paper โ”‚ 0.6957719326019287 โ•‘
โ•‘ 20 โ”‚ scissors โ”‚ 0.9800419211387634 โ•‘
โ•‘ 21 โ”‚ scissors โ”‚ 0.6627081036567688 โ•‘
โ•‘ 22 โ”‚ scissors โ”‚ 0.9795249104499817 โ•‘
โ•‘ 23 โ”‚ scissors โ”‚ 0.9814074039459229 โ•‘
โ•‘ 24 โ”‚ scissors โ”‚ 0.9789888858795166 โ•‘
โ•‘ 25 โ”‚ none โ”‚ 0.9442585706710815 โ•‘
โ•‘ 26 โ”‚ scissors โ”‚ 0.959807276725769 โ•‘
โ•‘ 27 โ”‚ none โ”‚ 0.9233239889144897 โ•‘
โ•‘ 28 โ”‚ none โ”‚ 0.9254647493362427 โ•‘
โ•‘ 29 โ”‚ paper โ”‚ 0.8687804937362671 โ•‘
โ•‘ 30 โ”‚ paper โ”‚ 0.8441806435585022 โ•‘
โ•‘ 31 โ”‚ โ”‚ 0.8685176372528076 โ•‘
โ•‘ 32 โ”‚ none โ”‚ 0.965121328830719 โ•‘
โ•‘ 33 โ”‚ none โ”‚ 0.9680899977684021 โ•‘
โ•‘ 34 โ”‚ scissors โ”‚ 0.9052069187164307 โ•‘
โ•‘ 35 โ”‚ scissors โ”‚ 0.8518658876419067 โ•‘
โ•‘ 36 โ”‚ scissors โ”‚ 0.9516168236732483 โ•‘
โ•‘ 37 โ”‚ scissors โ”‚ 0.9168112874031067 โ•‘
โ•‘ 38 โ”‚ scissors โ”‚ 0.9222723245620728 โ•‘
โ•‘ 39 โ”‚ scissors โ”‚ 0.9808273315429688 โ•‘
โ•‘ 40 โ”‚ scissors โ”‚ 0.9677468538284302 โ•‘
โ•‘ 41 โ”‚ none โ”‚ 0.8759973049163818 โ•‘
โ•‘ 42 โ”‚ none โ”‚ 0.8951284885406494 โ•‘
โ•‘ 43 โ”‚ none โ”‚ 0.5676480531692505 โ•‘
โ•‘ 44 โ”‚ none โ”‚ 0.8585500717163086 โ•‘
โ•‘ 45 โ”‚ none โ”‚ 0.9657561182975769 โ•‘
โ•‘ 46 โ”‚ none โ”‚ 0.8343509435653687 โ•‘
โ•‘ 47 โ”‚ none โ”‚ 0.8246175646781921 โ•‘
โ•‘ 48 โ”‚ none โ”‚ 0.9299445152282715 โ•‘
โ•‘ 49 โ”‚ none โ”‚ 0.9493988156318665 โ•‘
โ•‘ 50 โ”‚ rock โ”‚ 0.6069502830505371 โ•‘
โ•‘ 51 โ”‚ none โ”‚ 0.9981077909469604 โ•‘
โ•‘ 52 โ”‚ rock โ”‚ 0.526486337184906 โ•‘
โ•‘ 53 โ”‚ none โ”‚ 0.8241088390350342 โ•‘
โ•‘ 54 โ”‚ none โ”‚ 0.547508180141449 โ•‘
โ•‘ 55 โ”‚ none โ”‚ 0.7531124949455261 โ•‘
โ•‘ 56 โ”‚ none โ”‚ 0.9233627915382385 โ•‘
โ•‘ 57 โ”‚ none โ”‚ 0.9331709742546082 โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
```