Skip to content

Incorporating ADAS (Advanced Driver Assistance Systems) into GTA V

License

Notifications You must be signed in to change notification settings

SahilChachra/ADAS_GTAV

Repository files navigation

Driving Assistance System in GTA V

😇 Motivation

We all enjoy playing GTA games be it for mission, online or for the open world experience. In recent times, it has become famous in computer vision community to show some concepts w.r.t to autonomous driving. In this repo, I try to add some assisted driving features with the help of computer vision in Python.

🖼️ Some Screenshots

⭐ What is actually happening

So, the vehicle chosen is a truck (as assistive breaking makes more sense in highway for trucks in case driver doesn't reacts in time). The horizontal line which you see is a reference line from where distance (pixel distance) is measured w.r.t detected objects. For now breaks are applied only if a person, car or truck comes very close to the ego vehicle. Above the bounding box you see name of the class and the distance (in pixels). Also, the car is NOT driving itself, the user drives it and where necessary the model's output decide the assistive breaks. (Tried to make the car drive on it's own inside the lane using OpenCv, seriously results weren't good xD)

🔑 Current Features

  1. Use model trained on private GTA V dataset
  2. Automatically break/slow down if the vehicle ahead of yours is very close
  3. Stop(use handbrake) the vehicle when traffic light is red

👀 Future add-ons

  • Traffic Intensity
  • Use depth maps to measure distance instead of pixel distance
  • Improve/add lane detection (gtav_laneDetect is not accurate hence cannot drive automatically)
  • V2V communication (Can't be done in 'Story mode')

💫 How to use?

  1. Start GTA V and enter story mode. Get a truck and change camera to First-per view (by pressing V) (preferred)
  2. In settings, change the resolution to 800x600 and place the window on top-left corner of your screen
  3. Clone the repo and install dependencies (requirements.txt provided)
  4. Run od_gtav.py and you will see a OpenCv window popping up. Enjoyy...

❤️ Reference

Inspired by Sendex

🛠️ Extras

Readme will be updated with more info...

About

Incorporating ADAS (Advanced Driver Assistance Systems) into GTA V

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages