1. Installing
* sudo pip3 install torch torchvision tensorboardX tensorflow numpy scipy imageio opencv-python
2. Creating dataset from videos (Preprocessing videos)
* python PoseNet/converter/tfjs2python.py
* python index2_video_shot_processing.py
* python index3_create_Only_in_out_dataset.py
3. Training
* python index4_train_mdn_simple_rnn_bnc.py
4. Testing (works directly as pretrained weights included in repo)
* run jupyter notebook in root directory
* open index5_test_trained_model_simplernn_for_bnc.ipynb and run all cells
* use some software(may be windows 10 photos app) to combine generated video and input audio
Classical | Western | Mixed |
---|---|---|
Music2Dance(project root)
|
β index2_video_shot_processing.py - Process mp4 video files present in data directory
β index3_create_Only_in_out_dataset.py - Creating input/output bundles for training the model
β index4_train_mdn_simple_rnn.py - Process and train with training data
β index4_train_mdn_simple_rnn_for_bnc.py - Same as above but if training data has two types of dances (like western and classical)
β index5_test_trained_model_simplernn.ipynb - Testing trained model with random audio file
β index5_test_trained_model_simplernn_for_bnc.ipynb
β ReadMe.md
β
ββββcustom_utils - Utilities
β datastft.py
β mobilenet.py
β video_shot_processing_utils.py
β
ββββdata
β ββββtest_audio
β | test_audio.wav
| ββββaudio_wav_indexed
| | audio (1).wav
| ββββvideo_wav_indexed
| video (1).mp4
β
ββββObject_detection - Object Detection model to detect human bounding box before finding the pose
β β mscoco_label_map.pbtxt
β β string_int_label_map.proto
β β visualization_utils.py
β β
β ββββssd_mobilenet_v1_coco_2018_01_28
β β checkpoint
β β frozen_inference_graph.pb
β β model.ckpt.data-00000-of-00001
β β model.ckpt.index
β β model.ckpt.meta
β β pipeline.config
β β
β ββββsaved_model
β β saved_model.pb
β β
β ββββvariables
ββββoutput
β ββββmotiondance_simplernn - Saved weights
β β ββββcheckpoints
β β epoch_{num}.pth.tar
β β
β ββββmotiondance_simplernn_bnc
β β ββββcheckpoints
β β epoch_bnc_{num}.pth.tar
β β
β ββββResult - Test result video files are saved here
β ββββResult_Audio
β ββββResult_Video
ββββPoseNet
ββββconverter
β config.yaml
β manifest.json
β tfjs2python.py - Converting TensorflowJs model to python tensorflow understandable model
β wget.py
β
ββββcheckpoints
checkpoint
model.ckpt.data-00000-of-00001
model.ckpt.index
model.ckpt.meta
- https://github.com/Fhrozen/motion_dance
- https://github.com/infocom-tpo/PoseNet-CoreML
- https://github.com/tensorflow/models/tree/master/research/object_detection
- https://github.com/axelbrando/Mixture-Density-Networks-for-distribution-and-uncertainty-estimation
Copyright Β© 2018, Ajay Sreeram