weigq / 3d_pose_baseline_pytorch Goto Github PK
View Code? Open in Web Editor NEWA simple baseline for 3d human pose estimation in PyTorch.
License: MIT License
A simple baseline for 3d human pose estimation in PyTorch.
License: MIT License
Could you please share the data/stat_3d.pth.tar ?
[jalal@goku 3d_pose_baseline_pytorch]$ python main.py --exp example
==================Options=================
{ 'action': 'All',
'ckpt': 'checkpoint/example',
'data_dir': 'data/',
'dropout': 0.5,
'epochs': 200,
'exp': 'example',
'is_train': True,
'job': 8,
'linear_size': 1024,
'load': '',
'lr': 0.001,
'lr_decay': 100000,
'lr_gamma': 0.96,
'max_norm': True,
'num_stage': 2,
'procrustes': False,
'resume': False,
'test': False,
'test_batch': 64,
'train_batch': 64,
'use_hg': False}
==========================================
>>> creating model
/scratch3/3d_pose/humanpose/3d_pose_baseline_pytorch/src/model.py:11: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
nn.init.kaiming_normal(m.weight)
>>> total params: 4.29M
/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='elementwise_mean' instead.
warnings.warn(warning.format(ret))
>>> actions to use (total: 15):
[ 'Directions',
'Discussion',
'Eating',
'Greeting',
'Phoning',
'Photo',
'Posing',
'Purchases',
'Sitting',
'SittingDown',
'Smoking',
'Waiting',
'WalkDog',
'Walking',
'WalkTogether']
>>>
>>> loading data
Traceback (most recent call last):
File "main.py", line 276, in <module>
main(option)
File "main.py", line 75, in main
stat_3d = torch.load(os.path.join(opt.data_dir, 'stat_3d.pth.tar'))
File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 356, in load
f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'data/stat_3d.pth.tar'
Hi,
I notice that the 2d pose ground truth in *_2d.pth.tar
lies in original image space(1002x1000) after unnormalizing, which is not as expected as cropped image space in 256x256.
Is this the same as the original version?
BTW, I regenerated the hm36 data with cropped 2d pose, and just achieved error of 48mm. I wonder if this difference lead to the performance gap.
THX!
Hi, since the dataset provided here is normalized version, could anyone give me idea how to unnormalize 2D Skeleton? I already see this function and successfully unnormalize the 3D Skeleton, but how we use this code to unnormalize 2D Skeleton? I will really glad if someone could help. Also is there a function to do normalize? Thank you.
def unNormalizeData(normalized_data, data_mean, data_std, dimensions_to_use):
I have checked the code in https://github.com/una-dinosauria/3d-pose-baseline that Martinez used 17 joints. Why the input in your model is only 16 joints?
If you get this problem, its because the author is using git submodules.
You can pip install progress
or git submodule init && git submodule update
hi,
the link to download the pre-processed data human36m.zip does not exist, could you please upload it again?
I couldnt find the skip connection as reported in the original author's publication.
can anyone help in this regard?
Hi there,
Your code looks great. I was just wondering what is the main difference between your pre-processed dataset and h36m.zip
from the original tensorflow repo.
Thanks
dear @weigq,
What is that?
main.py [-h] [--data_dir DATA_DIR] [--exp EXP] [--ckpt CKPT]
[--load LOAD] [--test] [--resume]
[--action {all,All}]
[--max_norm] [--linear_size LINEAR_SIZE]
[--num_stage NUM_STAGE] [--use_hg] [--lr LR]
[--lr_decay LR_DECAY] [--lr_gamma LR_GAMMA] [--epochs EPOCHS]
[--dropout DROPOUT] [--train_batch TRAIN_BATCH]
[--test_batch TEST_BATCH] [--job JOB] [--no_max] [--max]
[--procrustes]
Thanks for the great repo! Your code is very elegant. Just a quick question. I am trying to plot the given 2d and 3d processed skeletons. However, I could not find the connection between joints in your repo. I am wondering if you could either provide the limb connections or the code for visualizing?
Thanks a lot!
Hi, I am totally new in this field, if this is a stupid question plz forgive me. I was wondering how to visualize the results. Do we need to add some codes on main.py like 'cv2.imshow'? And why the shape of inputs (64, 32) is not the same as the shapes of both targets' and outputs' (64, 48). Thank you in advance.
Hello,
The SH detections do not seem to be available anymore. Also in the main repo (https://github.com/una-dinosauria/3d-pose-baseline) there is no code available for hourglass detections. Does anyone happen to have the detection files, i.e. 'train_2d_ft.pth.tar' and 'test_2d_ft.pth.tar'? Or the code for the stacked hourglass model that was used to produce the results?
At the moment I am only able to run my experiments with the GT. It would be great if someone could help me with the SH detections :)
Cheers,
Duncan
how do you do the data preprocessing, can you explain the process?
@weigq Hello! I've run train_2d_ft.pth.tar and test_2d_ft.pth.tar on other models, whose performance is very poor. So I want to know if the train_2d_ft.pth.tar contains the same kind of joints and the same order of joints as it did on train_2d.pth.tar and train_3d.pth.tar ? Thanks!
Hi there,
Thanks again for sharing your code, its very clear.
I have a quick question about the error computation. You select the valid dimensions here which includes dimensions for the hip (which is not predicted) for. As I understand it, in the squared error computation three of the dimensions will always have a very low error e.g. they are predicted zero and the gt is zeros.
Is this the same way as the original TensorFlow code?
Thanks
Hi,
Thanks for your codes. I wonder why the results of "original version" are different from the paper and the pytorch version is a little better than the paper?
Thanks a lot!
Data is missing. Cannot reproduce the results.
thx for your implement!
I want to know how the 2D ground truth is been convert from Pixel coordinate system.
@weigq
Hello! Can you please update Google Drive links?
Hi! When I try to run test I get error:
FileNotFoundError: [Errno 2] No such file or directory: 'data/stat_3d.pth.tar'
Hi @weigq,
Thanks for the great implementation. I'm trying to train on SHG detections but the .zip file doesn't contain the test_2d_ft.pth.tar
file.
Could you provide detection files or processing script for that?
Running on Windows 10
Python Python 3.6.7
When trying to run the test with the given model from google drive and the dataset, I get the following error:
TEST on Directions
�[?25lTraceback (most recent call last):
File "main.py", line 283, in
main(option)
File "main.py", line 94, in main
_, err_test = test(test_loader, model, criterion, stat_3d, procrustes=opt.procrustes)
File "main.py", line 228, in test
losses.update(loss.data[0], inputs.size(0))
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
Hi,
Wanted to point out a bug in your error calculation. The errors for all actions are simply averaged, without regard to the number of data points in each action. It should be a weighted mean. This yields slightly higher numbers.
When the required action is sittingdown, the current file will read both the sitting and sittingdown. This will affect the accuracy of the sequence of sittingdown
So I suggest to add some lines to discriminate these two kinds of actions after the line 61 in the human36m.py.
if self.actions=='SittingDown' and act.endwith('g'):
continue
Hi,
I can't find the h36m.zip in the drive link. Could you please upload it again and share the new link?
Thanks
Hello,
Hope you are doing good.
Very nice work.
I am trying to train the model on my custom dataset. I am getting the below error:
(3dpose_pytorch) yukti@dst-toaster:~/3d_pose_baseline_pytorch$ python main.py
File "main.py", line 171
targets = Variable(tars.cuda(async=True))
^
SyntaxError: invalid syntax
I also even tried on tensorflow original code
I am getting this "nan" after training.
Saving the model... done in 254.45 ms
Hi!
I'm confused when visualizing the poses.
For example, I get a numpy.ndarray from test_2d.pth.tar
, which has the shape (32,)
and represent a 2d pose.
I guess it arrays as x1,y1,x2,y2, ...
, so I add 0,0
at the front of pose, and try to connect them following the sequence of the original version , but it dosen't look like a human. The same result on another arrayx1,x2,...,y1,y2, ...
, and 3d pose as well.
I want to know whether I misunderstanding some thing in the process above.
And what's the shape of normalized bbox from original picture? How to change the coordinates from pixel to the form we see now in the files?
Thanks!!!
I really need this pre-training model. Who has it? Thank you very much
Hi,
In the original tensorflow repo , while creating the 3d GT data , they centre the poses wrt hip joint and while calculating the error undo that. But in your code , you just unnormalize it but dont take into account the hip position.
Is that the correct way?
getting this error while loading data. Am i missing something?
hello, I visualize the 3d skeleton and it looks like a human. But why the results of different datasets looks very similar ?
The dataset referred to in the code as h63m.zip seems to be missing. Can anyone provide the link to the preprocessed datase?
how to get the data train_2d_ft.pth.tar, test_2d_ft.pth.tar, train_2d.pth.tar,test_2d.pth.tar and train_3d.pth.tar ? Thank you so much If you can help me !
I follow with
3d_pose_baseline_pytorch/main.py
Line 226 in a03094b
I want to know how to visualize the output from the (51, ) array, and the index of these 51 nums.
like topic saying
After putting the file into /data, what other operations are required?I didn't do anything, and then the above error occurred
I have download the pretrianed model gt_ckpt_best.pth.tar. But when I run the command python main.py --load gt_ckpt_best.pth.tar --test, the error 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128) has occurred.
Hi, I wanna to know where is the stat_3d.pth.tar? Thanks!
Hallo,
I have been using this repo for estimating 3d skeleton. Below is my question that i would appreciate if you can answer.
Because i have been training this model on my custom dataset but my validation loss which is 0.45 is not decreasing even after the so much hyperparametertuning.
2. Also can you please tell me what is coorelation between 2d and 3d skeleton. What exactly is done with 3d skeleton.
3. Can you give your suggestion on what can i do to decrease my validation loss(0.45) and training loss(0.112)
Please give your valuable suggestion.
Many thanks for making this PyTorch implementation available. The pre-processed Human3.6M dataset and the pre-trained model on Google Drive look not available anymore, can you please re-upload them? Thanks a lot!
Could you please upload the human36m dataset again?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.