{"id":14961313,"url":"https://github.com/calciferzh/amcparser","last_synced_at":"2025-10-24T20:31:30.923Z","repository":{"id":46265473,"uuid":"132829248","full_name":"CalciferZh/AMCParser","owner":"CalciferZh","description":"Parse and visualize asf/amc files from CMU MoCap dataset.","archived":false,"fork":false,"pushed_at":"2023-02-21T20:53:55.000Z","size":497,"stargazers_count":144,"open_issues_count":1,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-31T04:16:28.061Z","etag":null,"topics":["amc","animation","asf","body","mocap","motion","pose","skeleton"],"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/CalciferZh.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":"2018-05-10T00:56:41.000Z","updated_at":"2025-01-24T06:45:58.000Z","dependencies_parsed_at":"2024-09-24T13:41:27.937Z","dependency_job_id":"102c1564-e40b-4502-8278-41ff5df736d1","html_url":"https://github.com/CalciferZh/AMCParser","commit_stats":{"total_commits":18,"total_committers":5,"mean_commits":3.6,"dds":"0.38888888888888884","last_synced_commit":"08e5a3662e197e7e40eed2c18fc254282eb381f9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalciferZh%2FAMCParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalciferZh%2FAMCParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalciferZh%2FAMCParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalciferZh%2FAMCParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CalciferZh","download_url":"https://codeload.github.com/CalciferZh/AMCParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238035385,"owners_count":19405682,"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":["amc","animation","asf","body","mocap","motion","pose","skeleton"],"created_at":"2024-09-24T13:24:45.918Z","updated_at":"2025-10-24T20:31:30.255Z","avatar_url":"https://github.com/CalciferZh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AMCParser\n\nA lightweight library to parse and visualize asf/amc files from [CMU MoCap](http://mocap.cs.cmu.edu/) dataset using Python 3.\n\nThe main purpose of this library is to help understanding how asf/amc file works, as well as how to use them. Therefore, simplicity and readability are stressed, while robustness is ignored.\n\n## Demo\n\nDemo using PyGame and PyOpenGL:\n\n![3D Demo](demo.gif)\n\nDemo using Matplotlib:\n\n![Static Demo](demo_static.png)\n\n## Usage\n\nThere's a simple example in the source code as follows:\n\n```python\nif __name__ == '__main__':\n  asf_path = './data/01/01.asf'\n  amc_path = './data/01/01_01.amc'\n  joints = parse_asf(asf_path)\n  motions = parse_amc(amc_path)\n  frame_idx = 180\n  joints['root'].set_motion(motions[frame_idx])\n  joints['root'].draw()\n```\n\nAnd another example in `3Dviewer.py`:\n```python\n  asf_path = './data/01/01.asf'\n  amc_path = './data/01/01_01.amc'\n  joints = parse_asf(asf_path)\n  motions = parse_amc(amc_path)\n  v = Viwer(joints, motions)\n  v.run()\n```\n\nThe data can be found from CMU MoCap dataset.\n\n## Parser\n\nThe asf/amc parsers are straightforward and easy to understand. The parsers are fully tested on the CMU MoCap dataset, but I don't expect it can work on other datasets without any modification. However, it won't be hard to extend it for more complicating asf/amc files.\n\n## Visualization\n\nMatplotlib is used to draw joints and bones in 3D statically; PyGame and PyOpenGL are used to draw motion sequence.\n\nIn 3DViewer, we support:\n\n* `WASD` to move around.\n* `QE` to zoom in/out.\n* `↑ ↓ ← →` to rotate.\n* `LEFT MOUSE BUTTON` to drag.\n* `RETURN` to reset camera view.\n* `SPACE` to start/pause.\n* `,` and `.` to rewind and forward.\n\nNOTE that my implementation of changing view is inefficient (but fluent enough) with some small bugs, but I don't have time to improve it. Pull request is welcomed.\n\n## Dependencies\n\n* numpy\n* transforms3d\n* matplotlib\n* pygame\n* pyopengl\n\nAll the dependencies are available via `pip install`.\n\n## One More Thing\n\nIf this repo is used in any publications or projects, please let me know. I would be happy and encouraged =)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalciferzh%2Famcparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalciferzh%2Famcparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalciferzh%2Famcparser/lists"}