dyldang commited on
Commit
0911d4e
·
verified ·
1 Parent(s): a509450

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -72
README.md CHANGED
@@ -1,28 +1,29 @@
1
  Model Description
2
 
3
- This model detects bike lane infrastructure and related objects in street images using object detection.
4
 
5
- I used a YOLOv11 model, which predicts bounding boxes and class labels for objects such as bike lanes, lane markings, cyclists, and vehicles. The model was fine-tuned from a pre-trained version using transfer learning.
6
 
7
- The goal of this project was to understand how well object detection performs in this setting and to evaluate its limitations, rather than just achieving high performance.
8
 
9
  Intended Use Cases:
10
 
11
- Transportation research
12
 
13
- Bike lane detection from street images
14
 
15
- Infrastructure analysis
 
 
16
 
17
  Training Data
18
 
19
  Dataset Source:
20
  Roboflow Universe – Bike Lane Computer Vision Dataset
21
 
22
- Dataset Size:
23
- 147 images, 7 classes
24
 
25
- Class Distribution:
26
 
27
  Class Count
28
  Vehicle 253
@@ -33,21 +34,26 @@ Cyclist 13
33
  Bicycle 2
34
  Car 2
35
 
36
- Data Collection Methodology:
37
- The dataset consists of urban street images containing bike lanes, vehicles, and cyclists under various lighting and road conditions.
 
 
 
 
 
 
38
 
39
- Annotation Process:
40
- The dataset included pre-existing YOLO bounding box annotations. These annotations label objects using rectangular bounding boxes and class labels.
41
 
42
- I reviewed a subset of images to verify:
43
 
44
- bounding box alignment
45
 
46
- label consistency
47
 
48
- No major modifications were made to the annotations. This means that while the dataset was usable, the project relied on existing annotations rather than adding new ones.
49
 
50
- Dataset Split:
51
 
52
  Train: 102 images (69%)
53
 
@@ -55,46 +61,47 @@ Validation: 20 images (14%)
55
 
56
  Test: 16 images (11%)
57
 
58
- Data Augmentation:
59
- Default YOLO augmentation was used, including flipping and color variation.
60
 
61
- Dataset Limitations / Biases:
62
 
63
- strong class imbalance
64
 
65
- very limited examples for some classes
66
 
67
- mostly urban, daytime conditions
68
 
69
- Training Procedure
 
 
 
 
70
 
71
- Framework:
72
- Ultralytics YOLOv11
73
 
74
- Training Approach:
75
- Fine-tuning a pre-trained model
76
 
77
- Hardware:
78
- Google Colab (CPU or GPU — update if needed)
 
79
 
80
- Training Time:
81
- Approximately ~1 hour
82
 
83
- Hyperparameters:
 
 
84
 
85
  Epochs: 50
86
 
87
  Image size: 640
88
 
89
- Batch size: 16 (default)
90
-
91
- Learning rate: default YOLO setting
92
 
93
- Preprocessing:
94
 
95
- images resized to 640×640
96
 
97
- normalization handled automatically
98
 
99
  Evaluation Results
100
 
@@ -106,80 +113,102 @@ Recall: ~0.38
106
 
107
  mAP50: ~0.48
108
 
109
- Rather than focusing only on the numbers, these metrics help explain how the model behaves.
110
 
111
- The model has relatively high precision, meaning most detections are correct, but lower recall, meaning it misses some objects.
112
 
113
- Per-Class Performance
114
-
115
- Strong performance on common classes such as vehicles and lane markings
116
 
117
- Weak performance on rare classes such as bicycle and car
118
 
119
- This is largely due to the imbalance in the dataset.
120
 
121
- Visual Examples of Classes
122
 
123
- (Upload images showing each class)
124
 
125
  Key Visualizations
126
 
127
- ![Prediction](./val_batch0_pred.jpg)
128
- ![Confusion Matrix](confusion_matrix.png)
129
-
130
 
131
  Performance Analysis
132
 
133
- The model performs well when:
 
 
134
 
