The easiest way to experiment with self-driving AI
10K+
The easiest way to experiment with self-driving AI
git clone https://github.com/deepdrive/deepdrive
cd deepdrive
Optional - Activate the Python / virtualenv where your Tensorflow is installed, then
python install.py
Make sure the Python you want to use is in your PATH, then
Tip: We highly recommend using Conemu for your Windows terminal
python install.py
We've tested on Paperspace's ML-in-a-Box Linux public template which already has Tensorflow installed and just requires
python install.py
If you run into issues, try starting the sim directly as Unreal may need to install some prerequisetes (i.e. DirectX needs to be installed on the Paperspace Parsec Windows box). The default location of the Unreal sim binary is in your user directory under Deepdrive/sim.
Run the baseline agent
python main.py --baseline --experiment my-baseline-test
Run in-game path follower
python main.py --path-follower --experiment my-path-follower-test
Record training data for imitation learning / behavioral cloning
python main.py --record --jitter-actions --sync
Note that we recorded the baseline dataset in sync mode which is much slower than async mode. Async mode probably is fine to record in, we just haven't got around to trying it out for v2.1.
Optional: Convert to HDF5 files to tfrecords (for training MNET2)
python main.py --hdf5-2-tfrecord
Train on recorded data
python main.py --train [--agent dagger|dagger_mobilenet_v2|bootstrapped_ppo2]
Train on the same dataset we used
Grab the dataset
python main.py --train --recording-dir <the-directory-with-the-dataset> [--agent dagger|dagger_mobilenet_v2|bootstrapped_ppo2]
Tensorboard
tensorboard --logdir="<your-deepdrive-home>/tensorflow"
Where <your-deepdrive-home> below is by default in $HOME/Deepdrive and can be configured in $HOME/.deepdrive/deepdrive_dir
</kbd><kbd> - Unreal console (first press releases game input capture)| Agent | 10 lap avg score | Weights | Deepdrive version |
|---|---|---|---|
| Baseline agent (trained with imitation learning) | 1691 | baseline_agent_weights.zip | 2.0 |
| Path follower | *1069 | N/A (see 3D spline follower) | 2.0 |
*The baseline agent currently outperforms the path follower it was trained on, likely due to the slower speed the at which the baseline agent drives, resulting in lower lane deviation and g-force penalties. Interestingly, reducing the path follower speed causes it to crash at points where it otherwise loses traction and drifts, so the baseline agent has actually learned a more robust turning function than the original hardcoded path follower it was trained on.
100GB (8.2 hours of driving) of camera, depth, steering, throttle, and brake of an 'oracle' path following agent. We rotate between three different cameras: normal, wide, and semi-truck - with random camera intrisic/extrinsic perturbations at the beginning of each episode (lap). This boosted performance on the benchmark by 3x. We also use DAgger to collect course correction data as in previous versions of Deepdrive.
--record)cd <the-directory-you-want>
aws s3 sync s3://deepdrive/data/baseline_tfrecords .
or for the legacy HDF5 files for training AlexNet
aws s3 sync s3://deepdrive/data/baseline .
If you'd like to check out our Tensorboard training session, you can download the 1GB tfevents files here, unzip, and run
tensorboard --logdir <your-unzipped-dir>
and checkout this view , which graphs wall time.
If you experience low frame rates on Linux, you may need to install NVIDIA’s display drivers including their OpenGL drivers. We recommend installing these with CUDA which bundles the version you will need to run the baseline agent. Also, make sure to plugin your laptop. If CUDA is installed, skip to testing OpenGL.
glxinfo | grep OpenGL should return something like:
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 980/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 384.90
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5.0 NVIDIA 384.90
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 384.90
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
You may need to disable secure boot in your BIOS in order for NVIDIA’s OpenGL and tools like nvidia-smi to work. This is not Deepdrive specific, but rather a general requirement of Ubuntu’s NVIDIA drivers.
To run tests in PyCharm, go to File | Settings | Tools | Python Integrated Tools and change the default test runner to py.test.
Content type
Image
Digest
Size
5.2 GB
Last updated
over 5 years ago
docker pull deepdriveio/deepdrive:bot_pid_127