Giter Site home page Giter Site logo

kakashi's Introduction

Kakashi

An LSTM RNN model to generate dance choreography (in the form of 3D pose matrices) from arbitrary music samples. Directed study project for Fall 2019 and Spring 2020, under Professor Margrit Betke at Boston University. Currently in progress.

Installation/Setup

Kakashi requires Pytorch >= 1.1 and Python >= 3.7.3. Python dependencies can be installed with pip install -r requirements.txt.

Dataset Generation

To generate your own dataset, follow these instructions. If you'd like to use the Kakashi WOD dataset, it can be downloaded here and these instructions can be ignored.

To generate the dataset, you'll need FFmpeg on your machine, as well as VideoPose3D setup (follow its instructions for inference, which include setting up Detectron). Once these projects are setup, set the following environment variables:

$KAKASHI=/path/to/Kakashi/root
$VIDEOPOSE=/path/to/VideoPose3D/root
$DETECTRON=/path/to/Detectron/root

Then download a playlist of YouTube videos to use as ground truth using python tools/download_playlist.py <DATASET_LABEL> --playlist_url <URL>. If the videos need to be trimmed, create a file in the cuts/ folder, named <DATASET_LABEL>.txt. Then run python tools/cut_videos.py <DATASET_LABEL>. Now, you can run the dataset generation script with python tools/generate_dataset.py <DATASET_LABEL>. This script will use VideoPose3D and Detectron to extract 3D pose keypoints from the videos, as well as use LibROSA to extract audio features. Be sure to check out the actual script as it has a variety of command line arguments. After this, the dataset is generated and ready to use!

Training

After your dataset is generated, you can run the model simply with python train.py <DATASET_LABEL>. This file also takes a variety of arguments, including running deterministically, loading presaved iterators to save time, and using a config file for model paramters (check out the config/ folder). This file will save the training, valid, and test iterators in the its/ folder, as well as pretrained models in the pre/ folder to save time in later runs.

##Inference Once pretrained models are generated, you can infer output using python infer.py path/to/model path/to/audio/file. If you'd like to render the output of the inference, copy tools/animate.py to the $VIDEOPOSE folder, then run inference with the --render flag. You can also specify a path to save the rendered video with --render_name.

kakashi's People

Contributors

dependabot[bot] avatar rooday avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.