Git Product home page Git Product logo

poseaug's Introduction

PWC PWC PWC PWC

PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation

Code repository for the paper:
PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation
Kehong Gong*, Jianfeng Zhang*, Jiashi Feng
CVPR 2021 (oral presentation)
[paper] [project page (coming soon)]

alt text

Installation

The experiments are conducted on Ubuntu 16.04, with Python version 3.6.9, and PyTorch version 1.0.1.post2.

To setup the environment:

cd PoseAug
conda create -n poseaug python=3.6.9
conda activate poseaug
pip install -r requirements.txt

Prepare dataset

  • Please refer to DATASETS.md for the preparation of the dataset files.

Run training code

  • There are 32 experiments in total (16 for baseline training, 16 for PoseAug training), including four pose estimators (SemGCN, SimpleBaseline, ST-GCN, VideoPose) and four 2D pose settings (Ground Truth, CPN, DET, HR-Net).
  • The training procedure contains two steps: pretrain the baseline models and then train these baseline models with PoseAug.
  • We also provide pretrained baseline and poseaug models (link) for further training and evaluation.

To pretrain the baseline model,

# gcn
python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt
python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb
python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m
python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr

# videopose
python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt
python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb
python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m
python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr

# mlp
python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt
python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb
python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m
python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr

# st-gcn
python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt
python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb
python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m
python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr
# Note: for st-gcn, dropout is set to -1, representing the default dropout setting used in the original code (different layers using different dropout values).

To train the baseline model with PoseAug:

# gcn
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints gt
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints hr

# video
python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints gt
python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb
python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m
python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints hr

# mlp
python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints gt
python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb
python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m
python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints hr

# st-gcn
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints gt
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m
python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints hr

All the checkpoints, evaluation results and logs will be saved to ./checkpoint. You can use tensorboard to monitor the training process:

cd ./checkpoint/poseaug
tensorboard --logdir=/path/to/eventfile

Comment:

  • For simplicity, hyper-param for different 2D pose settings are the same. If you want to explore better performance for specific setting, please try changing the hyper-param.
  • The GAN training may collapse, change the hyper-param (e.g., random_seed) and re-train the models will solve the problem.

Run evaluation code

python3 run_evaluate.py --posenet_name 'videopose' --keypoints gt --evaluate '/path/to/checkpoint'

We provide a checkpoint/PoseAug_result_summary.ipynb, which can generate the result summary table for all 16 experiments.

Run inference code

We provide an inference code here. Please follow the instruction and download PoseAug's pretrained model for inference on images/videos.

Citation

If you find this code useful for your research, please consider citing the following paper:

@inproceedings{gong2021poseaug,
  title       = {PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation},
  author      = {Gong, Kehong and Zhang, Jianfeng and Feng, Jiashi},
  booktitle   = {CVPR},
  year        = {2021}
}

Acknowledgements

This code uses SemGCN, SimpleBL, ST-GCN and VPose3D as backbone. We gratefully appreciate the impact these libraries had on our work. If you use our code, please consider citing the original papers as well.

poseaug's People

Contributors

garfield-kh avatar jfzhang95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poseaug's Issues

How to evaluate the model on 3DPW dataset?

The code only provides how to evaluate on the Human 3.6m dataset and 3DHP dataset, while the PoseAug paper also has a cross-dataset validation on the outdoor 3DPW dataset, but I don't know how to download the dataset and process it as described in the DATASET.md file(DATASET. md file in this project only writes how to process Human 3.6m and 3DHP dataset).Hope you can provide the operation method. Thank you very much!

hrnet 2d 数据

请问,您可以提供一下 hrnet 在 hm36 上的 17 个关键点的数据吗,就是相比于您 16 个关键点文件删减之前的,或者是您可以告知一下哪里可以下载吗?

3DHP evaluation

Hi nice work and thanks for releasing your code.

could you please point me to what data for MPI you use to train and validate on? Also, can you tell me what file contains your skeleton and MPI specific dataset class?

Also, do you only evaluate with MpJpE or do you use PcK amd any other metrics on MPI?

Question about feedback loss in code

Hello. Thanks for your excellent job.
I have some confusion about your feedback loss.
In your code, I think function(fix_hard_ratio_loss) in model_gan_train.py equals the feedback loss of equation (9) in the paper. But fix_hard_ratio_loss has never been called. You use fix_hardratio which is not mentioned in the paper to calculate the feedback loss.
I want to know the meaning of fix_hardratio and why you don't use the fix_hard_ratio_loss?

