HGR is a hand gesture recognition system built with Google MediaPipe.
π§ Under Development
git clone https://github.com/surajkareppagol/HGR
cd HGR
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 hgr/main.py
deactivate
the virtual environment.
deactivate
- π 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
.
pip install "keras<3.0.0" mediapipe-model-maker
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.
-
get_gesture_image()
Classifies the gesture from image, and returns it.
βββββββββββββ€βββββββββββ€βββββββββββββββββββββ
β 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 β
βββββββββββββ§βββββββββββ§βββββββββββββββββββββ