Spaces:
Sleeping
Sleeping
Delete .windsurf-rules
Browse files- .windsurf-rules +0 -109
.windsurf-rules
DELETED
|
@@ -1,109 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
# Combined ANPR and Helmet Detection System
|
| 3 |
-
|
| 4 |
-
## Overview
|
| 5 |
-
|
| 6 |
-
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.
|
| 7 |
-
|
| 8 |
-
## Rules and Guidelines
|
| 9 |
-
|
| 10 |
-
1. **Input**: The system accepts images or video frames containing vehicles, preferably motorcycles or scooters.
|
| 11 |
-
|
| 12 |
-
2. **ANPR Functionality**:
|
| 13 |
-
- Detects and reads license plates of Indian vehicles.
|
| 14 |
-
- Supports various Indian license plate formats.
|
| 15 |
-
- Provides the recognized license plate number as text.
|
| 16 |
-
|
| 17 |
-
3. **Helmet Detection**:
|
| 18 |
-
- Identifies if the rider (and pillion rider, if present) is wearing a helmet.
|
| 19 |
-
- Returns a boolean value: True if helmet(s) detected, False otherwise.
|
| 20 |
-
|
| 21 |
-
4. **Combined Output**:
|
| 22 |
-
- License Plate Number
|
| 23 |
-
- Helmet Status (Yes/No)
|
| 24 |
-
- Confidence scores for both detections
|
| 25 |
-
|
| 26 |
-
5. **Error Handling**:
|
| 27 |
-
- If no license plate is detected, return "No plate detected"
|
| 28 |
-
- If no person is detected for helmet check, return "No rider detected"
|
| 29 |
-
|
| 30 |
-
## Workflow
|
| 31 |
-
|
| 32 |
-
1. User uploads an image or video frame to the system.
|
| 33 |
-
2. System processes the image through both ANPR and helmet detection models simultaneously.
|
| 34 |
-
3. ANPR model identifies and reads the license plate.
|
| 35 |
-
4. Helmet detection model checks for the presence of helmets on riders.
|
| 36 |
-
5. Results from both models are combined into a single output.
|
| 37 |
-
6. The system displays the results to the user.
|
| 38 |
-
|
| 39 |
-
## Usage Examples
|
| 40 |
-
|
| 41 |
-
### Example 1: Compliant Rider
|
| 42 |
-
|
| 43 |
-
**Input**: Image of a motorcycle with a clearly visible license plate and rider wearing a helmet.
|
| 44 |
-
|
| 45 |
-
**Output**:
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
-
License Plate: DL 5S AB 1234
|
| 49 |
-
Helmet Detected: Yes
|
| 50 |
-
ANPR Confidence: 98%
|
| 51 |
-
Helmet Detection Confidence: 95%
|
| 52 |
-
|
| 53 |
-
```
|
| 54 |
-
|
| 55 |
-
### Example 2: Non-compliant Rider
|
| 56 |
-
|
| 57 |
-
**Input**: Image of a scooter with visible license plate but rider not wearing a helmet.
|
| 58 |
-
|
| 59 |
-
**Output**:
|
| 60 |
-
```
|
| 61 |
-
|
| 62 |
-
License Plate: MH 01 AB 5678
|
| 63 |
-
Helmet Detected: No
|
| 64 |
-
ANPR Confidence: 97%
|
| 65 |
-
Helmet Detection Confidence: 99%
|
| 66 |
-
|
| 67 |
-
```
|
| 68 |
-
|
| 69 |
-
### Example 3: Multiple Riders
|
| 70 |
-
|
| 71 |
-
**Input**: Image of a motorcycle with two riders, both wearing helmets.
|
| 72 |
-
|
| 73 |
-
**Output**:
|
| 74 |
-
```
|
| 75 |
-
|
| 76 |
-
License Plate: KA 01 EF 9876
|
| 77 |
-
Helmet Detected: Yes
|
| 78 |
-
ANPR Confidence: 96%
|
| 79 |
-
Helmet Detection Confidence: 98%
|
| 80 |
-
Note: Multiple helmets detected
|
| 81 |
-
|
| 82 |
-
```
|
| 83 |
-
|
| 84 |
-
### Example 4: Unclear Image
|
| 85 |
-
|
| 86 |
-
**Input**: Blurry image of a vehicle with partially visible license plate.
|
| 87 |
-
|
| 88 |
-
**Output**:
|
| 89 |
-
```
|
| 90 |
-
|
| 91 |
-
License Plate: ?N 02 X? 43??
|
| 92 |
-
Helmet Detected: Uncertain
|
| 93 |
-
ANPR Confidence: 60%
|
| 94 |
-
Helmet Detection Confidence: 40%
|
| 95 |
-
Note: Low quality image, results may be inaccurate
|
| 96 |
-
|
| 97 |
-
```
|
| 98 |
-
|
| 99 |
-
## Best Practices
|
| 100 |
-
|
| 101 |
-
1. Use high-resolution images for better accuracy.
|
| 102 |
-
2. Ensure proper lighting conditions in the input images.
|
| 103 |
-
3. For video processing, select frames with clear views of both license plate and rider(s).
|
| 104 |
-
4. Regularly update the model with new training data to improve accuracy.
|
| 105 |
-
5. Use the confidence scores to filter out low-confidence detections if needed.
|
| 106 |
-
|
| 107 |
-
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.
|
| 108 |
-
```
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|