Question about the operation parameters

Hello. Thanks for your excellent job.
I have read your paper and I have some confusion about the details.
You mentioned that you have three operation parameters [γba, γbl and (R, t)] which represent the joint angles, bone length, and camera location respectively. They are generated by the augmentor.
I wonder that whether the [γba, γbl] are both floating number or a vector? It seems unlikely to be vectors in mathematic expression since they're writen in lower case, but if they are floating numbers, are all the bone length and bone angles will be changed with the same value?

the data preprocess pipeline

Nice work! I draw the data preprocess pipeline here, can you help me to check its correctness

huamn3.6(17 world 3D joints) --> delete nose joint --> huamn3.6(16 world 3D joints) -->normalize 3D (/ 1000) -->huamn3.6( noramlized 16 world 3D joints) --> normalize camera parameter and perspective projection --> get normalized 2D pose

MPI: delete nose --> (16 2D pose) --> normalize 2D using camera resolution -->input to poseaug -->predicted MPI 3D <==MPJPE protocal 1, PCK, AUC=> GT MPI 3D, then the MPJPE protocal 1, PCK, AUC are recorded in your paper, Table2

Is this right? thank you very much~

how to use my own data ( detect 2d keypoints h36m format )

I want to see result with my own video data. So I find some great example to inference video, VideoPose3D. But they use detectron2 to detect keypoints, these keypoints type is COCO.

So I wonder if you can recommend any open source to detect keypoints, type of H36M, or any idea to change COCO type to H36M?

I tried coco keypoints transform to h36m format, making new h36m keypoints array using copy or calculate from coco.

new_kp = np.zeros(kp.shape)  # kp is outkeypoints from VideoPose3D/data/prepare_data_2d_custom.py
   new_kp[:, 0, :] = (kp[:, 11, :] + kp[:, 12, :]) / 2  # hip
   new_kp[:, 1, :] = kp[:, 12, :]  # Rhip
   new_kp[:, 2, :] = kp[:, 14, :]  # Rknee

But coco format is insufficient to calculate some keypoints(13 : Thorax, 15 : Head, 12 : Spine).

Thanks for your great works, I have learned a lot from them.

about MPJPE of the poseAug

Thanks your work! After running the code:
python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints gt
MPJPE of the best model is 41.7. But MPJPE of my pretrained model is 41.3. Is that normal?
I didn't change any code.

How to make npy file?

Thank you for your excellent research.

https://github.com/jfzhang95/PoseAug/blob/main/data_extra/bone_length_npy/hm36s15678_bl_templates.npy

I wonder how this file was created.

Error to setup the environment.

I've created conda environment and then did pip install -r requirements.txt. But I've got an error:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/tmp/build/80754af9/numpy_and_numpy_base_1603487797006/work'

It seems I don't have files like file:///tmp/build/80754af9/numpy_and_numpy_base_1603487797006/work, which are in the requirements. There are temporary files, which I can not get.

How to inference

How to inference?? the inference code you provide is PoseTriplet, i don‘t know how use to our model

Pretrained model

Hi thank you for your great work! May i ask whether and when you can share your pretrained model?

Hyper-parameters for reproducing PoseAug on H3.6M

Thank you for your interesting and exciting work!

After going over the code, I wonder if you can also provide the hyper-parameters (total epoch, learning rate ...) to reproduce the result in Table 4, namely the PoseAug using different keypoints source on H3.6M?

Thank you!

About GAN mode collapse prevention

Hello,
I am going through your code lately. I am freshman to GAN and I found two functions difficult to understand.
In the "train_gan" fonction from model_gan_train.py, you used:

  1. "diff_loss" function to encourage diversity and regulate loss for ba\rt to avoid gan collapse.
  2. "get_feedback_loss" function to generate harder case.

But what kind of strategy have you used for these two purposes?
I can see from "diff_loss" that you particularly selected some loss by some standards, and how does this help prevent gan collapse?

In "get_feedback_loss", why are there "weights" applied to "posenet_loss" ? What is the purpose of "feedback_loss", selecting losses from cases that is too hard?

I will appreciate your answer.
Thanks a lot!

Regarding the 2D input

Hello,

Sorry to bother you again, may I know which joint is not needed for your 2D input? Is it head, or nose?
I understand that your input and output are both 16 joints, and nose is not predicted by the model.

Many thanks,
Shiyang

pretrain the baseline model

Your work is great! Thanks. when I run the command python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt, the following error was generated
image
Can i trouble you to check what is wrong? Thanks!

