This research focuses on improving YOLOv8 for detecting road objects from a pedestrian’s viewpoint. It involves training three pre-trained models (YOLOv8n, YOLOv8s, YOLOv8m) on over 10,000 images, which include both a self-collected dataset of road objects and a subset from the COCO dataset. The study employs transfer learning to maintain the models’ proficiency in recognizing the original COCO dataset classes while integrating seven new categories. The models’ effectiveness was gauged using metrics such as precision, recall, mAP, and processing speed to identify the most suitable model for real-time road detection. Ultimately, the YOLOv8m model showed superior accuracy and reasonable processing speed, though its performance still falls short of real-world detection requirements.