135
- lane markings are clear
136
 
137
- lighting is consistent
138
 
139
- The model struggles when:
140
 
141
- lane markings are faded or unclear
142
 
143
- objects are partially occluded
144
 
145
- classes have very few examples
146
 
147
- This demonstrates that model performance is strongly influenced by dataset quality and class balance.
 
 
148
 
149
  Limitations and Biases
150
 
151
- Failure Cases:
 
 
152
 
153
  missed detections of bicycles and cars
154
 
155
- errors when lane markings are unclear
156
 
157
  confusion between similar lane types
158
 
159
- Data Biases:
160
 
161
  overrepresentation of vehicles
162
 
163
  underrepresentation of rare classes
164
 
165
- limited environmental diversity
166
 
167
- Environmental Limitations:
168
 
169
- poor lighting
 
 
170
 
171
  occlusion
172
 
173
- worn lane markings
 
 
174
 
175
- Inappropriate Use Cases:
176
  This model should not be used for:
177
 
178
- real-time safety decisions
179
 
180
  autonomous driving
181
 
182
- high-stakes applications
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
- Sample Size Limitations:
185
- Classes like bicycle and car have too few examples to be reliably detected.
 
1
  Model Description
2
 
3
+ This project uses a YOLOv11 object detection model to identify bike lane infrastructure and related objects in street images.
4
 
5
+ The model detects features such as bike lane markings, shared lanes, cyclists, and vehicles using bounding boxes and class labels. It was fine-tuned from a pre-trained YOLO model rather than trained from scratch, which allows it to learn from a relatively small dataset.
6
 
7
+ The main goal of this project was not just to build a high-performing model, but to understand how well object detection works in this context and what limitations arise when working with real-world, imperfect data.
8
 
9
  Intended Use Cases:
10
 
11
+ Exploring bike lane infrastructure in street imagery
12
 
13
+ Supporting transportation research
14
 
15
+ Analyzing road design and cyclist environments
16
+
17
+ This model is best suited for exploratory or research purposes rather than real-world deployment.
18
 
19
  Training Data
20
 
21
  Dataset Source:
22
  Roboflow Universe – Bike Lane Computer Vision Dataset
23
 
24
+ The dataset consists of 147 images of urban street environments, including a mix of road layouts, traffic conditions, and lighting scenarios.
 
25
 
26
+ Classes and Distribution:
27
 
28
  Class Count
29
  Vehicle 253
 
34
  Bicycle 2
35
  Car 2
36
 
37
+ One of the most important characteristics of this dataset is strong class imbalance. Some classes, like vehicles and lane markings, appear frequently, while others like bicycles and cars have almost no examples. This has a direct impact on model performance.
38
+
39
+ Data Collection & Characteristics:
40
+ Images represent real-world urban roads, primarily in daytime conditions, with varying visibility of lane markings and objects.
41
+
42
+ Annotation Process
43
+
44
+ The dataset included pre-existing YOLO-format bounding box annotations.
45
 
46
+ Instead of creating new annotations, I focused on reviewing and validating the existing ones. I manually inspected a subset of images to check:
 
47
 
48
+ whether bounding boxes aligned correctly with objects
49
 
50
+ whether labels were applied consistently
51
 
52
+ No major corrections were made. While this allowed me to focus on model training and evaluation, it also represents a limitation, since annotation quality was not improved or standardized further.
53
 
54
+ This is important because errors or inconsistencies in annotations can directly affect model performance, especially for less frequent classes.
55
 
56
+ Dataset Split
57
 
58
  Train: 102 images (69%)
59
 
 
61
 
62
  Test: 16 images (11%)
63
 
64
+ Data Augmentation
 
65
 
66
+ Default YOLO augmentation techniques were used during training, including:
67
 
68
+ horizontal flipping
69
 
70
+ color variation
71
 
72
+ mosaic augmentation
73
 
74
+ Known Dataset Limitations
75
+
76
+ Significant class imbalance
77
+
78
+ Extremely small number of examples for some classes
79
 
