Prathamesh Saraf

Controls Engineer
ASML, San Diego
  • About
  • Work
  • Life
  • Find Me
CV
Last Updated: June 2023

A Convolutional Neural Network Approach Towards Self-driving Cars

This work contains the details of the developed CNN, design of the robot and an experiment proposal to test the autonomy of the robot in a controlled real environment. The autonomous vehicle developed in this project is expected to satisfy the following objectives:

  • To track the lane markings on the road, determine the steering angle and move within the lane accordingly.
  • To have the capacity to detect obstacles along with the speed of obstacle in its path based on a predetermined threshold distance.
  • After obstacle and speed detection, changing its course to a relatively open lane on the road by making a decision autonomously.
  • Plan its path and move accordingly, thus, requiring no human intervention during its operation.
  • System Architecture

    scenario-generation

    The system is built using the following:

  • Circular metal chassis of diameter 25cm.
  • Two Stepper motors (Nema 17) for the wheels.
  • Two Servo motors attached to the stepper motors to give the steering angle to the vehicle.
  • Ultrasonic sensor HC-SR04 for obstacles detection.
  • Web camera for image capturing of lanes on the road and Raspberry-pi 3B for image processing of the images captured and getting the steering angle.
  • The developed CNN architecture consists of four convolution layers and two fully-connected vanilla layers, each having a different bias, weight and Rectified Linear Unit (ReLU) associated with it. Initially, independent and identically distributed (i.i.d.) weights and bias of 0.1 are assigned. The first three layers are padded with 5x5 kernels with a stride of 2 while the next layer has 3x3 kernels with a stride of 1. These layers are followed by two fully-connected layers which are non-stridden to prevent overfitting on the training data, which is segmented into batches of size 100 and trained for 30 epochs on the CNN. These fully connected layers also serve as a controller for the steering, thus eliminating the use of an explicitly defined controller, normally a Constrained Linear Quadratic Regulation (LQR) controller. The detailed CNN structure is given below:

    scenario-generation

    Results

    The CNN was trained as described above and tested on a dataset provided by the University of Cambridge to give a sub-par performance since the weather conditions of the two datasets are different. The model was trained on two datasets from Udacity and NVIDIA. The Udacity dataset consisted of 6.6 Gigabytes of 33,478 images while the NVIDIA dataset had 2.1 Gigabytes of 7,064 images. As seen in Fig. 6, there is a stark difference in the validation Mean Square Error (MSE) loss of the model after 30 epochs in both the instances visualized with the help of TensorFlow. Udacity dataset gave a loss of 0.0003798 after 30 epochs while NVIDIA dataset gave a loss of 1.013 which was approximately 5 times smaller than the Udacity dataset.

    Conclusion

    This paper describes a methodology of implementing a level-2 autonomous vehicle in a relatively sparsely occupied environment. A CNN is trained on a dataset by Udacity and used to compute the optimal steering angle based on the image input through the camera. In case of obstruction in the path, three ultrasonic sensors are used to decide in which direction the vehicle should turn to continue on its path. Once this is achieved, the vehicle resumes its normal functioning of manoeuvring based on the steering angle given by the CNN.

    Based on the above results, an experiment is being designed for on-road testing on the intra-campus roads of BITS Pilani Hyderabad Campus. The test-path is 580 meters in length with negligible elevation gradient since the dataset was also created on a plane terrain. The path will be marked with three parallel lanes of width 1 meter of Snowcal powder. The GPS module GSM SIM908 will be used for location and path-tracking of the vehicle.

    Related Publications

  • “A Convolutional Neural Network Approach Towards Self-Driving Cars" [Paper]
  • People

    Prathamesh Saraf

    Akhil Agnihotri