Alessandro Ferrante
commited on
Commit
Β·
0357eeb
1
Parent(s):
430120d
Upload StreetSignSense YOLO12s model and metrics
Browse files- .gitattributes +3 -0
- README.md +193 -0
- metrics/BoxF1_curve.png +3 -0
- metrics/BoxPR_curve.png +3 -0
- metrics/BoxP_curve.png +3 -0
- metrics/BoxR_curve.png +3 -0
- metrics/confusion_matrix.png +3 -0
- metrics/confusion_matrix_normalized.png +3 -0
- metrics/labels.jpg +3 -0
- metrics/results.csv +3 -0
- metrics/results.png +3 -0
- streetsignsense-yolo12s.pt +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
*.csv filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,196 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
license: cc-by-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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10 |
+
- yolov12
|
| 11 |
+
- traffic-signs
|
| 12 |
+
- autonomous-driving
|
| 13 |
+
- adas
|
| 14 |
+
datasets:
|
| 15 |
+
- AlessandroFerrante/StreetSignSet
|
| 16 |
+
metrics:
|
| 17 |
+
- mAP
|
| 18 |
+
- f1
|
| 19 |
+
- precision
|
| 20 |
+
- recall
|
| 21 |
+
pipeline_tag: object-detection
|
| 22 |
---
|
| 23 |
+
<div align="center">
|
| 24 |
+
|
| 25 |
+
# StreetSignSenseYOLO12s
|
| 26 |
+
|
| 27 |
+
[](https://github.com/ultralytics/ultralytics)
|
| 28 |
+
[](https://github.com/ultralytics/ultralytics)
|
| 29 |
+
[](https://github.com/sunsmarterjie/yolov12)
|
| 30 |
+
|
| 31 |
+
[](https://www.python.org/)
|
| 32 |
+
[](https://pytorch.org/)
|
| 33 |
+
[](LICENSE)
|
| 34 |
+
[](LICENSE)
|
| 35 |
+
|
| 36 |
+
[](https://github.com/AlessandroFerrante/StreetSignSense/) [](https://alessandroferrante.github.io/StreetSignSense/report/Report.pdf)
|
| 37 |
+
|
| 38 |
+
[](https://github.com/AlessandroFerrante/StreetSignSense/releases)
|
| 39 |
+
[](https://github.com/AlessandroFerrante/StreetSignSense/releases)
|
| 40 |
+
[](https://github.com/AlessandroFerrante/StreetSignSense/releases)
|
| 41 |
+
|
| 42 |
+
[](https://www.kaggle.com/models/ferrantealessandro/streetsignsensey12n/)
|
| 43 |
+
[](https://www.kaggle.com/models/ferrantealessandro/streetsignsensey12s/)
|
| 44 |
+
[](https://www.kaggle.com/models/ferrantealessandro/streetsignsensey12m/)
|
| 45 |
+
|
| 46 |
+
[](https://huggingface.co/AlessandroFerrante/StreetSignSenseY12n)
|
| 47 |
+
[](https://HuggingFace.co/AlessandroFerrante/StreetSignSenseY12s)
|
| 48 |
+
[](https://huggingface.co/AlessandroFerrante/StreetSignSenseY12m)
|
| 49 |
+
|
| 50 |
+
</div>
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
# Model Summary
|
| 55 |
+
|
| 56 |
+
**Street Sign Sense (YOLO12s)** is an object detection model designed to identify and classify traffic signs in real-time. Based on the **YOLO12 Small** architecture, this model offers a sweet spot between the extreme speed of the Nano version and the higher accuracy of the Medium version and balances high accuracy with computational efficiency, making it suitable for Advanced Driver Assistance Systems (ADAS) research. It has been trained on the custom **Street Sign Set**, covering **63 distinct classes** of traffic signs.
|
| 57 |
+
|
| 58 |
+
## Usage
|
| 59 |
+
|
| 60 |
+
### Live Demo
|
| 61 |
+
|
| 62 |
+
You can test this model instantly in your browser without any setup: π **[Interactive Web Demo](http://alessandroferrante.github.io/StreetSignSense)**
|
| 63 |
+
|
| 64 |
+
#### Python
|
| 65 |
+
|
| 66 |
+
This model can be used with the Ultralytics framework or the official YOLOv12 repository. It takes an image as input and outputs bounding boxes with class labels and confidence scores.
|
| 67 |
+
|
| 68 |
+
### Code Snippet (Python)
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
from ultralytics import YOLO
|
| 72 |
+
|
| 73 |
+
# Load the model
|
| 74 |
+
model = YOLO('path/to/streetsignsense-yolo12s.pt') # Replace with the downloaded model path
|
| 75 |
+
|
| 76 |
+
# Run inference on an image
|
| 77 |
+
results = model.predict(source='path/to/image.jpg')
|
| 78 |
+
|
| 79 |
+
# Show results
|
| 80 |
+
results[0].show()
|
| 81 |
+
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
**Inputs:** Images (RGB) of various resolutions (model trained at standard YOLO resolutions, e.g., 640x640).
|
| 85 |
+
**Outputs:** List of `Results` objects containing bounding boxes (`xyxy`), class IDs, and confidence scores.
|
| 86 |
+
|
| 87 |
+
```text
|
| 88 |
+
/StreetSignSenseY12s
|
| 89 |
+
βββ .gitattributes
|
| 90 |
+
βββ README.md
|
| 91 |
+
βββ streetsignsense-yolo12s.pt
|
| 92 |
+
βββ metrics/ # metrics image folder
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
## System
|
| 96 |
+
|
| 97 |
+
**Standalone Model:** Yes, this is a standalone object detection model.
|
| 98 |
+
**Input Requirements:** Standard RGB images. No specific metadata required.
|
| 99 |
+
**Downstream Dependencies:** The output (detected classes and locations) is intended to be used by decision-making logic in ADAS simulations or autonomous driving pipelines.
|
| 100 |
+
|
| 101 |
+
## Implementation requirements
|
| 102 |
+
|
| 103 |
+
**Hardware:** Training was performed on Kaggle Notebooks using NVIDIA GPUs (e.g., Tesla P100 or T4).
|
| 104 |
+
**Software:** PyTorch, Ultralytics YOLO framework.
|
| 105 |
+
**Compute:**
|
| 106 |
+
|
| 107 |
+
* **Training Time:** 7h 4m 25s Β· GPU T4 x2 (depending on epochs).
|
| 108 |
+
* **Inference:** Capable of real-time performance (12.6 ms, 79 FPS) on modern GPUs.
|
| 109 |
+
|
| 110 |
+
# Model Characteristics
|
| 111 |
+
|
| 112 |
+
## Model initialization
|
| 113 |
+
|
| 114 |
+
**Fine-tuned:** The model was initialized with pre-trained COCO weights (Transfer Learning) and then fine-tuned on the "Street Sign Sense" dataset to specialize in traffic sign detection.
|
| 115 |
+
|
| 116 |
+
## Model stats
|
| 117 |
+
|
| 118 |
+
**Architecture:** YOLOv12s (Small).
|
| 119 |
+
**Characteristics:** Balanced architecture.
|
| 120 |
+
**Size:** Small size. It offers better feature extraction than the Nano version while maintaining very fast inference speeds.
|
| 121 |
+
|
| 122 |
+
## Other details
|
| 123 |
+
|
| 124 |
+
**Precision:** Trained using Mixed Precision (AMP).
|
| 125 |
+
**Pruning/Quantization:** The uploaded weights are standard FP32/FP16. No post-training quantization has been applied yet.
|
| 126 |
+
|
| 127 |
+
# Data Overview
|
| 128 |
+
|
| 129 |
+
## Training data
|
| 130 |
+
|
| 131 |
+
The model was trained on the **Street Sign Set** (available on Kaggle).
|
| 132 |
+
|
| 133 |
+
* **Source:** A combination of public datasets and manually collected/annotated images.
|
| 134 |
+
* **Size:** Contains thousands of images with bounding box annotations.
|
| 135 |
+
* **Classes:** 63 specific traffic sign classes (speed limits, warnings, prohibitions, etc.).
|
| 136 |
+
* **Preprocessing:** Images were resized, and data augmentation (Mosaic, scaling, color adjustments) was applied during training to improve robustness.
|
| 137 |
+
|
| 138 |
+
## Demographic groups
|
| 139 |
+
|
| 140 |
+
**N/A:** The dataset consists of street signs and environmental imagery. No human demographic data is involved or analyzed.
|
| 141 |
+
|
| 142 |
+
## Evaluation data
|
| 143 |
+
|
| 144 |
+
The dataset was split into:
|
| 145 |
+
|
| 146 |
+
* **Train:** 70-80%
|
| 147 |
+
* **Validation:** 10-20%
|
| 148 |
+
* **Test:** 10%
|
| 149 |
+
**Differences:** The test set contains unseen images from different environmental conditions to test generalization.
|
| 150 |
+
|
| 151 |
+
# Evaluation Results
|
| 152 |
+
|
| 153 |
+
* **Overview Risultati:**
|
| 154 |
+

|
| 155 |
+
* **Confusion Matrix:**
|
| 156 |
+

|
| 157 |
+
|
| 158 |
+
#### Detailed Curves (Small)
|
| 159 |
+
|
| 160 |
+
| Precision-Recall | F1 Score |
|
| 161 |
+
| :--------------------------------------: | :--------------------------------------: |
|
| 162 |
+
|  |  |
|
| 163 |
+
| **Precision** | **Recall** |
|
| 164 |
+
|  |  |
|
| 165 |
+
|
| 166 |
+
## Summary
|
| 167 |
+
|
| 168 |
+
The model achieves high Mean Average Precision (mAP) on the test set, demonstrating strong capabilities in detecting small objects (traffic signs at a distance) and operating in varied lighting conditions.
|
| 169 |
+
|
| 170 |
+
* **Detailed Metrics:** Please refer to the training graphs (F1-score, Precision-Recall curve) included in the attached notebooks.
|
| 171 |
+
|
| 172 |
+
## Subgroup evaluation results
|
| 173 |
+
|
| 174 |
+
Performance is generally consistent across major classes (e.g., Speed Limits, Stop signs). However, classes with significantly fewer samples in the dataset may show slightly lower recall.
|
| 175 |
+
|
| 176 |
+
## Fairness
|
| 177 |
+
|
| 178 |
+
**Definition:** Fairness in this context is defined as the model's ability to detect signs regardless of background clutter or slight occlusions.
|
| 179 |
+
**Results:** The model shows robust performance in standard driving scenarios.
|
| 180 |
+
|
| 181 |
+
## Usage limitations
|
| 182 |
+
|
| 183 |
+
* **Lighting:** Performance may degrade in extreme low-light conditions (night without streetlights) or heavy weather (dense fog/heavy rain) if not sufficiently represented in the training data.
|
| 184 |
+
* **Occlusion:** Signs that are more than 50% occluded may not be detected reliably.
|
| 185 |
+
* **Geography:** The model is trained primarily on European/International standard signs; it may not recognize signs specific to other regions that differ significantly in shape or color.
|
| 186 |
+
|
| 187 |
+
## Ethics
|
| 188 |
+
|
| 189 |
+
**Safety:** This model is for research and educational purposes (ADAS development). It should **not** be used as the sole system for controlling a real vehicle on public roads without extensive safety validation and redundancy.
|
| 190 |
+
**Privacy:** The dataset focuses on public street signs. Any incidental faces or license plates in the background are not the target of this model.
|
| 191 |
+
|
| 192 |
+
## π¨βπ» Author
|
| 193 |
+
|
| 194 |
+
[Alessandro Ferrante](https://alessandroferrante.net)
|
| 195 |
+
|
| 196 |
+
Email: [streetsignsense@alessandroferrante.net](mailto:streetsignsense@alessandroferrante.net)
|
metrics/BoxF1_curve.png
ADDED
|
Git LFS Details
|
metrics/BoxPR_curve.png
ADDED
|
Git LFS Details
|
metrics/BoxP_curve.png
ADDED
|
Git LFS Details
|
metrics/BoxR_curve.png
ADDED
|
Git LFS Details
|
metrics/confusion_matrix.png
ADDED
|
Git LFS Details
|
metrics/confusion_matrix_normalized.png
ADDED
|
Git LFS Details
|
metrics/labels.jpg
ADDED
|
Git LFS Details
|
metrics/results.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c27d87554d26eb366b4b0f1239c1e23d28bd64c98cd3150fd4e0d605d4de7b0
|
| 3 |
+
size 32255
|
metrics/results.png
ADDED
|
Git LFS Details
|
streetsignsense-yolo12s.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea716000d066b3c48de91583210e8934de1865cb1956857c9c0fb89f7ec9ef9e
|
| 3 |
+
size 19008787
|