A real-time sign language gesture detection system powered by a custom-trained YOLOv5 model. This project enables accurate recognition and classification of sign language gestures through webcam inference.
- Features
- Prerequisites
- Installation
- Usage
- Project Structure
- Model Details
- Performance
- Contributing
- License
- Real-time Detection: Live webcam inference with low-latency gesture recognition
- Custom YOLOv5 Model: Fine-tuned for sign language gesture classification
- High Accuracy: Optimized for detecting multiple gesture classes
- Easy-to-Use Interface: Simple command-line interface for inference
- Flexible Deployment: Support for CPU and GPU inference
- Extensible Design: Easy to add new gesture classes and retrain
- Python 3.8 or higher
- pip package manager
- Webcam (for real-time inference)
- GPU support (optional, for faster inference)
-
Clone the repository
git clone https://github.com/Ashwin-A-00/sign-language-detection.git cd sign-language-detection -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
Run the real-time detection on your webcam:
python inference.pypython inference.py --model path/to/model.pt --conf 0.5 --device 0Options:
--model: Path to the trained YOLOv5 model (default: weights/best.pt)--conf: Confidence threshold for detections (default: 0.5)--device: Device to use (0 for GPU, cpu for CPU)
Detect gestures in a single image:
python inference.py --source image.jpg --model weights/best.ptsign-language-detection/
├── README.md # This file
├── requirements.txt # Python dependencies
├── inference.py # Real-time inference script
├── train.py # Model training script
├── data/
│ ├── dataset.yaml # Dataset configuration
│ ├── train/ # Training images
│ └── val/ # Validation images
├── weights/
│ └── best.pt # Pre-trained model weights
└── utils/
├── preprocess.py # Data preprocessing utilities
└── augmentation.py # Data augmentation utilities
- Architecture: YOLOv5
- Input Size: 640x640
- Framework: PyTorch
- Training Data: Custom sign language gesture dataset
- Classes: [List your gesture classes here]
| Metric | Value |
|---|---|
| mAP@0.5 | XX% |
| mAP@0.5:0.95 | XX% |
| Inference Speed | XX ms |
| Model Size | XX MB |
Note: Replace with your actual metrics
- Real-time Processing: Achieves ~30 FPS on GPU
- Latency: ~33ms per frame on NVIDIA GPU
- CPU Performance: Supported for deployment on edge devices
The model is trained to detect the following sign language gestures:
- [Gesture 1]
- [Gesture 2]
- [Gesture 3]
- [Add more gestures]
To train the model on your custom dataset:
python train.py --img 640 --batch 16 --epochs 100 --data data/dataset.yaml --weights weights/yolov5s.ptFor detailed training instructions, refer to the YOLOv5 documentation.
- Ensure proper lighting conditions
- Add more training data with varied backgrounds
- Increase confidence threshold
- Use GPU for acceleration
- Reduce input image size
- Use a smaller YOLOv5 variant (s, m instead of l, x)
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Ashwin-A-00
- GitHub: @Ashwin-A-00
- Ultralytics YOLOv5 for the excellent detection framework
- The open-source community for valuable feedback and contributions
For questions or suggestions, feel free to open an issue or reach out via GitHub.
Last Updated: May 2026