数据增广区别

想请问一下,这里用的数据扩增方式和Cascaded Deep Monocular 3D Human Pose Estimation with Evolutionary
Training Data这里提到的方式有什么区别?

What is the shortest way to get prediction?

I'm not proficient in this type of neural network and, to be honest, don't even understand does it consume video, what format, image, and its format, or what?
I've read carefully README and DATASETS.md files and they have links to other repos as well as require some 3d pose NN knowledge.
I expect this could be helpful to get the shortest way to get one simple prediction for others who aren't deeply involved in this domain.

If this has value to you, as a data analyst and data scientist, I would expect:

  • python predict.py -input ... -checkpoint ...
  • link to just one "best" checkpoint (there are a number of them now, I don't know what they mean and the difference)
  • maybe just a link on an example of one input
  • a short description of the output matrix, its columns, and rows.

It's fine if it's not important and you just close the issue. Thank you anyway for the open-sourced solution to the important problem.

About baseline !!

Hi
The MLP baseline model
The Videopose3d(single frame) model

Is there any difference between the two ? 

H36M CPN and GT number of samples and Nose joint question.

Hi,
I really appreciate your great work and I have a question about number of joints (16).
I follow your dataset instruction and get H36M(GT2D, GT3D, CPN2D, HR2D).
The number of GT2D sample is (1559752,16,2), however, CPN2D is (1561382,17,2).
Am I manually except Nose joint(Index 9)? and how can I match total number of samples?
Thank you for your reply in advance.

Pre-trained models (with PoseAug)

Hello,

Thanks for open-sourcing your work, it is indeed a very nice project!
May I have your pre-trained models (with PoseAug) for comparison purposes? I can see that only pretrained ST-GCN (w. PoseAug) is available.
It would be fantastic to have also pretrained SemGCN, SimpleBL and VPose3d.

Many thanks,
Shiyang

About number of joints

Thank you for your excellent work. I want to know whether the shape of inputs_2d in the test_3dhp.npz is the (16,2)? If I want to test my own model in the 3dhp, but the input's shape of my model is (17,2), what should I do? Is it possible to multiply your Ct17 matrix directly here?

trajectory model training

I am trying to use this training frame to train a baseline trajectory model (predict root node camera space position). It works but loss seems weird: the test MPJPE is always around 110.

Is there anything I miss? Have you tried train any trajectory model for PoseAug model?

I encountered some tricky problems

Can this model run a single picture? When I ran a picture, there was some misalignment. The model used was MLP trained by PoseAug, and I found that the result was not very satisfactory.
20210908-104340
20210908-170632
20210908-170643

Numpy and other libraries from a local wheel

(base) C:\Users\srskr\Desktop\PoseAug>conda activate poseaug

(poseaug) C:\Users\srskr\Desktop\PoseAug>pip install -r requirements.txt
Processing c:\tmp\build\80754af9\numpy_and_numpy_base_1603487797006\work
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\tmp\\build\\80754af9\\numpy_and_numpy_base_1603487797006\\work'

In requirements.txt you specified local files. How this should work?

Evaluation on MPI-INF-3DHP

I am assuming your training data is H36M poses not the meshes and you are evaluating on pose on MPI-INF-3DHP as well, without using SMPL parameters from both.
Further, you apply poseAug on 2D and 3D poses of H36M to get training pairs. At that time you would use 16 joint skeleton model of

So, my questions are how do you evaluate given that the skeleton model of MPI-INF-3DHP is 23 joints models and some basic joints have no correspondence from H36M to MPI-INF-3DHP, e.g. Thorex, head_top, Spine are not there in H36M, however, H36M have Neck and Head joint.

How did you evaluate MPI-INF-3DHP in a cross-dataset-testing-scenrio given skeleton model discrepancy?

I guess you only use a subset of joints to evaluate?

Error when training model

Hello. Thanks for your work.
I am trying to train a GCN model using the command
python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt,
but an error occurs.
Traceback (most recent call last):
File "run_baseline.py", line 102, in
main(args)
File "run_baseline.py", line 65, in main
glob_step, args.lr_decay, args.lr_gamma, max_norm=args.max_norm)
File "/home/hkuit155/Documents/PoseAug/function_baseline/model_pos_train.py", line 41, in train
outputs_3d = model_pos(inputs_2d)
File "/home/hkuit155/anaconda3/envs/poseaug/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/hkuit155/Documents/PoseAug/models_baseline/gcn/sem_gcn.py", line 104, in forward
out = self.gconv_input(x)
File "/home/hkuit155/anaconda3/envs/poseaug/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/hkuit155/anaconda3/envs/poseaug/lib/python3.6/site-packages/torch/nn/modules/container.py", line 92, in forward
input = module(input)
File "/home/hkuit155/anaconda3/envs/poseaug/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/hkuit155/Documents/PoseAug/models_baseline/gcn/sem_gcn.py", line 28, in forward
x = self.gconv(x).transpose(1, 2)
File "/home/hkuit155/anaconda3/envs/poseaug/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/hkuit155/Documents/PoseAug/models_baseline/gcn/sem_graph_conv.py", line 43, in forward
output = torch.matmul(adj * M, h0) + torch.matmul(adj * (1 - M), h1)
RuntimeError: invalid argument 6: wrong matrix size at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:492

