Skip to content

LwrncLiu/hand_signs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hand Sign translator with mediapipe and chromadb

Detects static hand signs from a webcam feed and translates the signs into the nearest label provided to the vector database (chromadb). Add as many single static hand sign variations as you want or even add mulitple variants of the same label.

Demo GIF

Requirements

  • anaconda
  • access to webcam

Setup Instructions

Clone this repository:

git clone https://github.com/LwrncLiu/hand_signs.git

In the hand_signs/ directory you just cloned, create a conda environment and activate it:

conda create -n aslenv python=3.10
conda activate aslenv

Install the necessary python packages using pip

pip install -r requirements.txt

Run app.py to spin up the application

python app.py

Navigate the UI

Upon startup, you see the home screen with the webcam feed in the center and three buttons along the bottom: START TEST, CAPTURE PHOTO, RESET DB.

Home Page

CAPTURE PHOTO

Capture Photo Page

To add hand signs and labels, orient your hand into the desired sign (left or right) in view of the webcam and click CAPTURE PHOTO. A preview of the captured photo is shown. Add a label to the captured photo and submit the hand sign to the vector database with SUBMIT & SAVE PHOTO. To start off, try signing a few letters from the ASL alphabet.

ASL Alphabet

If the captured hand sign is not accurate or no hands were detected in the captured photo, click RETRY to return to the home screen.

START TEST

Test Page

The visible hand's landmarker coordinates are converted to vectors and queried against the chromadb vector database. If a given hand sign's vector representation's euclidean distance is within 0.10 of an existing vector in the vector database, then the label for the existing vector is returned and drawn on the webcam feed.

To stop testing, simply click the STOP TEST button to return to the home screen.

RESET DB

If you do not like the existing hand signs stored or want to start from scratch clicking RESET DB will delete all records in the chromadb collection so that you can start from scratch.

This button is RED because the effects are irreversible!

About

Static hand sign translation with mediapipe and chromadb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages