Helmet_Detection_OCR_ANPR / .windsurf-rules
Abs6187's picture
Upload 13 files
44abec2 verified
raw
history blame
3.19 kB
# Combined ANPR and Helmet Detection System
## Overview
This system integrates Automatic Number Plate Recognition (ANPR) for Indian vehicles with helmet detection for two-wheeler riders. It aims to enhance traffic safety monitoring by identifying vehicle registration numbers and checking for helmet usage in a single interface.
## Rules and Guidelines
1. **Input**: The system accepts images or video frames containing vehicles, preferably motorcycles or scooters.
2. **ANPR Functionality**:
- Detects and reads license plates of Indian vehicles.
- Supports various Indian license plate formats.
- Provides the recognized license plate number as text.
3. **Helmet Detection**:
- Identifies if the rider (and pillion rider, if present) is wearing a helmet.
- Returns a boolean value: True if helmet(s) detected, False otherwise.
4. **Combined Output**:
- License Plate Number
- Helmet Status (Yes/No)
- Confidence scores for both detections
5. **Error Handling**:
- If no license plate is detected, return "No plate detected"
- If no person is detected for helmet check, return "No rider detected"
## Workflow
1. User uploads an image or video frame to the system.
2. System processes the image through both ANPR and helmet detection models simultaneously.
3. ANPR model identifies and reads the license plate.
4. Helmet detection model checks for the presence of helmets on riders.
5. Results from both models are combined into a single output.
6. The system displays the results to the user.
## Usage Examples
### Example 1: Compliant Rider
**Input**: Image of a motorcycle with a clearly visible license plate and rider wearing a helmet.
**Output**:
```
License Plate: DL 5S AB 1234
Helmet Detected: Yes
ANPR Confidence: 98%
Helmet Detection Confidence: 95%
```
### Example 2: Non-compliant Rider
**Input**: Image of a scooter with visible license plate but rider not wearing a helmet.
**Output**:
```
License Plate: MH 01 AB 5678
Helmet Detected: No
ANPR Confidence: 97%
Helmet Detection Confidence: 99%
```
### Example 3: Multiple Riders
**Input**: Image of a motorcycle with two riders, both wearing helmets.
**Output**:
```
License Plate: KA 01 EF 9876
Helmet Detected: Yes
ANPR Confidence: 96%
Helmet Detection Confidence: 98%
Note: Multiple helmets detected
```
### Example 4: Unclear Image
**Input**: Blurry image of a vehicle with partially visible license plate.
**Output**:
```
License Plate: ?N 02 X? 43??
Helmet Detected: Uncertain
ANPR Confidence: 60%
Helmet Detection Confidence: 40%
Note: Low quality image, results may be inaccurate
```
## Best Practices
1. Use high-resolution images for better accuracy.
2. Ensure proper lighting conditions in the input images.
3. For video processing, select frames with clear views of both license plate and rider(s).
4. Regularly update the model with new training data to improve accuracy.
5. Use the confidence scores to filter out low-confidence detections if needed.
By following these guidelines and understanding the workflow, users can effectively utilize this combined ANPR and helmet detection system for traffic safety monitoring and enforcement.
```