This project features a two-stage deep learning system designed to detect and classify 26 common traffic sign types from streetview photos across the US and Canada. The model is developed using PyTorch and trained on Google Colaboratory. The training data is sourced from a variety of open-source datasets, including those from Roboflow and Mapillary. For a technical breakdown of the project and a detailed performance analysis, please refer to the report available here.
We used a pre-trained YOLOv8 model from Ultralytics to locate traffic signs in images. YOLOv8, originally trained on the COCO dataset with 80 object classes, was fine-tuned with a Roboflow dataset containing 26 traffic sign classes. This allows the model to output precise bounding box coordinates for traffic signs within an image.
We developed and trained a custom Convolutional Neural Network (CNN) to classified the cropped image from stage one. The encoder features four convolutional layers, each followed by a 2x2 max pooling layer with a stride of 2. This setup produces a 16x1x1 feature map, capturing high-level features. This feature map is then fed into a small ANN classifier with 244 neurons and produces an output layer of 26 classes.
In this simple example, we passed in a street view image with a Canadian stop sign, our program is able to bound the sign and classify it correctly with 99% confidence.
To ensure consistency, all training images (approximately 18,000) were resized to 150x150 pixels. We used an 80-10-10 split for training, validation, and testing. Here are the training & validation loss and error graphs.