This project demonstrates how to train a self-driving car to steer and to drive autonomously in Udacity Self-Driving Car Simulator using TensorFlow.js.
Featured on TensorFlow YouTube channel:
See also detalied explanation of this project in a Medium publication: Run a self-driving car using JavaScript and TensorFlow.js.
- Clone this project.
- Download Udacity Simulator for Term 1.
- Record data using the simulator.
- Train the model using recorded data.
- Run the simulator in autonomous mode.
- Drive the car using the trained model.
git clone https://github.com/bakoushin/self-driving-car-javascript.git
cd self-driving-car-javascript
npm install
Note: the code in this project is expected to run on Node.js 12 or greater.
node train.js [--data DATA_DIRECTORY] [--model [MODEL_DIRECTORY] [--epochs NUMBER_OF_EPOCHS]
# Example:
node train.js --data ~/Documents/track1 --epochs 3
Default values:
data
= 'data' directory within the project directorymodel
= 'model' directory within the project directoryepochs
= 10
node drive.js [--model MODEL_DIRECTORY] [--speed SPEED_LIMIT]
# Example:
node drive.js --speed 20
Default values:
model
= 'model' directory within the project directoryspeed
= 30
Alex Bakoushin
MIT