You are browsing as a guest. Sign up (or log in) to start making projects!

8h 53m 53s logged

About a week ago I started my sign language translator and spent the first day mapping out the core architecture before writing any code. I planned out the 3 stage pipeline I’m building MediaPipe captures the webcam feed and extracts 21 points per hand, those get normalized relative to the wrist so distance from the camera doesn’t matter, then TensorFlow takes those 63 numbers and classifies them into a word. I also worked out why I’m going with this landmark based approach instead of the typical CNN on images method most tutorials use feeding a model 921,600 raw pixel values means it has to learn what a hand even looks like before it can learn gestures, whereas feeding it 63 clean numbers means it only has to learn the gesture itself. After locking in the architecture I spent the rest of that first day writing the code and split everything into three separate files so each part of the pipeline has its own job.

collect_data.py: opens up the webcam and runs MediaPipe hand detection, I hold a gesture and hit space to start recording samples for it. Every frame it grabs the 21 landmark points, normalizes them based on the wrist position and hand size, and saves those 63 numbers along with the gesture label as a row in a CSV. (have not tested it yet but it should work)

train_model.py: takes that CSV, encodes all the gesture labels, splits everything into training and test sets, and builds a small dense neural network 128 → 64 → 32 → output using TensorFlow. It saves the trained model and label encoder so the detector script can use them later.

run_detector.py: loads that trained model and runs live prediction, pulling the same normalized landmarks from the webcam and showing the predicted gesture in real time.
i didn’t get to test any of it BUT HOPING SOON

0
20

Comments 0

No comments yet. Be the first!