This repository uses the C3D-tensorflow and Openpose implementation to recognize body movement from the Human3.6M Dataset.
The folder json
contains some of the videos segmentation for the training and testing set.
Clone the repository
$ git clone --recursive https://github.com/ibiscp/C3D-tensorflow.git
Install dependencies for Openpose
$ cd openpose
$ pip3 install -r requirements.txt
Create a folder for the pre-trained networks and one for the videos
$ mkdir model
$ mkdir videos
Download the two models for the training and place inside the model
folder created. For Openpose, save only the folder mobilenet_368x368
and its content.
Some of the videos can be found in the following link, download them without the folders and put in the folder videos
Generate the dataset
$ python3 generate_tfrecords.py --json=json/ --videos=videos/ --dest=tfrecords/
Train the network
$ python3 train.py --epochs=10 --batch_size=10 --evaluate_every=1 --use_pretrained_model=False
Shows the list of activities and the frequency of activities chosen to the training
$ python3 pose_list.py --json=json/
A total of 26 classes is used to train the model, these are divided in the following categories:
-
Head
- Turn right
- Turn left
- Raise
- Lean forward
-
Right/Left Arm
- Shoulder extension
- Shoulder adduction
- Shoulder flexion
- Shoulder abduction
- Elbow flexion
- Elbow extension
- Roll the wrist
-
Right/Left Leg
- Hip flexion
- Hip extension
- Knee flexion
- Knee extension