Skip to content

Training Object Detection model on Google Colab to play Google Dinosaur game

License

Notifications You must be signed in to change notification settings

S-Nuttapong/ObjectDetection-Play-TRex-Runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ObjectDetection-Play-TRex-Runner

DIno GIF

Introduction

This is only a part of my exploration of Object Detection. So far model can achieve 360 points on average and 700 as the highest scores. The main challenge is computational power, model was able to run with 5 FPS with visualization as shown above, by turning off the visualization, model was able to retain a few more FPS, therefore model tend to do better on better computer. However, as the speed of the game increases and exceeds computer's capability, the model will not be able to capture the in coming obstacles and react in time. Hence Object detection may not be efficient for this task and should not be considered as a good practice.

Further thought

More promising solution is to take numerical data such as distance between obstacles, speed of the game, size of dinosaur and obstacles directly from game's source then one may consider using reinforment learning algorithm, instead of taking screenshot as image array and feed to object detection as this is less resource intensive and appear to be more suitable for this task.

Requirements

Instruction

  • Install the Object Detection API
  • Download Trex_runner.zip and extract to Object Detection directory
  • Open Dinosaur game, bear in mind other soucres may give different result
  • Run the TRex_runner.py

Notes

  • This project was done on macbook pro with 1280x800 resolution, to achieve the same or better result the parameter of screen in TRex_Runner.py must be adjusted accordingly

About

Training Object Detection model on Google Colab to play Google Dinosaur game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published