Giter Club home page Giter Club logo

lgtm-0430-delay's Introduction

LGTM: Local-to-Global Text-Driven Human Motion Diffusion Model

没找到require.txt

暂时没有openai api

This repository contains the code and data for the paper "LGTM: Local-to-Global Text-Driven Human Motion Diffusion Model" (SIGGRAPH 2024).

Setup and Data Preparation

Virtual Environment

python -m pip install --user virtualenv # install virtual environment manager
virtualenv --prompt lgtm .env           # create a virtual environment named lgtm
source .env/bin/activate                # activate it

Then install all dependency

pip install -r ./requirements.txt

Dependencies

cd third_package/HumanML3D

follow the third_package/HumanML3D/README.md to prepare original HumanML3D motion data.

Prepare pre-trained LGTM model, TMR encoders and augmented part-level annotations.

bash prepare_data_models.sh

(Optional) Generate part-level motion description from scratch

You can generate part-level motion description by yourself. Firstly, you are required to provide OpenAI api key in ./third_packages/TMR/prepare/body_part_annotation_augmentation.py

BASE_URL = "https://api.openai.com/v1",
API_KEY = "",

Here, the API_KEY can get from your OpenAI account followed this document Then run the following commands:

cd third_packages/TMR
python prepare/body_part_annotation_augmentation.py

This script will use original full-body motion annotation for third_packages/TMR/datasets/annotations/humanml3d/annotations.json as input, and generate part-level motion description for each body part. The output will be saved in

  • third_packages/TMR/datasets/annotations/humanml3d/body_part_annotations.json
  • third_packages/TMR/datasets/annotations/body_part. The former output is group all part annotation in a map, the latter output is save each part annotation in a separate folder for train TMR encoders. You can use the body_part_annotations.json for what you want to do.

Generation

The playground.ipynb notebook contains how to use LGTM to generate a motion from text. You can follow the steps in the notebook to generate a motion from text.

Training

python -m lgtm.model.motion_diffusion fit --config configs/lgtm.yaml  --trainer.max_epoch=200

lgtm-0430-delay's People

Contributors

mykcs avatar

Watchers

 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.