Giter Site home page Giter Site logo

uzunb / trex-cnn Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 27 KB

Teach T-Rex to dodge obstacles in 3 stages with CNN-Keras.

License: MIT License

Python 100.00%
trex trex-runner trex-game cnn convolutional-neural-networks keras keras-tensorflow cnn-keras dino dinosaur-game

trex-cnn's Introduction

T-Rex-Runner-CNN

Teach T-Rex to dodge obstacles in 3 stages.

Stages

1- Collect dataset when playing. ๐ŸŽฎ
2- Train dataset while drinking your coffee. โ˜•
3- Start and watch it.

Requirements

requirements.txt consists required dependencies.
Easy way: You can install the requirements with the following commands:

cd myproject/
virtualenv venv
./venv/bin/activate
pip install -r requirements.txt

1- Collect dataset when playing. ๐ŸŽฎ

  1. Firstly, you must specify ROI(Region Of Interest) according to screen resolution.
    trex_map_roi

  2. Change limits your specified ROI.

limits = {"top":375, "left": 740, "width":250, "height": 100 }
  1. Run & Play
python trex_getdata.py

When each press direction buttons, it save ROI pixels. Such like:
roi

2- Train dataset while drinking your coffee โ˜•

Just run following command:

python trex_train.py

3- Start and watch it

Run and start the game.

python trex_play.py

โš ๏ธ IMPORTANT NOTES โš ๏ธ

  • The playing pixels and the dataset collection pixels must be the same. Because program watches and grabs your ROI pixels.
  • Your score affects train and test accuracy in dataset collection stage. Also best record of T-Rex too.
  • Linux users must switch to super user mode with sudo su command for keyboard library.

For playing T-Rex Runner: http://www.trex-game.skipser.com/

trex-cnn's People

Contributors

uzunb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.