Alessandro Ferrante commited on
Commit
0357eeb
Β·
1 Parent(s): 430120d

Upload StreetSignSense YOLO12s model and metrics

Browse files
.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
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: cc-by-4.0
5
+ library_name: ultralytics
6
+ tags:
7
+ - real-time
8
+ - object-detection
9
+ - yolo
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
+ [![Ultralytics 8.3.229 ](https://img.shields.io/badge/Ultralytics-8.3.229-lightblue?logo=ultralytics&logoColor=white)](https://github.com/ultralytics/ultralytics)
28
+ [![Ultralytics Github](https://img.shields.io/badge/Ultralytics-Github-darkgreen?logo=ultralytics&logoColor=white)](https://github.com/ultralytics/ultralytics)
29
+ [![Ultralytics YOLO12](https://img.shields.io/badge/Ultralytics-YOLO12-8A2BE2?logo=ultralytics&logoColor=white)](https://github.com/sunsmarterjie/yolov12)
30
+
31
+ [![Python 3.11.13 ](https://img.shields.io/badge/Python-3.11.13-blue?logo=python&logoColor=white)](https://www.python.org/)
32
+ [![PyTorch 2.6.0](https://img.shields.io/badge/PyTorch-2.6.0-EE4C2C?logo=pytorch&logoColor=white)](https://pytorch.org/)
33
+ [![License](https://img.shields.io/badge/License-MIT-green.svg?)](LICENSE)
34
+ [![License](https://img.shields.io/badge/License-CC_BY_4.0-orange.svg?)](LICENSE)
35
+
36
+ [![Project-StreetSignSense](https://img.shields.io/badge/Project-StreetSignSense-007bff.svg)](https://github.com/AlessandroFerrante/StreetSignSense/) [![Badge Report PDF](https://img.shields.io/badge/πŸ“‘-Technical_Report-white?logo=pdf&logoColor=white)](https://alessandroferrante.github.io/StreetSignSense/report/Report.pdf)
37
+
38
+ [![GitHub Release](https://img.shields.io/badge/GitHub-StreetSignSenseY12n-181717?logo=github)](https://github.com/AlessandroFerrante/StreetSignSense/releases)
39
+ [![GitHub Release](https://img.shields.io/badge/GitHub-StreetSignSenseY12s-181717?logo=github)](https://github.com/AlessandroFerrante/StreetSignSense/releases)
40
+ [![GitHub Release](https://img.shields.io/badge/GitHub-StreetSignSenseY12m-181717?logo=github)](https://github.com/AlessandroFerrante/StreetSignSense/releases)
41
+
42
+ [![Model-StreetSignSense](https://img.shields.io/badge/KaggleModel-StreetSignSenseY12n-20BEFF.svg?logo=kaggle&logoColor=white)](https://www.kaggle.com/models/ferrantealessandro/streetsignsensey12n/)
43
+ [![Model-StreetSignSense](https://img.shields.io/badge/KaggleModel-StreetSignSenseY12s-20BEFF.svg?logo=kaggle&logoColor=white)](https://www.kaggle.com/models/ferrantealessandro/streetsignsensey12s/)
44
+ [![Model-StreetSignSense](https://img.shields.io/badge/KaggleModel-StreetSignSenseY12m-20BEFF.svg?logo=kaggle&logoColor=white)](https://www.kaggle.com/models/ferrantealessandro/streetsignsensey12m/)
45
+
46
+ [![Model-StreetSignSense](https://img.shields.io/badge/HuggingFace-StreetSignSenseY12n-FFD21E.svg?logo=huggingface)](https://huggingface.co/AlessandroFerrante/StreetSignSenseY12n)
47
+ [![Model-StreetSignSense](https://img.shields.io/badge/KaggleModel-StreetSignSenseY12s-FFD21E.svg?logo=huggingface)](https://HuggingFace.co/AlessandroFerrante/StreetSignSenseY12s)
48
+ [![Model-StreetSignSense](https://img.shields.io/badge/HuggingFace-StreetSignSenseY12m-FFD21E.svg?logo=huggingface)](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
+ ![Results Small](metrics/results.png)
155
+ * **Confusion Matrix:**
156
+ ![Confusion Matrix Small](metrics/confusion_matrix_normalized.png)
157
+
158
+ #### Detailed Curves (Small)
159
+
160
+ | Precision-Recall | F1 Score |
161
+ | :--------------------------------------: | :--------------------------------------: |
162
+ | ![PR Curve Small](metrics/BoxPR_curve.png) | ![F1 Curve Small](metrics/BoxF1_curve.png) |
163
+ | **Precision** | **Recall** |
164
+ | ![P Curve Small](metrics/BoxP_curve.png) | ![R Curve Small](metrics/BoxR_curve.png) |
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

  • SHA256: fc9caedf9c3c6fb80e55b0a375e4399b20ea40c2bc5ace74b96cff0743def437
  • Pointer size: 131 Bytes
  • Size of remote file: 553 kB
metrics/BoxPR_curve.png ADDED

Git LFS Details

  • SHA256: c9a5254513a599c2ee3cfa3ee9420660b52f3b0e0309fde4f74b759ccb9c7a80
  • Pointer size: 131 Bytes
  • Size of remote file: 235 kB
metrics/BoxP_curve.png ADDED

Git LFS Details

  • SHA256: 54c703e286bf41cbfac33e216fe8c376f0ad3bfa48e79f3e1a84ee3d0a1a1274
  • Pointer size: 131 Bytes
  • Size of remote file: 511 kB
metrics/BoxR_curve.png ADDED

Git LFS Details

  • SHA256: e1b6254adc223728f9741d6429a7901b279f9a8ec4c001abd1093f93aaf6375b
  • Pointer size: 131 Bytes
  • Size of remote file: 456 kB
metrics/confusion_matrix.png ADDED

Git LFS Details

  • SHA256: 181fe79cda84ad9912243c6a99ccdf9ef88ac3915ad1723622f2e796d41c28a6
  • Pointer size: 131 Bytes
  • Size of remote file: 658 kB
metrics/confusion_matrix_normalized.png ADDED

Git LFS Details

  • SHA256: 19e274560a5c0ae34460fbde7d4a589e2897b5f0f9b015beb2753f5248723d17
  • Pointer size: 131 Bytes
  • Size of remote file: 659 kB
metrics/labels.jpg ADDED

Git LFS Details

  • SHA256: c53afd942b881c9a0d0ad1226799d8b1272f7d6600c5519291a2c200597b5844
  • Pointer size: 131 Bytes
  • Size of remote file: 185 kB
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

  • SHA256: 88e97b4fa336e4bb61f0d2d142128d71517f1a7f7fe19fff0e394e61786c0b97
  • Pointer size: 131 Bytes
  • Size of remote file: 249 kB
streetsignsense-yolo12s.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea716000d066b3c48de91583210e8934de1865cb1956857c9c0fb89f7ec9ef9e
3
+ size 19008787