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.
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.
- 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
- 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