← All field notes

Simracing / AI MILESTONE / TRACK RECOGNITION

GT7Tracks: my first AI project

How Gran Turismo 7 telemetry became a practical introduction to training a model and recognizing a track while driving.

Original project & source ↗

Where my AI journey started

GT7Tracks was a milestone for me: it was my first AI project. Simracing gave me a concrete problem to explore—recognizing a Gran Turismo 7 circuit from the car’s position, using the telemetry available while driving.

The project brings together three steps: capture position data, train a model, and use that model for live recognition. It connects the data coming out of a game with a small, practical machine-learning workflow.

Capture the track as data

The repository’s Python tools capture the car’s x, z, and y coordinates from Gran Turismo 7 telemetry. Track dumps also contain speed and RPM, and the capture can be extended with other telemetry fields.

Each CSV is associated with a track ID. The capture tool’s track parameter and the dataset filenames connect the observations with the circuit they represent. These labeled captures provide the examples used for learning.

This makes the data collection step part of the project, rather than starting with an already prepared training dataset.

Train a recognition model

LearnTrack.py provides training and prediction modes. In training mode, it reads track CSV files from a folder and trains a TensorFlow model. The saved model can then be loaded for prediction.

The workflow is straightforward:

Track-labeled coordinate captures
              ↓
      TensorFlow training
              ↓
         Saved model
              ↓
      Live track predictions

For my first AI project, the milestone was connecting the whole learning loop: collecting examples, training a model, and using its predictions in a live application.

Recognize a track while driving

GT7TrackGuest.py uses the saved model to guess the track from incoming positions. The prediction returns a confidence for each track for the coordinates supplied.

Individual predictions have no memory of earlier requests. The example therefore records predictions in a dataframe and calculates their running mean; the highest mean over time becomes the selected track.

This distinction matters: the model predicts from a position, while the application combines those predictions into a decision over time.

Keep prediction out of the critical path

The README recommends sampling predictions instead of running inference for every telemetry packet. Its examples suggest a periodic interval or a distance-based trigger. In a motion-rig integration, it also recommends asynchronous prediction so inference does not interrupt motion processing.

The live example needs to be restarted when changing tracks because it does not detect a new session. That is an important boundary between an experimental recognition tool and a complete session-aware integration.

Part of a wider simracing story

GT7Tracks sits alongside GT7Proxy, a UDP telemetry proxy for an XSim plugin, and DashX2, an Arduino dashboard for GameDash. I also contributed many console-game plugins to SimTools.

My YouTube channel includes demos of some of this work: GT7 telemetry with SimTools at Spa and DashX2 with Project Cars.

Explore the Simracing section for the projects, community contributions, and demos, or read the GT7Tracks repository for the original capture, training, and live-guessing instructions.