Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–οΈ ASL Hand Detection System

A computer vision system that detects left and right hands to assist in recognizing American Sign Language (ASL) gestures. This project uses OpenCV and Mediapipe to identify and crop hand regions from webcam video in real time, saving them for dataset creation and further training.


πŸ“Έ Features

βœ… Real-time detection of left and right hands
βœ… Automatic cropping and saving of detected hands
βœ… Adjustable offset and image size for better framing
βœ… Label assignment to different ASL gestures
βœ… Built with Python, OpenCV, and Mediapipe


πŸš€ Installation

  1. Clone the repository
    git clone https://github.com/yourusername/HandSignDetectionn.git
    cd HandSignDetectionn

(Optional but recommended) Create a virtual environment

bash Copy Edit python -m venv .venv source .venv/bin/activate # macOS/Linux .venv\Scripts\activate # Windows Install dependencies

bash Copy Edit pip install -r requirements.txt βš™οΈ Usage Run the data collection script to start capturing images:

bash Copy Edit python dataCollection.py By default, images will be saved under the Data/ folder with subfolders based on your assigned labels.

Edit dataCollection.py to change:

offset β†’ Margin around the cropped hand

imgSize β†’ Output image size (default: 300Γ—300)

folder β†’ Data save location

labels β†’ List of labels for your ASL signs

Press q in the OpenCV window to exit the program.

πŸ› οΈ Project Structure bash Copy Edit HandSignDetectionn/ β”œβ”€β”€ dataCollection.py # Main hand detection & data collection script β”œβ”€β”€ test.py # Script for testing detection (optional) β”œβ”€β”€ Data/ # Folder for collected hand images β”œβ”€β”€ README.md # Project documentation └── requirements.txt # Python dependencies ❗ Troubleshooting cv2.error: ... !ssize.empty() This error occurs if no hand is detected in the frame. Make sure your webcam is active and your hand is visible.

Cannot open camera Check your webcam permissions or try restarting your computer.

πŸ—οΈ Contributing Contributions are welcome! You can:

Add new ASL gestures or improve label handling.

Optimize detection accuracy.

Create a GUI for easier usage.

Train a full ASL recognition model using collected data.

To contribute:

Fork the repo

Create a new branch (git checkout -b feature/YourFeature)

Commit your changes

Push to your branch and open a pull request

πŸ“œ License This project is licensed under the MIT License.

πŸ™Œ Acknowledgements OpenCV – Computer vision library

Mediapipe – Real-time hand tracking

Python – The language powering it all

⭐ If you find this project helpful, consider giving it a star on GitHub!

yaml Copy Edit


βœ… Next Steps

  1. Save this text as a README.md file at your project root.
  2. Commit and push it to GitHub:
    git add README.md
    git commit -m "Add complete project README"
    git push origin main

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors