Using CV to play the Google Chrome Dinosaur Game
Another simple weekend project, using google’s Posenet to play Chrome “Dinosaur Game”.
Using Posenet, we detect key body points (keypoints) and find the points of the left and right eye. From there, we obtain the “y-axis” of the eye, and detect any “jump” by calculating the displacement of the y-axis between frames. We use pyautogui library to convert any “jump” signal from the algorithm to pressing the “up” button on the keyboard.
- Clone this repo
pip install -r requirements.txtto install the required packages
python -m main
- Go to google chrome, start the dinosaur game. The website we used for the dinosaur game: https://trex-runner.com/
- Click on the browser to start the game
- Start jumping and have fun!
Pose Estimation: https://www.tensorflow.org/lite/examples/pose_estimation/overview