Code Monkey home page Code Monkey logo

pytorch_hmr's Introduction

HMR

This is a pytorch implementation of End-to-end Recovery of Human Shape and Pose by Angjoo Kanazawa, Michael J. Black, David W. Jacobs, and Jitendra Malik, accompanying by some famous human pose estimation networks and datasets. HMR is an end-to end framework for reconstructing a full 3D mesh of a human body from a single RGB image. In contrast to most current methods that compute 2D or 3D joint locations, HMR produce a richer and more useful mesh representation that is parameterized by shape and 3D joint angles. The main objective is to minimize the reprojection loss of keypoints, which allow model to be trained using in-the-wild images that only have ground truth 2D annotations. For visual impact, please visit the author's original video.

training step (the following links are not available now due to license limitation)

1. download the following datasets.

2. download human3.6 datasets.

3. unzip the downloaded datasets.

4. unzip the model.zip

5. config the environment by modify the src/config.py and do_train.sh

6. run ./do_train.sh directly

environment configurations.

  • install pytorch0.4
  • install torchvision
  • install numpy
  • install scipy
  • install h5py
  • install opencv-python

result

reference papers

reference resources

pytorch_hmr's People

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

pytorch_hmr's Issues

process scripts of datasets

Hi,

would you like to offer the process scripts of datasets?

downloading the datasets from Baidu Netdisk is much too slow

Could you share your test code?

Thanks for your reproduce! I also try to reproduce another work --- estimate human shape from only one color figure. Some part is similar to HMR. If you can share your test code, that will be a great apreciate!

Inference

Is there a way to apply 3D Mesh Inference on given image?

License file

Great work!
Can you please update the license file like MIT or BSD.

Thanks.

model.zip

I notice that the share of model.zip has been canceled. Can you re-upload the file? Thx!

Lacks model.zip

You mentioned that in order to train the model, model.zip should be unzipped. However, I cannot find model.zip in your repo. Could you please upload it as soon as possible? Thanks.

processing of the outputs

Hi, it's me again.

So far I can train the model using your scripts, but still have some problem processing the outputs.

I wrote a script almost the same as the original demo.py, replacing the tensorflow inference code with forward functions in model.py, and processed the 2d kps (output range is (-1,1)) to be drawed.

But I can't get the right output rendering image.

In fact, even when I run with the same weights file twice, I can't get the same outputs.

I'm new to pytorch, maybe I have encountered some Novice problem。

Ps: I use the copy_state_dict funtion to load weights file.

Which Python version?

Which Python version did you use?

I'm getting an error for trainer.py line 302

  for iter_index in range(config.args.iter_count):
            try:
                data_2d = loader_2d.next() # <-

next is a built-in function from python 3 and should be called next(loader_2d)

And with Python 2.7 I get an error for copying a list in COCO2017_dataloader.py at line 117

self.boxs.append(box.copy())

This feature is only from Python 3.5

Training discriminator

I have been able to get everything working except the discriminator.

How do you train the discriminator? As far as I can tell, the code only loads the trained model.

Access to files and pretrained models

Hi @MandyMo,

Could you please upload all the files in google drive / dropbox?

In order to create a Baidu account - to download the files, a chinese mobile number is needed which I don't have.

Any one have h3.6m annot.h5?

the shared data has been can cancelled. I have already down load the videos of h3.6m, but I don't have the annot.h5 file. Anyone here can share this file to me? thanks a lot.

Pretrained Weights

Hi Xiong,

Thanks for sharing this PyTorch port!
I was wondering, can you share the pretrained PyTorch weights with me?

Can you share the Human3.6m dataset?

I try to train the model ,but I can't get the h3.6m dataset. I try to only use other datasets,but the result is weird. I tried to contact the admin of h3.6m , but I was refused . Can you share the dataset with me via BaiduNetdisk or email [email protected]? By the way ,I am a grade student of UESTC. Thank you so much !!!!!!!!

Cannot download files

Hi,

I cannot seem to download the baidu files. I even tried the chrome extension. Is there a workaround?

About training details and performance

Hello @MandyMo ,
Thank you for releasing the code, it is a really great work.
I trained with this code and got reasonable results on 3d datasets, but terrible results on 2d datasets. The losses all seem stable. Then I tried to change hyperparameters, but the results on 2d datasets were far from good. I don't know whether it's normal or not. Really confused.
How is the performance of your pre-trained model?
What's your performance on training set and testing set of 2d datasets?
Can you share the hyperparameter setting or give some instructions?
Thanks a lot! Following are my training details and results.

This is the default parameters setting from this code, just changed the batch_size_(2d, 3d, adv) to fulfill my GPUs. I trained 7M samples for each dataset, you can regard it as about 1M iterations with batch size of 7.
Losses:

2019-06-29_102414
Training results from 3d datasets, they seem reasonable.
epoch781_000_3d_img_rend_cv2
Training results from 2d datasets, they seem terrible, but the loss for 2d points keeps stable.
epoch781_000_2d_img_rend_cv2

Then I amplified the ratio of 2d loss for 10 times, trying to lower 2d loss. But the result didn't goes the way I wanted. The 2d loss went a little bit lower if it divides 10 comparing the former one, it still much higher than 3d keypoint loss. And the results on 2d datasets were not satisfying.
The losses:

2019-06-29_104618

 Training results from 3d datasets:

epoch561_000_3d_img_rend_cv2
Training results from 2d datasets:
epoch561_000_2d_img_rend_cv2

About the h36m dataset

The BaiduNetdisk link of h36m dataset is not work yet. Can you provide the dataset again? Thank you very much!

mosh_annot.h5

I can't download the file, mosh_annot.h5. Could you please tell me how to get this file? Or share it with me?

Can't download human36m dataset

I can't download human36m dataset by the link you provided, and the official website is too damn slow. So can you provide the link again?

Missing smpl's parameter

HI,
I want to run a demo.py to test trained model. However, the result turns out like this,
"finished create the encoder modules...
parameter smpl.v_template not found
parameter smpl.shapedirs not found
parameter smpl.J_regressor not found
parameter smpl.posedirs not found
parameter smpl.joint_regressor not found
parameter smpl.weight not found
parameter smpl.e3 not found"
Did I miss any code as I only use"smpl = model.smpl" ?

camera parameters for human3.6m

Hi, could you please share some extra data like camera parameters (focal length, principal pt) and translation vector so that I can render the human3.6m 3D model to the corresponding images. Thanks.

训练并不收敛

你好,我用hmr网络训练hand reconstruct任务,freihand数据集,回归cam参数+MANO参数,但是cam参数并不收敛,尤其是scale,基本不下降。
是训练需要哪些trick吗?
还是要预训练,还是分两个网络分别训练吗?

Release of the pre-trained model.

Dear @MandyMo, Thank you for your great work on the HMR pytorch implementation. I wonder if it is possible to release your pretrained model to ease my reproduction of results in the original paper. Thank you very much.

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.