Coder Social home page Coder Social logo

ml-lab / tensormouse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tadejmagajna/tensormouse

0.0 2.0 0.0 32.95 MB

Control mouse by moving objects in front of webcam using Tensorflow Object Detection API

License: MIT License

Python 100.00%

tensormouse's Introduction

TensorMouse

Control your mouse cursor by moving objects in front of webcam using Tensorflow Object Detection API.

alt text

TensorMouse allows you to control your cursor by moving random objects (like cups, apples or bananas) in front of webcam to move your cursor as a replacement for mouse or touchpad.

Tensorflow Object Detection API trained on the COCO dataset supports up to 90 different types of objects that can be used to move the cursor.

Project includes ssd_mobilenet_v1_coco_11_06_2017 Tensorflow frozen graph trained on the mobilenet deep neural network by default, but supports any other graph Tensorflow Object Detection API graph by supplying the optional argument --graphpath

TensorMouse also supports clicks currently triggered by clicking CTRL key and mouse drags triggered by ALT key.

Getting Started

Linux/MacOS

  1. Make sure you have anaconda installed
  2. Open a terminal and navigate to project root
  3. conda env create -f environment.yml
  4. source activate tensormouse

Windows

  1. Make sure you have anaconda installed
  2. Open a terminal and navigate to project root
  3. conda env create -f environment-win.yml
  4. activate tensormouse

Usage

python tensormouse.py

Optional arguments (default value):

  • --source=0 Device index of the camera
  • --object=cup Object name - name of object to track (see graphs/labels.json for available options)
  • --graphpath=ssd_mobilenet_v1_coco_11_06_2017 Path to frozen tensofrlow graph

Wait for โœ“ TensorMouse started successfully! message to use the application.

Use CTRL for clicks and ALT for cursor draging. Exit by clicking CAPS_LOCK

Requirements

Technologies Used

Notes

  • Make sure you have good lighting when using TensorMouse
  • Frame rate will be very low on low performing machines
  • Object deteciton on screen edges is poor. (todo: scale cursor movement so that near edge object movements will move cursor to edge)

Copyright

See LICENSE for details. Copyright (c) 2017 Tadej Magajna.

tensormouse's People

Contributors

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