Skip to content

πŸ– An implementation of a machine learning model for detecting and recognizing hand signs (0-5) accurately using Python. The project pipeline involves the following modules: Preprocessing, Feature Extraction, Model selection and training, and finally performance analysis.

License

Notifications You must be signed in to change notification settings

AbdelrahmanHamdyy/Hand-Gesture-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hand Gesture Recognition

logo

”Hello, Let us help you easily recognize hand gestures πŸ–οΈβ€œ


Table of Contents


Overview

  • Hand Gesture Recognition is a machine learning project that aims to recognize hand signs from 0 => 5
  • This project ranked 1st place among 21 teams with 81% accuracy, tested on unseen dataset.
  • Built using Python.
  • Using Libraries
    • opencv
    • numpy
    • matplotlib
    • pandas
    • scikit_image
    • scikit_learn
    • seaborn
    • joblib
  • You can view Data Set which was used to train the model
  • Project Report

How To Run

pip install -r requirements.txt
  • Add the needed data to test the model in the data folder next to the src folder
β”œβ”€β”€β”€data
β”œβ”€β”€β”€src
β”‚   β”œβ”€β”€β”€main.py
β”‚   └───predict.py
...
  • Navigate to the src directory
cd src
  • Run the main.py file
python main.py
File Description
Result Classification result of every image by order
Time Time taken for classifying the images
  • Features are saved in ./output.csv

Project Pipeline

  1. πŸ“· Read images
  2. πŸ” Preprocessing
  3. πŸ’ͺ Get features
  4. πŸͺ“ Split Training and Test Data
  5. βœ… Calculate accuracy
  6. πŸ“ˆ Performance analysis

Modules

Preprocessing Module

  1. Resize image for faster preprocessing
  2. Apply gamma correction to adjust lighting
  3. Convert image to YCbCr color space
  4. Apply segmentation on the skin color
  5. Skin masking
  6. Convert the segmented & original image to grayscale
  7. Erosion using a 5x5 elliptic kernel
  8. Dilation using a 17x17 elliptic kernel
  9. Region Filling using Contours
  10. Erosion again to clean the image from outside
  11. Masking the eroded image with the original one
  12. Crop image to fit the hand exactly
Input Output

Feature Extraction Module

  1. Apply data augmentation on each image to enhance accuracy
  2. Input each image to the Histogram of Oriented Gradients (HOG)
    1. Resizing
    2. Gradient Computation
    3. Cell Division
    4. Orientation Binning
    5. Histogram Calculations
    6. Block Normalization
    7. Feature Vector
  3. Append array of features of each image in a list

Model Selection

  1. Fitting training data and labels into an SVM model
  2. Dumping model
  3. Getting classified data

Performance Module

Compute Confusion Matrix


Contributors


Abdelrahman Hamdy


Ziad Sherif


Zeyad Tarek


Eslam Ashraf

πŸ”’ License

Note: This software is licensed under MIT License, See License for more information Β©AbdelrahmanHamdyy.

About

πŸ– An implementation of a machine learning model for detecting and recognizing hand signs (0-5) accurately using Python. The project pipeline involves the following modules: Preprocessing, Feature Extraction, Model selection and training, and finally performance analysis.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages