{"id":18439527,"url":"https://github.com/idiap/potr","last_synced_at":"2025-04-07T21:32:38.612Z","repository":{"id":45008990,"uuid":"395544125","full_name":"idiap/potr","owner":"idiap","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-28T15:38:14.000Z","size":1167,"stargazers_count":36,"open_issues_count":3,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-23T01:02:37.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idiap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-13T06:32:55.000Z","updated_at":"2025-03-16T10:27:50.000Z","dependencies_parsed_at":"2022-08-12T11:40:43.525Z","dependency_job_id":null,"html_url":"https://github.com/idiap/potr","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/idiap%2Fpotr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fpotr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fpotr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fpotr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idiap","download_url":"https://codeload.github.com/idiap/potr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247732713,"owners_count":20986910,"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":"2024-11-06T06:25:16.303Z","updated_at":"2025-04-07T21:32:33.600Z","avatar_url":"https://github.com/idiap.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pose Transformers: Human Motion Prediction with Non-Autoregressive Transformers\n\n\n![alt text](imgs_docs/potr-eps-converted-to.png)\n\n\nThis is the repo used for human motion prediction with non-autoregressive\ntransformers published with our [paper](https://openaccess.thecvf.com/content/ICCV2021W/SoMoF/papers/Martinez-Gonzalez_Pose_Transformers_POTR_Human_Motion_Prediction_With_Non-Autoregressive_Transformers_ICCVW_2021_paper.pdf)\n\n![alt text](imgs_docs/potr_walking.gif)\n\n## Requirements\n\n* **Pytorch**\u003e=1.7.\n* **Numpy**.\n* **Tensorboard** for pytorch.\n\n## Data\n\nWe have performed experiments with 2 different datasets\n\n1. **H36M**\n2. [**NTURGB+D**](https://rose1.ntu.edu.sg/dataset/actionRecognition/) (60 actions)\n\nFollow the instructions to download each dataset and place it in ```data```.\n\n**Note**. You can download the H36M dataset using ```wget http://www.cs.stanford.edu/people/ashesh/h3.6m.zip```.\nHowever, the code expects files to be **npy** files instead of **txt**.\nYou can use the script in ```data/h36_convert_txt_to_numpy.py``` to convert to ***npy*** files.\n\n## Training\n\nTo run training with H3.6M dataset and save experiment results in ```POTR_OUT``` folder\nrun the following:\n\n\n```\npython training/transformer_model_fn.py \\\n  --model_prefix=${POTR_OUT} \\\n  --batch_size=16 \\\n  --data_path=${H36M} \\\n  --learning_rate=0.0001 \\\n  --max_epochs=500 \\\n  --steps_per_epoch=200 \\\n  --loss_fn=l1 \\\n  --model_dim=128 \\\n  --num_encoder_layers=4 \\\n  --num_decoder_layers=4 \\\n  --num_heads=4 \\\n  --dim_ffn=2048 \\\n  --dropout=0.3 \\\n  --lr_step_size=400 \\\n  --learning_rate_fn=step \\\n  --warmup_epochs=100 \\\n  --pose_format=rotmat \\\n  --pose_embedding_type=gcn_enc \\\n  --dataset=h36m_v2 \\\n  --pre_normalization \\\n  --pad_decoder_inputs \\\n  --non_autoregressive \\\n  --pos_enc_alpha=10 \\\n  --pos_enc_beta=500 \\\n  --predict_activity \\\n  --action=all\n```\n\nWhere ```pose_embedding_type``` controls the type of architectures of networks \nto be used for encoding and decoding skeletons (\\phi and \\psi in our paper). \nSee ```models/PoseEncoderDecoder.py``` for the types of architectures.\nTensorboard curves and pytorch models will be saved in ```${POTR_OUT}```.\n\n\n# Citation\n\nIf you happen to use the code for your research, please cite the following paper\n\n```\n@inproceedings{Martinez_ICCV_2021,\nauthor = \"Mart\\'inez-Gonz\\'alez, A. and Villamizar, M. and Odobez, J.M.\",\ntitle = {Pose Transformers (POTR): Human Motion Prediction with Non-Autoregressive Transformers},\nbooktitle = {IEEE/CVF International Conference on Computer Vision - Workshops (ICCV)},\nyear = {2021}\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fpotr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidiap%2Fpotr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fpotr/lists"}