{"id":18303603,"url":"https://github.com/ericguo5513/action-to-motion","last_synced_at":"2025-04-05T01:04:00.877Z","repository":{"id":50290836,"uuid":"283620062","full_name":"EricGuo5513/action-to-motion","owner":"EricGuo5513","description":"Official implementations for \"Action2Motion: Conditioned Generation of 3D Human Motions (ACM MultiMedia 2020)\"","archived":false,"fork":false,"pushed_at":"2024-10-16T00:53:10.000Z","size":92581,"stargazers_count":173,"open_issues_count":4,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T00:04:28.001Z","etag":null,"topics":["deep-learning","human-motion-analysis","motion-generation","motion-synthesis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EricGuo5513.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-29T23:07:43.000Z","updated_at":"2025-03-28T10:47:58.000Z","dependencies_parsed_at":"2024-10-17T10:44:19.660Z","dependency_job_id":null,"html_url":"https://github.com/EricGuo5513/action-to-motion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricGuo5513%2Faction-to-motion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricGuo5513%2Faction-to-motion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricGuo5513%2Faction-to-motion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricGuo5513%2Faction-to-motion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EricGuo5513","download_url":"https://codeload.github.com/EricGuo5513/action-to-motion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271515,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","human-motion-analysis","motion-generation","motion-synthesis"],"created_at":"2024-11-05T15:26:10.373Z","updated_at":"2025-04-05T01:03:55.868Z","avatar_url":"https://github.com/EricGuo5513.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## \u003cb\u003eAction2Motion: Conditioned Generation of 3D Human Motions\u003c/b\u003e \n### [[Project Page]](https://ericguo5513.github.io/action-to-motion/)  [[Paper]](https://arxiv.org/pdf/2007.15240.pdf)\u003cbr\u003e\n\n### [2021/01/12] Updates: add evaluation related files \u0026 scripts  \n\n#### Action classifier models\n* Motion feature extractors are pre-trained action classifiers, they are in ./model_file  \n\n#### Scripts\nAll other evaluation implementations are in ./eval_scripts\n* Use **load_classifier.py** to load pre-trained models for calculating accuracy and FID. Argument **input_size_raw** is equal to joint_num*3. \n* **final_evaluation.py** is the core file calculating the four metrics.  \n* Remember to import **fid.py** in final_evaluation.py. \n\nNote the evaluation files are not directly runnable. But you should be able to reproduce our metrics with minor re-editting on them.\n\nThe codes of Dataloaders \u0026 Datasets could be found in this repo https://github.com/EricGuo5513/action2motion/tree/master/motion_loaders as reference.\n\n----\nThere are 4 steps to run this code\n* Python Virtual Environment and dependencies\n* Data download and preprocessing\n* Training\n* Test and Animation\n\n\n----\n### Python Virtual Environment\nAnaconda is recommended to create the virtual environment\n\n```sh\nconda create -f environment.yaml\nsource activate torch-action2pose\n```\n\n----\n### Data \u0026 Pre-trained Models\n\nWe use three datasets and they are: `HumanAct12`, `NTU-RGBD` and `CMU Mocap`. All datasets have been properly pre-transformed to better fit our purpose. Details are provided in our project [webpage](https://ericguo5513.github.io/action-to-motion/) or dataset documents. \n\n**If you just want to play our pre-trained models without Lie version, you don't need to download datasets.**\n\nCreate a folder for dataset\n\n```sh\nmkdir ./dataset/\n```\n\n#### Download HumanAct12 Dataset\nIf you'd like to use HumanAct12 dataset, download the data folder [here](https://drive.google.com/drive/folders/1TBY2x-gD6f3yzQ0WNmXP2-be3xu3qDkV?usp=sharing), and place it in `dataset/`\n\n#### Download NTU-RGBD Dataset\nIf you'd like to use NTU-RGBD dataset, download the data folder [here](https://drive.google.com/drive/folders/16drEWHjxOHXWtbTvLeQyaXAjIYa-rMoz?usp=sharing), and place it in `dataset/`\n\n#### Download CMU Mocap Dataset\nIf you'd like to use CMU-Mocap dataset, download the data folder [here](https://drive.google.com/drive/folders/1nJUF-qFG9vFDIWirrNmpedgZSfJnBAaf?usp=sharing), and place it in `dataset/`\n\nOur pre-trained models have been involved in folder `checkpoints/`. You don't need to download them additionally.  \n\n----\n### Training\n**If you just want to play our pre-trained models, you could skip this step.**\nWe train the models using the script `train_motion_vae.py`. All the argments and their descriptions used for training are given in `options/base_vae_option.py` and `options/train_vae_option.py`. Some of them were used during trials, but may not be used in our paper. The argments used in examples are these which produce best performances during tuning.\n\n- HumanAct12\n```sh\npython train_motion_vae.py --name \u003cExperiment_name\u003e --dataset_type humanact12 --batch_size 128 --motion_length 60 --coarse_grained --lambda_kld 0.001 --eval_every 2000 --plot_every 50 --print_every 20 --save_every 2000 --save_latest 50 --time_counter --use_lie --gpu_id 0 --iters 50000\n```\nAll motions are of length 60.  \n\n- NTU-RGBD\n```sh\npython train_motion_vae.py --name \u003cExperiment_name\u003e --dataset_type ntu_rgbd_vibe  --batch_size 128 --motion_length 60 --lambda_kld 0.01 --eval_every 2000 --plot_every 50 --print_every 20 --save_every 2000 --save_latest 50 --time_counter --use_lie --gpu_id 0 --iters 50000 \n```\nAll motions are of length 60.  \n\n- CMU Mocap\n```sh\npython train_motion_vae.py --name \u003cExperiment_name\u003e --dataset_type mocap  --batch_size 128 --motion_length 100 --lambda_kld 0.01 --eval_every 2000 --plot_every 50 --print_every 20 --save_every 2000 --save_latest 50 --time_counter --use_lie --gpu_id 0 --iters 50000 \n```\nAll motions are of length 100.  \n\nModel files and intermediate data will be stored in `./checkpoints`\n\n### Test and Animation\n**If you are generating results from models with Lie representation, you need to download the corresponding datasets and place them in`/dataset`.** Because our model need to sample skeletons from real human datasets.\n\nThe animation results will appear in `eval_results/`\n\n#### Play our model with Lie\n\n- HumanAct12\n```sh\npython evaluate_motion_vae.py --name vanilla_vae_lie_mse_kld001 --dataset_type humanact12 --use_lie --time_counter --motion_length 60 --coarse_grained --gpu_id 0 --replic_times 5 --name_ext _R0\n```\n\n- NTU-RGBD\n```sh\npython evaluate_motion_vae.py --name vanilla_vae_lie_mse_kld01 --dataset_type ntu_rgbd_vibe --use_lie --time_counter --motion_length 60 --gpu_id 0 --replic_times 5 --name_ext R0 \n```\n\n- CMU Mocap\n```sh\npython evaluate_motion_vae.py --name vanilla_vae_lie_mse_kld01 --dataset_type mocap --use_lie --time_counter --motion_length 60 --gpu_id 0 --replic_times 5 --name_ext R0 \n```\n\n#### Play our model without Lie\n\n- HumanAct12\n```sh\npython evaluate_motion_vae.py --name vanila_vae_tf --dataset_type humanact12  --motion_length 60 --coarse_grained --gpu_id 0 --replic_times 5 --name_ext R0\n\n```\n- NTU-RGBD\n```sh\npython evaluate_motion_vae.py --name vanila_vae_tf_2 --dataset_type ntu-rgbd-vibe  --motion_length 60 --gpu_id 0 --replic_times 2 --name_ext R0 \n```\n- CMU Mocap\n```sh\npython evaluate_motion_vae.py --name vanila_vae_tf_2 --dataset_type mocap  --motion_length 100 --gpu_id 0 --replic_times 2 --name_ext R0 \n```\nYou could change the argument `replic_times` to get more generated motions. If you're testing the model you‘ve trained by you own, please replace the argument `name` with the name of checkpoint model you want to test.\n\n---\n#### Citation\nIf you find this model or datasets useful for you research, please consider citing our [work](https://ericguo5513.github.io/action-to-motion/website/bibtex.txt).\n\n#### Misc\nContact Chuan Guo at cguo2 at ualberta.ca for any questions or comments\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericguo5513%2Faction-to-motion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericguo5513%2Faction-to-motion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericguo5513%2Faction-to-motion/lists"}