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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 29 |
+
Bicycle Lane 129
|
| 30 |
+
Shared Dotted Lane 124
|
| 31 |
+
Solid Lane 59
|
| 32 |
+
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 |
+
|
| 54 |
+
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 |
+
|
| 101 |
+
Key Metrics:
|
| 102 |
+
|
| 103 |
+
Precision: ~0.88
|
| 104 |
+
|
| 105 |
+
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 |
+
Include:
|
| 128 |
+
|
| 129 |
+
confusion matrix
|
| 130 |
+
|
| 131 |
+
training loss curves
|
| 132 |
+
|
| 133 |
+
prediction examples
|
| 134 |
+
|
| 135 |
+
Performance Analysis
|
| 136 |
+
|
| 137 |
+
The model performs well when:
|
| 138 |
+
|
| 139 |
+
lane markings are clear
|
| 140 |
+
|
| 141 |
+
lighting is consistent
|
| 142 |
+
|
| 143 |
+
The model struggles when:
|
| 144 |
+
|
| 145 |
+
lane markings are faded or unclear
|
| 146 |
+
|
| 147 |
+
objects are partially occluded
|
| 148 |
+
|
| 149 |
+
classes have very few examples
|
| 150 |
+
|
| 151 |
+
This demonstrates that model performance is strongly influenced by dataset quality and class balance.
|
| 152 |
+
|
| 153 |
+
Limitations and Biases
|
| 154 |
+
|
| 155 |
+
Failure Cases:
|
| 156 |
+
|
| 157 |
+
missed detections of bicycles and cars
|
| 158 |
+
|
| 159 |
+
errors when lane markings are unclear
|
| 160 |
+
|
| 161 |
+
confusion between similar lane types
|
| 162 |
+
|
| 163 |
+
Data Biases:
|
| 164 |
+
|
| 165 |
+
overrepresentation of vehicles
|
| 166 |
+
|
| 167 |
+
underrepresentation of rare classes
|
| 168 |
+
|
| 169 |
+
limited environmental diversity
|
| 170 |
+
|
| 171 |
+
Environmental Limitations:
|
| 172 |
+
|
| 173 |
+
poor lighting
|
| 174 |
+
|
| 175 |
+
occlusion
|
| 176 |
+
|
| 177 |
+
worn lane markings
|
| 178 |
+
|
| 179 |
+
Inappropriate Use Cases:
|
| 180 |
+
This model should not be used for:
|
| 181 |
+
|
| 182 |
+
real-time safety decisions
|
| 183 |
+
|
| 184 |
+
autonomous driving
|
| 185 |
+
|
| 186 |
+
high-stakes applications
|
| 187 |
+
|
| 188 |
+
Sample Size Limitations:
|
| 189 |
+
Classes like bicycle and car have too few examples to be reliably detected.
|