DIY Self-Driving Car on a Budget: An Unconventional Experiment

Published  October 23, 2023   0
S Staff
Author
DIY Self Driving Car

In a unique and budget-friendly project, a determined YouTuber “Computerphile” set out to explore the feasibility of creating a self-driving car using minimal resources. With a clear disclaimer that this experiment is far from trustworthy for real-world applications, the project aimed to investigate the potential of machine learning to enable a vehicle to navigate autonomously. The journey took place from Suffolk to Essex, and the goal was to collect crucial data during the drive that would allow the car to make its way back.

The project's data collection strategy involved three key components: an Arduino board, a webcam, and a laptop. The Arduino board was transformed into a rudimentary steering angle sensor, attached to the steering wheel to capture data. Meanwhile, the webcam, placed on the dashboard, was responsible for recording the road view. A Python script was developed to synchronize the webcam's frames with the steering data received via the serial port connection between the Arduino board and the laptop.

webcam recording road view

Data preparation played a critical role in this endeavor. The project involved training a neural network using a dataset consisting of images and corresponding steering angle labels. However, the data had its challenges, primarily due to the skewed distribution of labels towards zero steering angles. To address this, the labels were modified through a squaring technique to make the dataset more balanced.

zero steering angles diagram

For the neural network architecture, the project leveraged MobileNet Version 2, a pre-trained model, and removed the classification layers. Custom layers were then added to predict steering angles based on the visual input from the webcam. This approach significantly reduced training time while providing promising results.

This project emphasized that although it was a fascinating experiment, it lacked the reliability required for real-world self-driving applications. Nevertheless, it showcased the potential for machine learning and minimal hardware to enable a car to make steering decisions, albeit with room for improvement. The project's open-source code and resources are available for those interested in exploring similar experiments and pushing the boundaries of autonomous driving technology on a budget.