Optimization of Raspberry Pi-Based Autonomous Driving System

  • Developed a Raspberry Pi 4-based autonomous driving system, reducing track completion time by 58% through optimized image processing and YOLO-based perception.
  • Achievement: Excellence Award at the Gachon University Autonomous Driving Competition

YOLO, Image Processing, Multi-thread, FSM, Raspberry Pi

Open original video ↗

YOLO · Image Processing · Multi-thread · FSM

I developed an autonomous driving system for a small Raspberry Pi 4-based vehicle that performs track driving, danger and stop sign recognition, and parking maneuvers. By improving the perception and control methods to accommodate limited computational performance, I reduced the track completion time by approximately 58%, from 92 seconds to 39 seconds, and won the Excellence Award at the Gachon University Autonomous Driving Competition.

Problem and Approach

In the existing YOLO-centric driving code, it was difficult to process object recognition and driving control simultaneously due to the computational performance limitations of the Raspberry Pi 4. Therefore, I utilized YOLO for traffic sign recognition and applied binarization and pixel analysis utilizing the visual features of the track for the repetitively performed path recognition and steering.

Core Implementation


  • Steering algorithm utilizing track features
    I binarized the region of interest in the camera image and compared the left and right pixel distributions to determine the steering direction. I experimented with various ROI shapes and applied the inverted trapezoid shape, which showed the best performance, to increase the driving speed.

  • Traffic sign recognition based on self-collected data
    I built a training dataset by capturing images of traffic signs from various angles using the onboard camera. Utilizing this, I implemented YOLO-based danger and stop sign recognition functions.

  • Operation transition based on Multi-thread and FSM
    I configured driving and sign detection into separate threads and controlled the execution flow utilizing FSM and event signals. I designed the system to transition between driving standby or resume and parking operations based on the sign detection results.

Achievements

I reduced the completion time by 53 seconds, achieving an approximate 58% reduction compared to the baseline code. Instead of replacing the hardware, I enhanced the performance by improving the processing methods and execution architecture for each task.

Autonomous driving performance is affected not only by the model's recognition accuracy but also by processing latency and control frequency. Considering the computational constraints of the hardware, I gained experience in system design by combining deep learning and image processing, and connecting recognition results to vehicle operations.