Traffic-Light State Classifier (Buckeye AutoDrive)

A small image classifier that reads the state of a traffic light from a cropped image. I trained it on the perception team of Buckeye AutoDrive, The Ohio State University's team in the SAE/GM AutoDrive Challenge II, advised by Prof. Wei-Lun Chao.

Model

  • Architecture: YOLOv8n classification (yolov8n-cls), trained from scratch.
  • Input: a 128 x 128 image of one traffic light.
  • Output: one of three classes: Black_None, Green Light, Red Light.

Training

  • Data: our team's traffic-light images, released as Buckeye AutoDrive Traffic-Light States.
  • Why from scratch: earlier versions were fine-tuned from a pretrained model. For the competition, the team needed accurate calls in the competition setting more than broad generalization, so I trained the final version from scratch on our own data.
  • Setup: Ultralytics YOLOv8, SGD, learning rate 0.01, batch size 256, up to 100 epochs with early stopping (patience 25). Training stopped at epoch 60. Trained on one NVIDIA RTX 5090 GPU.
  • The full training configuration is in args.yaml.

Results

Validation top-1 accuracy during training: 96.0% for weights/best.pt (epoch 35). Training curves are in results.png, and the confusion matrix is in confusion_matrix.png.

How to use

from huggingface_hub import hf_hub_download
from ultralytics import YOLO

path = hf_hub_download("Xanadom1/AutoDrive_TrafficLight_Baseline_V1", "weights/best.pt")
model = YOLO(path)
result = model("traffic_light_crop.jpg")[0]
print(result.names[result.probs.top1])

Limitations

  • It only reads the state of a light that has already been found and cropped. It does not find lights in a full camera frame.
  • It was trained from scratch on images from our team's car only, so it may not work as well with other cameras, places, or weather. It has not been tested there.

Author

Fengze Jia, The Ohio State University · fengzejia.com

License

AGPL-3.0, following Ultralytics YOLOv8.

Downloads last month
30
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Xanadom1/AutoDrive_TrafficLight_Baseline_V1