Code Monkey home page Code Monkey logo

hmc's Introduction

🎢 Hand Music Changer βœ‹πŸ‘ˆβœŠ

Hand Music Changer is a tool for changing the music with your hands trough your camera. It uses a CNN to detect your hand and change the music.

How is it made?

The CNN trained for the app model is based on MobileNetv2 from Keras. This approach allows us to transfer its learning for our purposes. You can check out the notebook for more information and technical details.

Dataset

The model uses three hand gestures from the dataset and another class of random images for the negative samples. The gestures used are shown below:

How to use it?

You must use Python 3 for the entire project.

There are a lot of requirements to use it due to there is no executable file created yet. Those requierements can be installed with pip as follows:

python -m pip install imutils keyboard numpy opencv-python pillow pyautogui tensorflow

Or just install the requirements.txt file.

python -m pip install -r requirements.txt

Then, execute the following command to start the app:

python ./hmc.py

Notice that the app depends on several files located at ./hmc/. So, you must make sure that those files are in the same directory as the app.

Hide/Show GUI

There is a button to hide the camera feed. You must use Ctrl+Alt+Shift+D to show/hide the GUI. So it will not distract you.

Hand signs

Play/Pause βœ‹ Next song πŸ‘ˆ Previous song ✊

It is worth say that it does not matter if you flip the gesture, it will work because of the data augmentation during training.

Configuration

Certainly there are a variety of environments to use the app. That is why there are some configuration options.

Tolerances

You can adjust the tolerances and the time gap to make the app more accurate. For instance, if play/pause does not work properly, you can try decreasing the tolerance for this hand sign, so it will be triggered with less confidence score. But, if the app suddenly changes or pauses the song you should increase the required confidence score to trigger the action.

Selected camera

You are able to change the camera that is used to capture the video. The default camera is the first one. With this option you can use other camera for other purposes and other one dedicated to the app.

Time gap

Finally, you can change the time between actions. This is useful whether you want to trigger the action too often or not.

Build an executable

It is a official release coming soon. Meanwhile you can create an executable using pyinstaller. The specs are already defined, just execute the following command:

pyinstaller HandMusicChanger.spec hmc.py

hmc's People

Contributors

crixodia avatar deepsource-autofix[bot] avatar deepsourcebot avatar

Stargazers

VΓ­ctor Arreaga avatar

Watchers

James Cloos avatar  avatar

hmc's Issues

Release uses too much space

Use a virtual env to gen the optimal file. Also create a pip installation file to a faster process.
It could be a good idea to try PYTHONOPTIMIZE=2 pyinstaller script.py in order to optimize.

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.