80
+ Limited dataset size overall
 
81
 
82
+ Mostly urban, daytime conditions (lack of environmental diversity)
 
83
 
84
+ Training Procedure
85
+
86
+ The model was trained using the Ultralytics YOLOv11 framework in Google Colab.
87
 
88
+ I fine-tuned a pre-trained model for 50 epochs using images resized to 640 × 640 pixels.
 
89
 
90
+ Training Details:
91
+
92
+ Framework: Ultralytics YOLOv11
93
 
94
  Epochs: 50
95
 
96
  Image size: 640
97
 
98
+ Batch size: 16
 
 
99
 
100
+ Learning rate: default YOLO settings
101
 
102
+ Environment: Google Colab
103
 
104
+ Training relied on transfer learning, which is especially useful given the small dataset size.
105
 
106
  Evaluation Results
107
 
 
113
 
114
  mAP50: ~0.48
115
 
116
+ Rather than focusing only on these numbers, it is more important to understand what they reveal about the model.
117
 
118
+ The relatively high precision indicates that when the model makes a prediction, it is usually correct. However, the low recall suggests that the model is missing a significant number of objects.
119
 
120
+ This imbalance between precision and recall shows that the model is somewhat conservative — it avoids false positives but fails to detect more difficult or less frequent objects.
 
 
121
 
122
+ Per-Class Performance
123
 
124
+ Strong performance on common classes (vehicles, lane markings)
125
 
126
+ Weak performance on rare classes (bicycle, car)
127
 
128
+ This is largely due to the extreme imbalance in the dataset.
129
 
130
  Key Visualizations
131
 
132
+ ![Confusion Matrix](./confusion_matrix.png)
133
+ ![Training Results](./results.png)
134
+ ![Prediction Example](./val_batch0_pred.jpg)
135
 
136
  Performance Analysis
137
 
138
+ The model performs best when:
139
+
140
+ lane markings are clearly visible
141
 
142
+ lighting conditions are consistent
143
 
144
+ objects are not occluded
145
 
146
+ However, the model struggles in several situations:
147
 
148
+ faded or worn bike lane markings
149
 
150
+ overlapping or partially blocked objects
151
 
152
+ rare classes with very limited training data
153
 
154
+ These results highlight that performance is not just about the model architecture, but heavily influenced by the dataset.
155
+
156
+ In particular, the lack of examples for certain classes makes it difficult for the model to learn meaningful patterns.
157
 
158
  Limitations and Biases
159
 
160
+ This model has several important limitations that should be clearly acknowledged.
161
+
162
+ Failure Cases
163
 
164
  missed detections of bicycles and cars
165
 
166
+ incorrect detections when lane markings are unclear
167
 
168
  confusion between similar lane types
169
 
170
+ Data Biases
171
 
172
  overrepresentation of vehicles
173
 
174
  underrepresentation of rare classes
175
 
176
+ limited diversity in environment and conditions
177
 
178
+ Environmental Limitations
179
 
180
+ The model may perform poorly under:
181
+
182
+ low lighting conditions
183
 
184
  occlusion
185
 
186
+ faded or damaged road markings
187
+
188
+ Inappropriate Use Cases
189
 
 
190
  This model should not be used for:
191
 
192
+ real-time safety systems
193
 
194
  autonomous driving
195
 
196
+ decision-making in high-risk environments
197
+
198
+ Sample Size Limitations
199
+
200
+ Some classes (such as bicycle and car) have extremely limited training data, making reliable detection difficult. This directly impacts recall and overall model performance.
201
+
202
+ Final Reflection
203
+
204
+ This project demonstrates that even with a strong model like YOLOv11, performance is highly dependent on the dataset.
205
+
206
+ Rather than focusing only on improving accuracy, this project highlights the importance of:
207
+
208
+ dataset quality
209
+
210
+ class balance
211
+
212
+ annotation reliability
213
 
214
+ Understanding these limitations is essential when applying computer vision models to real-world problems.