Xanadom1/auto_drive_traffice_light
Viewer • Updated • 9.93k • 119
How to use Xanadom1/AutoDrive_TrafficLight_Baseline_V1 with ultralytics:
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
# pick the weights file from this repo's "Files and versions" tab
weights = hf_hub_download("Xanadom1/AutoDrive_TrafficLight_Baseline_V1", "<weights>.pt")
model = YOLO(weights)
source = 'http://images.cocodataset.org/val2017/000000039769.jpg'
model.predict(source=source, save=True)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.
yolov8n-cls), trained from scratch.Black_None, Green Light, Red Light.args.yaml.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.
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])
Fengze Jia, The Ohio State University · fengzejia.com
AGPL-3.0, following Ultralytics YOLOv8.