A same error also occurs when training ST-GCN

Traceback (most recent call last):
File "run_baseline.py", line 102, in
main(args)
File "run_baseline.py", line 65, in main
glob_step, args.lr_decay, args.lr_gamma, max_norm=args.max_norm)
File "/home/hkuit155/Documents/PoseAug/function_baseline/model_pos_train.py", line 41, in train
outputs_3d = model_pos(inputs_2d)
File "/home/hkuit155/anaconda3/envs/poseaug/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/hkuit155/Documents/PoseAug/models_baseline/models_st_gcn/st_gcn_single_frame_test.py", line 461, in forward
x = torch.matmul(x, C) # nx2x17
RuntimeError: invalid argument 6: wrong matrix size at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:492

Code for testing

This project seems amazing.
Do you have an idea when the code might be avilable for testing?

thanks a lot!!

code for evaluation

great work!

can you share the preprocess code for 3DPW?

thank you very much

Train on real/fake pose det2d

Interesting work!

Just want to brought up a minor issue from my experience of running your code. According to

PoseAug/run_poseaug.py

Lines 96 to 103 in 4e37081

if summary.epoch > args.warmup:
train_posenet(model_pos, data_dict['train_fake2d3d_loader'], posenet_optimizer, criterion, device)
h36m_p1, h36m_p2, dhp_p1, dhp_p2 = evaluate_posenet(args, data_dict, model_pos, model_pos_eval, device,
summary, writer, tag='_fake')
train_posenet(model_pos, data_dict['train_det2d3d_loader'], posenet_optimizer, criterion, device)
h36m_p1, h36m_p2, dhp_p1, dhp_p2 = evaluate_posenet(args, data_dict, model_pos, model_pos_eval, device,
summary, writer, tag='_real')

I believed that the first train_posenet() is training on augmented poses but the output context shown as below still stated that it is "Train on real pose det2d" when I ran the training command:

Epoch: 2 | LR: 0.00098039
Update training loader |################################| (1524/1524) Data: 0.005748s | Batch: 0.008s | Total: 0:00:12 | ETA: 0:00:01 
==> Random Bone Length (S15678) swap completed
Generating 1559752 poses...
Generating 1559752 poses...
Generating 1559752 poses...
Train pose gan |################################| (1524/1524) Data: 0.002251s | Batch: 0.130s | Total: 0:03:18 | ETA: 0:00:01 

prepare buffer loader for train on fake pose
Generating 1542871 poses...
Train on real pose det2d |################################| (1507/1507) Data: 0.000390s | Batch: 0.035s | Total: 0:00:52 | ETA: 0:00:01 | Loss:  0.0027
Eval posenet on H36M_test |################################| (531/531) Data: 0.000613s | Batch: 0.021s | Total: 0:00:11 | ETA: 0:00:01 | MPJPE:  53.4793 | P-MPJPE:  43.3825
Eval posenet on mpi3d_loader |################################| (3/3) Data: 0.047304s | Batch: 0.078s | Total: 0:00:00 | ETA: 0:00:01 | MPJPE:  97.4408 | P-MPJPE:  69.7454
Train on real pose det2d |################################| (1524/1524) Data: 0.000378s | Batch: 0.035s | Total: 0:00:53 | ETA: 0:00:01 | Loss:  0.0003
Eval posenet on H36M_test |################################| (531/531) Data: 0.000573s | Batch: 0.021s | Total: 0:00:11 | ETA: 0:00:01 | MPJPE:  47.0385 | P-MPJPE:  38.1398
Eval posenet on mpi3d_loader |################################| (3/3) Data: 0.042761s | Batch: 0.074s | Total: 0:00:00 | ETA: 0:00:01 | MPJPE:  97.3730 | P-MPJPE:  75.2973

