{"id":28491506,"url":"https://github.com/line/motionpatches","last_synced_at":"2025-07-11T00:07:31.137Z","repository":{"id":244204624,"uuid":"813923619","full_name":"line/MotionPatches","owner":"line","description":"Official implementation for \"Exploring Vision Transformers for 3D Human Motion-Language Models with Motion Patches\" (CVPR 2024)","archived":false,"fork":false,"pushed_at":"2024-07-04T05:27:36.000Z","size":475,"stargazers_count":24,"open_issues_count":2,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-04T23:35:22.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/line.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-06-12T02:18:16.000Z","updated_at":"2025-06-27T13:08:18.000Z","dependencies_parsed_at":"2024-06-13T12:24:56.765Z","dependency_job_id":null,"html_url":"https://github.com/line/MotionPatches","commit_stats":null,"previous_names":["line/motionpatches"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/line/MotionPatches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FMotionPatches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FMotionPatches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FMotionPatches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FMotionPatches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/line","download_url":"https://codeload.github.com/line/MotionPatches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FMotionPatches/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264696295,"owners_count":23650936,"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":[],"created_at":"2025-06-08T08:07:34.589Z","updated_at":"2025-07-11T00:07:31.132Z","avatar_url":"https://github.com/line.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Motion Patches\n\nCode of the paper \"Exploring Vision Transformers for 3D Human Motion-Language Models with Motion Patches\" (CVPR 2024).\n\n[![arxiv paper](https://img.shields.io/badge/arxiv-paper-orange)](https://arxiv.org/pdf/2405.04771)\n\u003ca href='https://yu1ut.com/MotionPatches-HP/'\u003e\u003cimg src='https://img.shields.io/badge/Project-Page-Green'\u003e\u003c/a\u003e\n[![License](https://img.shields.io/badge/license-CC--BY--NC--4.0-blue.svg)](https://creativecommons.org/licenses/by-nc/4.0/)\n\n\n## Framework\n\n![Framework](./assets/method.jpg)\n\n## Requirements\n- Python 3.11\n- PyTorch 2.0.1+\n\n#### Using [Poetry](https://python-poetry.org/docs/) (Recommended)\n```bash\npoetry install\n```\n\n#### Using Conda\n```bash\nconda create -n MoPa python=3.11\nconda activate MoPa\nconda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia\npip install -r requirements.txt\n```\n\n## Data Preparation\nDownload HumanML3D Dataset and KIT-ML Dataset from the repository of [HumanML3D](https://github.com/EricGuo5513/HumanML3D#humanml3d-3d-human-motion-language-dataset). Unzip and locate them in the `data` folder.\n\nThe whole directory should be look like this:\n```\nMotionPatches\n│   README.md\n│   requirements.txt\n|   ...\n|\n└───conf\n└───scripts\n└───...\n│   \n└───data\n    └───HumanML3D\n    |   └───new_joint_vecs\n    |   └───new_joints\n    |   └───...\n    │   \n    └───KIT-ML\n        └───new_joint_vecs\n        └───new_joints\n        └───...\n```\nThen calculate the mean and variance of each dataset by:\n```bash\npython scripts/cal_mean_var.py\n```\n\n## Pre-trained Model\nDownload pre-trained model from [huggingface](https://huggingface.co/line-corporation/MotionPatches) and put them in `checkpoints/pretrained/`.\n\nEvaluate the model with HumanML3D via retrieval:\n```bash\npython scripts/test.py dataset=HumanML3D exp_name=pretrained\n```\n\nEvaluate the model with KIT-ML via retrieval:\n```bash\npython scripts/test.py dataset=KIT-ML exp_name=pretrained\n```\n\nUsing `scripts/test_batch.py` can get the result of small batches with 32 samples.\n\n## Training\nTrain the model with HumanML3D:\n```bash\npython scripts/train.py dataset=HumanML3D\n```\n\nTrain the model with KIT-ML:\n```bash\npython scripts/train.py dataset=KIT-ML\n```\n\n## Evaluation\nEvaluate the model with HumanML3D via retrieval:\n```bash\npython scripts/test.py dataset=HumanML3D\n```\n\nEvaluate the model with KIT-ML via retrieval:\n```bash\npython scripts/test.py dataset=KIT-ML\n```\n\nUsing `scripts/test_batch.py` can get the result of small batches with 32 samples.\n\n## Citation\n\n```\n@InProceedings{yu2024exploring,\n  title={Exploring Vision Transformers for 3D Human Motion-Language Models with Motion Patches},\n  author={Yu, Qing and Tanaka, Mikihiro and Fujiwara, Kent},\n  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},\n  year={2024}\n}\n```\n\n## License\n[CC BY-NC 4.0](LICENSE)\n\nAdditionally, this repository contains third-party software. Refer [NOTICE.txt](NOTICE.txt) for more details and follow the terms and conditions of their use.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fmotionpatches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fline%2Fmotionpatches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fmotionpatches/lists"}