Giter Club home page Giter Club logo

3d_pose_baseline_pytorch's Introduction

3d_pose_baseline_pytorch's People

Contributors

pieterwolfert avatar weigq 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

3d_pose_baseline_pytorch's Issues

data is missing in the git repo

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'

coordinate space of GT 2d pose

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!

Unnormalize and Normalize 2D Skeleton

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):

human36m.zip does not exist

hi,

the link to download the pre-processed data human36m.zip does not exist, could you please upload it again?

Pre-processed data

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

How?

dear @weigq,
What is that?

optional arguments, you can access more details in opt.py

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]

About visualization

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!

How to visualize outputs into images?

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.

Hourglass detection files

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

Joints Order

@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!

Error computation

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

About the result of the model

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!

stat_3d.pth.tar missing

Hi! When I try to run test I get error:
FileNotFoundError: [Errno 2] No such file or directory: 'data/stat_3d.pth.tar'

Stacked Hourglass Detections

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?

Issue when running the test

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

Bug in Error Calculation

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.

A bug in reading the test data

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

Data Missing

Hi,
I can't find the h36m.zip in the drive link. Could you please upload it again and share the new link?
Thanks

Training error

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.

48 49 50 51 52 53 54 55 56]
[ 0 1 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 39 40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55 56]
nan
Average nan

Saving the model... done in 254.45 ms

Questions on visualizing and data pre-processing.

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!!!

Error calculation

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?

why 3d pose is similar

hello, I visualize the 3d skeleton and it looks like a human. But why the results of different datasets looks very similar ?

The dataset h36m.zip is missing

The dataset referred to in the code as h63m.zip seems to be missing. Can anyone provide the link to the preprocessed datase?

number of testing poses

Hi,
Thanks for your codes. After I running the test code I got the below result, but the number of testing poses seems to be less than the expected(548819). Did I miss any others data when testing?

image

Thanks for your help!

Problem on Visualizing

I follow with

targets_unnorm = data_process.unNormalizeData(tars.data.cpu().numpy(), stat_3d['mean'], stat_3d['std'], stat_3d['dim_use'])
to unnorm the output of network, and get tensor which has (51, ) shape. I guess it should be the coordinates like x0,y0,z0,x1,y1,z1.......x16,y16,z16
but when I draw all 17 point in 3d plot, it don't like a human skeleton shape,

I want to know how to visualize the output from the (51, ) array, and the index of these 51 nums.

EOFError: Ran out of input

After putting the file into /data, what other operations are required?I didn't do anything, and then the above error occurred

Hip Centering in data preprocessing

Hallo,

I have been using this repo for estimating 3d skeleton. Below is my question that i would appreciate if you can answer.

  1. In the code this is this line which is doing hip centering.
    poses = poses - np.tile( poses[:,:3], [1, len(H36M_NAMES)] )
    poses_set[k] = poses
    Is this necessary to do hip centering on 3d skeleton for estimating 3d pose? Is the hip centering only on 3d skeleton not on 2d ?
    Because i tried without hip centering it seems validation is increased to 5.2

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.

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.