Using Deep Learning to Predict Steering Angles. Udacity Challenge #2
Install all dependencies with:
$ pip install -r requirements.txt
This project is built on top of TensorKit which helps organizing experiments.
pip install https://github.com/nghiattran/tensorkit/archive/master.zip
Also, make sure you have Tensorflow above 1.0.
Check Hypes to see all options or to create your own ones.
You can train your own model by using.
$ tk-train path-to-your-hype
There are times that training process is interrupted due to unexpected reasons. In this case, you can resume training by
using tk-continue
.
$ tk-continue path-to-logdir
To evaluate trained model on valuation set, you can use tk-evaluate
.
$ tk-evaluate path-to-logdir
To test your model, use submission.py
to generate csv file. Format of this csv
file would be similar to CH2_final_evaluation.csv.
$ python submission.py path-to-logdir path-image-folder
See submission.py for more detail.
Use visualize.py
to create a demo video from csv
files generated above.
$ python visualize.py path-to-input-csv path-groundtruth-csv path-to-image-folder
See visualize.py for more detail.
model
:dataset_file
: path to python file that handles input.architecture_file
: path to python file that constructs main graph.objective_file
: path to python file that handles losses.optimizer_file
: path to python file that handles updating variables.evaluator_file
: path to python file that handles validation.
data
:train_file
: path to training data file.val_file
: path to validation data file.
logging
:display_iter
: display frequency.eval_iter
: validation frequency.save_iter
: saving model frequency.
solver
:opt
: type of optimizer. SupportedAdam
,RMS
, andSGD
.rnd_seed
: seed number for random.epsilon
: value for epsilon (a small number that is used to avoid zero division).learning_rate
max_steps
batch_size
clip_norm
: upper bound for gradients to avoid gradient exploding.image_height
image_width
reg_strength
: regularization strength.color_space
: image preprocessing color space. Supportedrgb
andyuv
. Defaultrgb
.crop
: crop size. This value count from bottom to top.
To fine-tune, you only need to change learning_rate
, opt
, and max_steps
in solver
and other
hyperparameters like reg_strength
, color_space
, crop
,...
You can also create your own neural network architect by using layout in model/nvidia/architect.py
and keep
other parameter as is.
-
nvidia
: inspired by SullyChen's implementation of Nvidia's paper End to End Learning for Self-Driving Cars but our implementation runs way faster. -
rambo
: inspired by rambo team's submission.
NOTE: All models in this project are similar but not identical to what they are based on.