ab1153 / CarND-Behavioral-Cloning-Project

Behavioral Cloning Project, end-to-end learning to steer the car in the simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview of the processed dataset:

import numpy as np
from matplotlib import pyplot as plt
%matplotlib inline
import pandas as pd
import math
import cv2
from sklearn import model_selection
from utils import plot_imgs
xs, ys = np.load('./xs.npy'), np.load('./ys.npy')
data_path = './data/'
df = pd.read_csv(data_path + 'driving_log.csv')
steerings = df.ix[:,3]
steering_abs = np.absolute(steerings)

Below are some samples from the balanced dataset:

indices = np.random.randint(ys.shape[0], size=50)
plot_imgs(xs[indices], ys[indices])
<matplotlib.figure.Figure at 0x1ce4e226320>

png

Below is the distribution of the original data:

hist = plt.hist(steerings, bins=100)

png

Below is the distribution of the processed and balanced data.

I balanced the data by assigning the absolutes of the steering angles into 100 bins where in each bin the samples range from 50 to 100 maximal.

hist = plt.hist(ys, 100)

png

In the interval of larger steering angles where the samples are scarce I augment the images by randomly adjusting the brightness, applying smooth filter and adding patches. (see the samples picked randomly above)

About

Behavioral Cloning Project, end-to-end learning to steer the car in the simulator


Languages

Language:Jupyter Notebook 70.4%Language:Python 29.6%