Sign Lanaguaage Hub
  • Welcome to Sign Language Hub
  • Problem to solve
  • Roadmap
  • Technology
    • AI model
      • CNNs
      • Mediapipe
      • Usage
    • System
  • FAQ
  • Offical Links
  • Articles
    • Alphabet
    • Training and Validation Metrics Analysis for Model Performance Optimization
    • SLHUB update 1.2.2: Two-hand version
Powered by GitBook
On this page
  • 1. Preprocessing and Feature Extraction
  • 2. Gesture Classification Using CNN
  • 3. Post-Processing
  1. Technology
  2. AI model

Usage

Combines CNNs and Mediapipe

1. Preprocessing and Feature Extraction

Before passing the landmarks into the CNN for classification, the extracted hand landmarks are preprocessed and transformed into a form that the CNN can efficiently process:

  • Normalization: The landmark coordinates are normalized relative to the bounding box of the hand or the frame of the image, ensuring consistency regardless of hand size or camera distance.

x^i=wxi,y^i=hyi\hat{x}_i = w x_i, \quad \hat{y}_i = h y_ix^i​=wxi​,y^​i​=hyi​

Where (xi, yi{x}_i,\ {y}_ixi​, yi​) are the raw coordinates, and 𝑤 , ℎ are the width and height of the image frame.

  • Angle Features: Angles between specific joint positions (e.g., between the wrist, index finger, and thumb) can also be calculated using trigonometric functions, such as:

θ=arccos⁡((x2−x1)2+(y2−y1)2(x3−x1)2+(y3−y1)2⋅(x2−x1)(x3−x1)+(y2−y1)(y3−y1))\theta = \arccos\left(\frac{(x_2 - x_1)^2 + (y_2 - y_1)^2}{\sqrt{(x_3 - x_1)^2 + (y_3 - y_1)^2} \cdot \sqrt{(x_2 - x_1)(x_3 - x_1) + (y_2 - y_1)(y_3 - y_1)}}\right)θ=arccos((x3​−x1​)2+(y3​−y1​)2​⋅(x2​−x1​)(x3​−x1​)+(y2​−y1​)(y3​−y1​)​(x2​−x1​)2+(y2​−y1​)2​)

Where 𝜃 θ represents the angle between three landmarks: wrist, index finger, and thumb.

These extracted features are then passed into the CNN for classification.

2. Gesture Classification Using CNN

Once the features are extracted, they are input into a Convolutional Neural Network for classification. During training, the CNN learns to map combinations of hand gestures (patterns of hand landmarks) to specific classes (such as letters, words, or commands).

The classification is performed using the Softmax activation function, which outputs the probability for each class yi{y}_iyi​ (i.e., a sign language gesture):

Softmax(zi)=ezi∑jezj\text{Softmax}(z_i) = \frac{e^{z_i}}{\sum_j e^{z_j}}Softmax(zi​)=∑j​ezj​ezi​​

Where zi{z}_izi​ are the logits (raw output) from the final fully connected layer, and the output is the probability distribution for each gesture.

3. Post-Processing

After gesture classification, the recognized sign is outputted as text or spoken words using Text-to-Speech (TTS). This text can be displayed on a screen for real-time communication or converted into audio output.

PreviousMediapipeNextSystem

Last updated 5 months ago