Traffic Sign Detection & Recognition โ€” YOLOv8

A YOLOv8 object detection model fine-tuned via transfer learning for real-time traffic sign detection and classification. Trained as part of a BS Software Engineering thesis project and subsequently deployed as a public web application.

Live Demo

๐Ÿšฆ Try it on Hugging Face Spaces โ€” supports image upload, video processing, and live webcam capture.

Model Details

Property Value
Base model YOLOv8 (Ultralytics)
Training method Transfer learning
Task Object detection
Input RGB image or video frame
Output Bounding boxes + class labels + confidence scores

Classes (21 traffic sign categories)

ID Label ID Label
0 bus_stop 11 ped_crossing
1 do_not_enter 12 ped_zebra_cross
2 do_not_stop 13 railway_crossing
3 do_not_turn_l 14 red_light
4 do_not_turn_r 15 stop
5 do_not_u_turn 16 t_intersection_l
6 enter_left_lane 17 traffic_light
7 green_light 18 u_turn
8 left_right_lane 19 warning
9 no_parking 20 yellow_light
10 parking

Usage

from ultralytics import YOLO
import torch

# Allow loading of custom YOLOv8 checkpoint
_orig = torch.load
def _safe_load(*args, **kwargs):
    kwargs["weights_only"] = False
    return _orig(*args, **kwargs)
torch.load = _safe_load

# Load model
model = YOLO("best_roboflow.pt")

# Run inference
results = model.predict("your_image.jpg", conf=0.4)
results[0].show()

Use Cases

  • Driver-assistance systems (ADAS): real-time alerting for speed limits, stop signs, and warning signs
  • Dashcam footage auditing: automatically flagging missed or obscured signage for road-safety compliance reviews
  • Autonomous vehicle perception: as a building-block detection module feeding into higher-level driving decision systems

Training Details

  • Dataset sourced and annotated via Roboflow
  • Fine-tuned from YOLOv8 pretrained weights via transfer learning
  • 21 traffic sign classes covering common urban road signage

Deployment

This model is deployed as a Streamlit web application on Hugging Face Spaces. See the traffic-sign-detector Space for the full application code and deployment details.

Author

Mian Yahya Gul LinkedIn ยท GitHub

Downloads last month
52
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support