Abs6187's picture
Update README.md
1a2f286 verified
---
license: mit
title: Helmet_Detection_OCR_ANPR
sdk: gradio
emoji: ๐Ÿ“š
colorFrom: red
colorTo: yellow
short_description: Helmet_Detection_OCR_ANPR
---
# Combined ANPR and Helmet Detection System
A comprehensive traffic violation detection system that combines Automatic Number Plate Recognition (ANPR) and Helmet Detection using YOLOv8.
## Features
- Real-time license plate detection and recognition
- Helmet detection for two-wheeler riders
- Modern Gradio interface with real-time processing
- Adjustable confidence threshold for detection
- Combined visual annotations from both models
- Queue support for multiple users
- Comprehensive error handling
## Prerequisites
- Python 3.8 or higher
- CUDA-capable GPU (recommended for better performance)
- 8GB RAM minimum
## Installation
1. Clone the repository:
```bash
git clone <repository-url>
cd <repository-name>
```
2. Create and activate a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
## Usage
1. Start the application:
```bash
python app.py
```
2. Open your web browser and navigate to:
```
http://localhost:7860
```
3. Upload an image or use the example images to test the system.
## Model Files
The following model files are required:
- `ANPR_IND/licence_plat.pt`: License plate detection model
- `ANPR_IND/licence_character.pt`: Character recognition model
- `Helmet-Detect-model/best.pt`: Helmet detection model
## API Endpoints
The application exposes the following endpoints:
- `/api/predict`: POST endpoint for image processing
- `/api/health`: GET endpoint for health check
## Deployment
### Local Deployment
```bash
python app.py
```
### Docker Deployment
```bash
docker build -t traffic-detection .
docker run -p 7860:7860 traffic-detection
```
## Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a new Pull Request
## License
This project is licensed under the MIT License - see the LICENSE file for details.