Giter Site home page Giter Site logo

stq-hydra / pytorch-gken Goto Github PK

View Code? Open in Web Editor NEW

This project forked from minieval/pytorch-gken

0.0 1.0 0.0 25 KB

Official Pytorch implementation of the ACM MM'21 paper: Keyframe Extraction from Motion Capture Sequences with Graph based Deep Reinforcement Learning

License: MIT License

Python 100.00%

pytorch-gken's Introduction

Graph Keyframe Evaluation Network - PyTorch implementation

Official Pytorch implementation of the ACM MM'21 paper: Keyframe Extraction from Motion Capture Sequences with Graph based Deep Reinforcement Learning

Prerequisites

Usage

Training

To train the model, download our preprocessed CMU Mocap dataset from the releases page and place the /train_data and /test_data folders in the repository root. train.py is used as follows:

python train.py [NUMBER OF EPISODES]

The paper uses 5000 episodes to train the model.

We update two Matplotlib diagrams per 200 episodes. The scatter plot displays rewards over time, while the line chart displays Q-loss over time.

Custom datasets

We provide a CMU_parse(file, start=1, frame_skip=5) function in bvh.py. This function properly formats motion capture data from the [BVH conversion of the CMU Mocap Dataset[(https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture) into a NumPy tensor. The NumPy tensor can be saved as a file that is used by our dataloader.py The default parameters of CMU_parse scale the BVH file down from 120FPS to 24FPS.

Evaluation

To evaluate with our model, download our pre-trained model from the releases page and place model.pt in the repository root. Alternatively, you may train your own model with train.py.

The evaluation accepts BVH files as input, using the CMU Mocap skeleton format. eval.py is used as follows:

python eval.py [BVH FILE] [NUMBER OF KEYFRAMES]

Human annotations

In the releases page, we provide five sets of human annotations in Keyframe Extraction - Demonstration.blend, which can be opened using Blender.

Acknowledgements

The motion capture data used in this project was obtained from mocap.cs.cmu.edu. The database was created with funding from the American National Science Foundation, under EIA-0196217.

The BVH file parsing module was written by 20tab srl.

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.