Skip to content

Contains ML files used to train the self-driving car, its implementation using raspberry pi, lane detection algorithm, and motor control codes.

Notifications You must be signed in to change notification settings

tbchhetri/selfDrivingCar

Repository files navigation

Self-driving Car

Project Summary

  • Trained CNN to identify common traffic signs and trained a Machine Learning architecture based on The Nvidia Model to predict steering angles of a single laned road
  • Utilized a lane detection algorithm to detect lanes and drive the car maintaining mid lane steering using PID control
  • Equipped Raspberry Pi as the main processing unit and used it to communicate with Pi camera and motors
  • Used Lidar to accurately detect nearby objects and take actions accordingly

Files Description

ModelApplication.py contains the implementation of the Machine Learning Algorithm for steering. It also contains the communication code with the GPIO pins of the Raspberry Pi 4 to control the wiper motor (steering motor) of our car.

NVIDIA_Model.ipynb

source

  • This ML algorithm is written following NVIDIA's model for CNN
  • This code is also inspired by this course which has a great introduction to Machine Learning and also explains different ML types and algorithms

PID.slx contains the Simulink model of the car

lanes.py is a basic lane detection algorithm using Open CV and a basic image processing

model.h5 is the output file of the ML model. This file contains all the weights and biases required to steer the car.

images contains the images used for this file.

motorControl contains the sample code for controlling the Lidar sensor and the motor driver.

Resources used

Neural networks This video series was used to understand Neural Networks.

NVIDIA CNN Model: The Machine Learning model for determining the steering angle was based on the parameters suggested by the NVIDIA CNN model.

The Complete Self-Driving Car: This course was used to learn about Lane detection algorithm and different Machine Learning types, techniques and algorithms. The NVIDIA_Model.ipynb was also inspired by this.

self-driving-car-sim: This simulator was used to gather training data for the ML model.

Complete Self Driving Car - IOT Project (Final Semester): This video was used to get ideas about other people's implementation of the ML model.

OpenCV for Python Developers: This course was used to understand OpenCV and use it in our Lane Detection and ML application

DeepPiCar: This article was used to understand the different implementations of the ML model and new techniques for Lane Detections.

Intro to TinyML Part1: Training a Neural Network for Arduino in TensorFlow Digi-Key Electronics: This video was used to understand the alternatives to using Raspberry Pi

Self Driving AI in 100 lines of code Raspberry Pi: This video was used to get ideas about other people's implementation of the ML model and use of Blynk app to control the car!

Lane Detection and Tracking with MATLAB: This video was used to evaluate the alternatives of using MATLAB for Lane Detection.

I2C with Arduino and Raspberry Pi - Two Methods: This video was used to understand the Master-Slave setup for Raspberry Pi and Arduino UNO.

Arduino-Python3 Command API: This article was used to implement python codes directly on Arduino UNO.

How to connect your “L298N Dual H-Bridge Motor Controller” to “Arduino Uno”: This video was used to connect the H-Bridge with Arduino UNO

FPGA vs GPU for Machine Learning Applications: Which one is better?: This article was used to evaluate the alternatives of using FPGA for ML.

How to use your trained model - Deep Learning basics with Python, TensorFlow and Keras p.6: This video was used to understand an approach to use a developed ML model.

Robotic Car, Closed Loop Control Example: This video was used to understand the PID controls on a simple car.

PID Balance+Ball full explanation & tuning: This video was used to understand the implementation of PID in the Ball Balancing System.

PID brushless motor control tutorial: This video was used to understand the implementation of PID in a Quadcopter.

Online Calculators and Tables to Help You Determine Proper Wire Size: This article was used to get ideas about the wire sizes to be used for the project.

(Part 3): This is how I created a self driving vehicle using Ai and Python: This video was to understand another design approach to using an ML model.

Potentiometer Operated Steering: This research paper was used to study an alternative to gather training data.

Benewake TF Luna Product Introduction: This video was used to make the purchase decision of getting affordable Lidar and how to use it.

Autonomous Navigation, Part 2: Understanding the Particle Filter: This video was used to understand how to make SLAM model with the help of a car.

Raspberry Pi Essential Training: This course was used to understand the basics of Raspberry Pi.

Install Tensorflow 2 on a Raspberry Pi 4 // Easy: This video was used to install TesorFlow on Raspberry Pi

Installing Library package in Raspberry Pi-Chapter 2 This article was used to install all other necessary libraries on Raspberry Pi.

Raspberry Pi 3: Extreme Passive Cooling: This video was used to evaluate different cooling solutions for raspberry pi.

Remote Access with SSH and Remote Desktop - Raspberry Pi and Python tutorials p.3: This video was used to set up SSH to control the raspberry pi as an alternative to VNC viewer.

Deep Neural Network Hardware Accelerator on FPGA Tutorial: This video was used to understand the implementation of DNN on an FPGA.

About

Contains ML files used to train the self-driving car, its implementation using raspberry pi, lane detection algorithm, and motor control codes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published