04.04.2025 Real-Time Testing of the Trained Gesture Model

I am continuing to work on the technical implementation of the project. This week, I have been working on connecting laptop camera and my trained model and see if it works.

Since I have trained the model on the static images, it takes time to recognise the gesture based on the trained model. Last week, I trained my model on the LeapMotion dataset, and even though I did not manage to achieve high results, I still decided to try it out in real time.

The example of the recognition using web camera can be found below.

This script allows you to classify static hand gestures in real time. It’s ideal for connecting gesture input to a Leap Motion or interactive visualization project.

It continuously captures live video frames, converts them to grayscale, resizes and normalizes them to fit the model’s input shape (128×128). The model outputs a probability distribution across predefined gesture classes, selects the most likely gesture, and overlays the prediction with confidence on the video feed using OpenCV. The process runs in a loop until the user presses the ‘q’ key, at which point the webcam is released and all display windows are closed.

The example of the video outcome can be found below:

The accuracy of gesture recognition is not that high, so I will continue to work on the model and evaluating its results.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *