Giter Site home page Giter Site logo

airgesture's Introduction

[PYTHON] AirGesture - Play games without touching keyboard

Introduction

Here is my python source code for AirGesture - Play games without touching keyboard. This project is an application of hand detection model in Tensorflow. With my code, you could play many games on PC without using any keyboard. At the moment you could play the following games

  • Super Mario Bros by running the script mario.py
  • Battle City by running the script battle_city.py
  • Dinosaur Game by running the script dinosaur.py

Please make sure that only one hand shown in front of camera. Otherwise scripts may not work as well as you expect

Super Mario Bros

The screen is splitted into 3 equal parts horizontally. Here is the mapping between your gesture and Mario's movement:

  • Open hand within the left part -> Left jump
  • Closed hand within the left part -> Left run
  • Open hand within the middle part -> Jump
  • Closed hand within the middle part -> Do nothing
  • Open hand within the right part -> Right jump
  • Closed hand within the right part -> Right run


Super Mario Bros

Battle City

The screen is splitted into 5 parts, including 4 triangles and a circle. Here is the mapping between your gesture and tank's movement:

  • Open hand -> Fire
  • Closed hand within the circle -> Do nothing
  • Closed hand within the left triangle -> Go left
  • Closed hand within the right triangle -> Go right
  • Closed hand within the up triangle -> Go up
  • Closed hand within the left triangle -> Go down


Battle City

Dinosaur Game

The screen is splitted into 2 equal parts vertically. Here is the mapping between your gesture and dinosaur's action:

  • Closed hand -> Run
  • Open hand within the upper part -> Jump
  • Open hand within the lower part -> Duck


Dinosaur

Requirements

  • python 3.x
  • cv2
  • tensorflow
  • numpy
  • gym
  • gym_super_mario_bros
  • gym_chrome_dino
  • pygame
  • opencv

airgesture's People

Contributors

uvipen avatar

Watchers

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