Skip to content

slevin48/gta

Repository files navigation

AI plays GTA

Content:

  1. Record data
  2. Dataset browsing apps
  3. Train model

The goal of this project is to develop a self-driving car in Grand Theft Auto V like in this example:

gta-self-driving

1. Record data

Record display

The first challenge is to record the display to replay it for further analysis (like a simple car detection here):

gta-car-detection

Record controller

We have 2 options:

ps4-keyboard-adapter

The folder ps4_macro contains the controller record and python functions PS4_control.py provides 2 functions to:

  • read XML controller file as DataFrame,
  • save it as Excel file

ps4_controller_table

ps4_controller_LX_LY

PyWin32 to record keyboard

/!\ Map A to Q on French keyboard!!!

2. Dataset browsing apps

MATLAB desktop App

matlab_app

Streamlit Web App

streamlit_app.png

3. Train model

MATLAB Deep Learning toolbox

matlab_deep_learning

Tensorflow

1 epoch only with training0.py

Tensorflow on i7-6700HQ CPU @ 2.60GHz / 8Go RAM 21 steps == 6m 27s training0.png

I stopped it to train on my GPU instead

Tensorflow on NVIDIA GeFOrce GTX 960M 21 steps == 3m 40s 92 steps == 17m 6s training1.png

Sources:

Go Further:

Python plays GTA V

GTA_5_steering.ipynb

GTA driving data semantic sampling
gta image semantic sampling
gta image semantic sampling

LiDAR sample traffic

Precise Synthetic Image and LiDAR (PreSIL) Dataset from Waterloo Intelligent Systems Engineering Lab

Linearized Depth Map (Grey and Colour)

Object Instance Segmentation

More inspiration:

About

πŸ€– Train a self-driving car in GTA V πŸš—

Topics

Resources

License

Stars

Watchers

Forks