Skip to content

Repository files navigation

HandSignalCV

Hand Signal Computer Vision

Table of Contents
  1. About The Project
  2. Getting Started
  3. Process
  4. Usage
  5. Roadmap
  6. License
  7. Contact
  8. Acknowledgments

About The Project

HandSignalCV is a project designed to detect American Sign Language (ASL) from a camera feed and convert it into text. The project will utilize OpenCV and Mediapipe to capture frames and retrieve an ASL dataset. This dataset will then be divided into training, validation, and test sets.

Using this data, the project will create a Deep Neural Network (DNN) with convolutional layers and ReLU activation functions, trained using the Adam optimizer. An AI API will be integrated to verify the constructed sentences, ensuring accuracy. The-26-letters-and-10-digits-of-American-Sign-Language-ASL

(back to top)

Built With

Python, Jupyter Notebook Libraries: OpenCV, Mediapipe, numpy, tensorflow, sk-learn, h5py

(back to top)

Getting Started

Prerequisites

pip install tables pip install h5py pillow pip install jupyter pip install tensorflow python -m pip install cohere --upgrade pip install python-dotenv

Installation

  1. Clone the repo
    git clone https://github.com/wirefailed/HandSignalCV.git

(back to top)

Process

  1. Run capturingSignals.py

    python capturingSignals.py

    During each iteration of the run, write the alphabets and press 's' to save the photo. Hold it, and it will automatically close when it has enough data or if the program crashes. This step is crucial for later application because, even if the CNN model classifies it properly, it will not be effective if the data is incorrect in the first place. Screenshot 2024-07-14 at 7 04 37 PM

  2. Run python hdf5_conversion.py

    python hdf5_conversion.py

    Simply run the code and it will automatically create hdf5_file for you.

  3. Get Cohere API Key and create .env file

    echo "CO_API_KEY=your_actual_api_key_here" > .env

    This will echo CO_API_KEY=your_actual_api_key_here in .env. It will automatically create .env file if it does not exist. Simply change 'your_actual_api_key_here' to Cohere API Key

  4. Run detectingSignal.py

    python detectingSignal.py

    Run the following code and it will start displaying the letter on the monitor. Press 'c' and it will start saving the letter by given interval (changeable). Press 's' to stop and print the statement on terminal. Screenshot 2024-07-14 at 7 09 40 PM Screenshot 2024-07-14 at 7 09 59 PM

(back to top)

Usage

For individuals who don't understand American Sign Language (ASL), this tool allows ASL users to communicate by using hand signals in front of a computer, which then converts these signals into written sentences. This makes it easier for non-ASL users to read and understand hand signals conveniently.

(back to top)

Roadmap

  • Install OpenCV and mediapipe
  • Using both libraries, set it to detect hand and display handlandmarks
  • Create a rectangle around the hand using cv2.rectangle
  • Crop the rectangle seperately
  • Use its size to get lmList and get resized_lmList that fits into white square 300 by 300
  • Capture hand signals from a to z 200 each and split data samples 6:2:2 ratio
  • Train the model and optimize it to have >85% accuracy
  • Deploy the system and connect into AGI api (if not possible, skip this step)

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Junsoo Kim

Project Link: https://github.com/wirefailed/HandSignalCV.git

(back to top)

Acknowledgments

(back to top)

About

Created by Junsoo Kim. Hand Signal Computer Vision

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages