rabBit64 / Sign-language-recognition-with-RNN-and-Mediapipe

Apache License 2.0
8 stars 0 forks source link
deep-neural-networks gesture-recognition lstm rnn sign-language-translation

Sign language recognition with RNN and Mediapipe

with multi hand tracking

Sign language gesture recognition using a reccurent neural network(RNN) with Mediapipe hand tracking.

This project is for academic purpose. Thank you for Google's Mediapipe team :)

Data Preprocessing with Mediapipe (Desktop on CPU)

Create training data on Desktop with input video using Multi Hand Tracking. Gesture recognition with deep learning model can be done with hand landmark features per frame with RNN training .

CUSTOMIZE:

1. Set up Hand Tracking framework

2. Create your own training data

Make train_videos for each sign language word in one folder. Use build.by file to your mediapipe directory.

To make mp4 file and txt file with mediapipe automatically, run

  python build.py --input_data_path=[INPUT_PATH] --output_data_path=[OUTPUT_PATH]

inside mediapipe directory.

IMPORTANT: Name the folder carefully as the folder name will be the label itself for the video data. (DO NOT use space bar or '_' to your video name ex) Apple_pie (X))

For example:

input_video
├── Apple
│   ├── IMG_2733.MOV
│   ├── IMG_2734.MOV
│   ├── IMG_2735.MOV
│   └── IMG_2736.MOV
└── Happy
    ├── IMG_2472.MOV
    ├── IMG_2473.MOV
    ├── IMG_2474.MOV
    └── IMG_2475.MOV
    ...

The output path is initially an empty directory, and when the build is complete, Mp4 and txt folders are extracted to your folder path.

Created folder example:

output_data
├── Absolute
│   └── Apple
│       ├── IMG_2733.txt
│       ├── IMG_2734.txt
│       ├── IMG_2735.txt
│       └── IMG_2736.txt
|       ...
├── Relative
│   └── Apple
│       ├── IMG_2733.txt
│       ├── IMG_2734.txt
│       ├── IMG_2735.txt
│       └── IMG_2736.txt
│       ...
└── _Apple
     ├── IMG_2733.mp4 
     ├── IMG_2734.mp4
     ├── IMG_2735.mp4
     └── IMG_2736.mp4

Your contribution is welcome here!

3. Train RNN model

Watch this video for the overall workflow. more details

future work