About raising pose from 2d to 3d

Hi. I am running your code aiming at lifting the 2d pose to 3d. However, in the pre-processing step, I found that camera parameters are in need.
Can I just use the models to lift the 2d pose to the 3d pose without camera calibration? For example, I obtained an image with humans whose camera parameters are unknown, and using pose lifting model after obtaining the 2d pose.

Can't run run_evaluate.py: 'Dataset' object has no attribute 'value'

The next part worked as expected. I know the path to the checkpoint is wrong

(base) C:\Users\srskr\Desktop\PoseAug>python run_evaluate.py --posenet_name 'videopoDse' --keypoints gt --evaluate '/path/to/checkpoint'
==> Using settings Namespace(action_wise=True, actions='*', batch_size=1024, checkpoint='checkpoint/debug', dataset='h36m', downsample=1, dropout=0.25, epochs=50, evaluate="'/path/to/checkpoint'", keypoints='gt', lr=0.001, lr_decay=100000, lr_gamma=0.96, max_norm=True, note='debug', num_workers=2, posenet_name="'videopoDse'", pretrain=False, random_seed=0, s1only=False, snapshot=25, stages=4)
==> Loading dataset...
Traceback (most recent call last):
  File "run_evaluate.py", line 61, in <module>
    main(args)
  File "run_evaluate.py", line 24, in main
    data_dict = data_preparation(args)
  File "C:\Users\srskr\Desktop\PoseAug\function_baseline\data_preparation.py", line 23, in data_preparation
    dataset = Human36mDataset(dataset_path)
  File "C:\Users\srskr\Desktop\PoseAug\common\h36m_dataset.py", line 259, in __init__
    data = np.load(path, allow_pickle=True)['positions_3d'].item()
  File "C:\Users\srskr\anaconda3\lib\site-packages\numpy\lib\npyio.py", line 428, in load
    fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'data\\data_3d_h36m.npz'

I used instructions https://github.com/jfzhang95/PoseAug/blob/main/DATASETS.md "Setup from preprocessed dataset" and got h36m.zip file. Then

(base) C:\Users\srskr\Desktop\PoseAug>cd data

(base) C:\Users\srskr\Desktop\PoseAug\data>python prepare_data_h36m.py --from-archive h36m.zip
Extracting Human3.6M dataset from h36m.zip
Converting...
<class 'h5py._hl.dataset.Dataset'>
Traceback (most recent call last):
  File "prepare_data_h36m.py", line 67, in <module>
    positions = hf['3D_positions'].value.reshape(32, 3, -1).transpose(2, 0, 1)
AttributeError: 'Dataset' object has no attribute 'value'

Looks like hf['3D_positions'] should be a numpy or pytorch thing but it's not

3DPW cross-dataset comparison

From #9, I was wondering if you can provide the 3dpw file or perhaps the preprocessing code?

I followed the SPIN and your 3dhp preprocessing script but the resulted in some PA-MPJPE around 120 using your models on the test npz I put together myself (16 joints). Thanks!

Is PoseAug able to produce some special poses while doing the augmentation?

Hi, thanks so much for your great job. I learn a lot from this project.

I learned that your code indicates "that fix bone segment from pelvis to thorax to avoid pure rotation of whole body without ba changes."

So at the mean time, according to this condition that fix the bone segment from pelvis to thorax, I am curious about the PoseAug whether can produce some special types of poses like "lying down" , "push ups" and so on.

I'm looking forward to your replies.

Question about motion temporal continuity

Thanks for your excellent work!
I wonder if such random augmentation would lead to discontinuity in the motion of successive frames (e.g. VideoPose3D). Since the data enhancement of each frame is based on Gaussian distribution, if the hand is augmented as raised at the t-th frame while it turns to lower at the t+1-th frame. The motion would be deformed and the algorithm relying on time continuity could fail. Isn't it? (I've noticed that PoseAug also has a great improvement over VideoPose3D, just wonder why?)

Questions about 3D poses View Perspective Generation

Hi, thanks for the great job.
In this project, I want to figure out that whether the perspective of 3D poses view generated by PoseAug is fixed. For example, in the 3D plot, does the skeleton always faces to x axis or z axis?
If not, could you point out how to control or fix the perspective of 3D poses view generated?
I would really appreciate it.
I'm looking forward to your replies.
Best Regards.

Can you offer the train.log

In a function called project_to_2d, I can't understand the code :
tan = torch.sum(p * XX, dim=len(XX.shape) - 1, keepdim=True).

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.