Git Product home page Git Product logo

virtual_drawing_board's Introduction

Virtual drawing board ✍️

python

PyTorch OpenCV MediaPipe license

Drawing on a virtual canvas using hand pose estimation




Libraries used

  • PyTorch
  • Mediapipe
  • OpenCV

To test the whiteboard, run main.py.

  • Clenching a fist with your index finger sticking out allows you to draw.

  • Closing your hand into a fist allows you to erase, where the red box represents the bounds of the eraser.

  • Holding your hand with all of your fingers open does nothing.


References

Licensed under the MIT License

virtual_drawing_board's People

Contributors

danger-ahead avatar git12121 avatar gursi26 avatar kriptonian1 avatar neerajanand321 avatar solomon1732 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

virtual_drawing_board's Issues

Train problem

I have collected my gesture dataset and I want to train my own model.
I have some probem about the code "self.map = {'draw': 1, 'erase': 0}" in train.ipynb.
Now I have collected seven gestures and they have been put together in one csv file。if I want to train my own gesture model , how do I change this line of code"self.map = {'draw': 1, 'erase': 0}",and where will the trained model be stored? @gursi26

Creating a GUI

Creating a simple GUI to allow for easier user interaction. Could include functions such as the following:

  • Allow users to change pen colour.
  • Allow users to change the thickness of the pen.
  • Allow users to save their drawings as an image file.

Perhaps consider the use of a code formatter - specifically Black

Black is an automatic code formatter. While not necessarily fit for everyone's taste, it's PEP8 compliant, can be configured, and has a few additional defaults which can result in a cleaner code. This ensures a uniform coding convention across commits.

https://pypi.org/project/black/

Edit: it also automates the formatting process, so there's less overhead when writing code. It reduces the need to make the code aesthetic and PEP8 compliant.

PEP8 Linter

I think it would make it easier to contribute if there was a standardized code style.
For example, on line 93 (of main.py) there is whitespace before the colon while on line 115 there isn't:
image
(The latter would be considered the correct one according to PEP8)

Improving the smoothness of drawing

The draw function currently detects whether the user's hand is in the "draw" position (only index finger sticking out) and stores the coordinates of the tip of the user's index finger. These coordinates are stored in a list.

In every frame, a blue circle is drawn at each coordinate in the list of coordinates. Due to technical constraints, the program runs at approximately 15-20 FPS and therefore, when the user moves their hand in one quick motion, the line ends up being disjointed, as seen in the image below.

demo

This can be fixed with a function that checks if points drawn in two consecutive frames are far apart, and then appends the coordinate list with a set of intermediate points in between the far apart points.

Improving accuracy of model

Improving accuracy of model by using euclidean distance between hand landmarks rather than their raw coordinate value. Gestures will be better recognised on any part of the screen.

how to use data_collection.py to create new action?

good job!

I want to create some new action with hand tracking,
it seems use data_collection.py to collect gestures datasets,then train the model.

but I do not know how use the code to collect datasets , could you give me some advice?
thanks a lot!

requirements.txt

The README says what libraries are required but I think it would be more user friendly if I could just do pip install -r requirements.txt instead of pip installing PyTorch, Mediapipe, and OpenCV one at a time.

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.