This program works together with the NeuralNetworkRCCar iPhone application
+ OpenCV 2+ + numpy + pygameMake the python file executable
chmod +x nnrccar.py
Run the program
``` ./nnrccar ```Selecting option one will set up two concurrent processes. One listening to keyboard input and one waiting for video frames.
- Place the iPhone on the RC Car.
- Press a directional key to start streaming and recording.
- Start driving the car around your assembled path.
- To quit the program press Q (Upon quiting the program will save a txt file of direction keys mapped to raw grayscale pixel data AKA this is your training set)
- Open MATLAB or OCTAVE
- Navigate to NeuralNetworkServer/src/
- Run getTrainingData.m (This script loads direction input into an X vector and pixel data into y vector and saves it into a .mat file)
- Navigate to NeuralNetworkServer/src/NeuralNetwork/
- Run ex4.m (This code is a modification of project 4 of the online Stanford Machine Class. It runs a backpropogation algorithm to train a 3 layer neural network.)
- Navigate back to NeuralNetworkServer/src/
- Run prepareData.m (This will load the trained weights to a txt file for them to be sent to the iPhone)