Git Product home page Git Product logo

sdsandbox's Introduction

SdSandbox

Self Driving Car Sandbox

IMAGE ALT TEXT

Summary

Use Unity 3d game engine to simulate car physics in a 3d world. Generate image steering pairs to train a neural network. Uses comma ai training code with NVidia NN topology. Then validate the steering control by sending images to your neural network and feed steering back into the simulator to drive.

Some videos to help you get started

Training your first network

IMAGE ALT TEXT

World complexity

IMAGE ALT TEXT

Creating a robust training set

IMAGE ALT TEXT

Setup

You need to have Unity installed, and all python modules listed in the Requirements section below.

For the impatient ( I just want to see this work )

  1. Start the prediction server with the pre-trained model.
cd sdsandbox/src
python predict_server.py usc
  1. Load the Unity project sdsandbox/sdsim in Unity. Double click on Assets/Scenes/UnityStandardCar to open that scene.

  2. Hit the start button to launch. Then the "Use NN Steering".

#To create your own data and train

Generate training data

  1. Load the Unity project sdsandbox/sdsim in Unity.

  2. Create a dir sdsandbox/sdsim/log.

  3. Hit the start arrow in Unity to launch project.

  4. Hit button "Generate Training Data" to generate image and steering training data. See sdsim/log for output files.

  5. Stop Unity sim by clicking run arrow again.

  6. Run this python script to prepare raw data for training:

cd sdsandbox/src
python prepare_data.py --clean
  1. Repeat 4, 5, 6 until you have lots of training data. 30gb+ is good. On your last run, prepare a validation set:
python prepare_data.py --validation --clean

Train Neural network

python train.py mymodel

Let this run. It may take 12+ hours if running on CPU.

Run car with NN

  1. Start the prediction server. This listens for images and returns a steering result.
python predict_server.py mymodel
  1. Start Unity project sdsim

  2. Push button "Use NN Steering"

Requirements

python 2.7 64 bit
tensorflow-0.9
keras-1.0.6
h5
pillow
Unity 5.5+

Credits

Tawn Kramer, Riccardo Biasini, George Hotz, Sam Khalandovsky, Eder Santana, and Niel van der Westhuizen

sdsandbox's People

Contributors

tawnkramer avatar

Watchers

Willem avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.