Utilizing machine learning within python to convert ASL hand movements into simulated keyboard presses within macOS.
Big thanks to AkramOM606 for the bases of this repo, check out his repository on ASL-detection Here.
Caution
Do not use this project nor upload it without crediting me along with AkramOM606.
-
a. Articles
-
a. Left Hand
b. Right Hand
- How to build a Python-based hand tracking application! A beginners Guide
- Mediapipe: Fingers counting in Python w/o GPU
- pynput Keyboard Bindings
I found this really useful starting out with hand and finger detection when determining initially where each joint is by using this image. It helped me without using an intelligent model classify different hand gestures formed by either the left or right hand. I did this basically by finding out each joints (x,y) coordinates in relation to the width and height of the webcam display area. By finding out where each of the joints are, I could use < or > signs in relation to other joints to semi-create my own gestures.
Note
For this specific project, a negated using this guide as I used a trained model from AkramOM606 to detect ASL inputs.
Pretty helpful reference of ASL signs within the ASL alphabet.
Control | Sign |
---|---|
Delete | H/C |
Space | L |
Exclamation Mark | W |
Question Mark | X |
Period | v/u |
Use the ASL Sign Guide.
Important
It's recommended to use a virtual environment (.venv
) when running this repo to minimize module clashing errors. It is also recommended to use a IDE with git support (ex. VSCode). It's recommended to use python version 3.12.4
, although higher versions may work.
- Clone the repository
git clone https://github.com/aidensorabji/cvv.Keyboard
cd cvv.Keyboard
- Insure that you have the dependencies installed. If not, run the following command
pip install -r requirements.text
- Run main python file
python main.py
MIT License
Copyright (c) 2024 Aiden Sorabji
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.