- 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
- First install the needed packages.
pip install -r requirements.txt
- Add the needed data to test the model in the
data
folder next to thesrc
folder
ββββdata
ββββsrc
β ββββmain.py
β ββββpredict.py
...
- Navigate to the src directory
cd src
- Run the
main.py
file
python main.py
- Output 2 files "result.txt" & "time.txt"
File | Description |
---|---|
Result | Classification result of every image by order |
Time | Time taken for classifying the images |
- Features are saved in
./output.csv
- π· Read images
- π Preprocessing
- πͺ Get features
- πͺ Split Training and Test Data
- β Calculate accuracy
- π Performance analysis
- Resize image for faster preprocessing
- Apply gamma correction to adjust lighting
- Convert image to YCbCr color space
- Apply segmentation on the skin color
- Skin masking
- Convert the segmented & original image to grayscale
- Erosion using a 5x5 elliptic kernel
- Dilation using a 17x17 elliptic kernel
- Region Filling using Contours
- Erosion again to clean the image from outside
- Masking the eroded image with the original one
- Crop image to fit the hand exactly
Input | Output |
---|---|
- Apply data augmentation on each image to enhance accuracy
- Input each image to the Histogram of Oriented Gradients (HOG)
- Resizing
- Gradient Computation
- Cell Division
- Orientation Binning
- Histogram Calculations
- Block Normalization
- Feature Vector
- Append array of features of each image in a list
- Fitting training data and labels into an SVM model
- Dumping model
- Getting classified data
Compute Confusion Matrix
Abdelrahman Hamdy |
Ziad Sherif |
Zeyad Tarek |
Eslam Ashraf |
Note: This software is licensed under MIT License, See License for more information Β©AbdelrahmanHamdyy.