PyTorch implementation of CloudWalk's recent work DenseBody

Overview

densebody_pytorch

PyTorch implementation of CloudWalk's recent paper DenseBody.

Note: For most recent updates, please check out the dev branch.

Update on 20190613 A toy dataset has been released to facilitate the reproduction of this project. checkout PREPS.md for details.

Update on 20190826 A pre-trained model (Encoder/Decoder) has been released to facilitate the reproduction of this project.

paper teaser

Reproduction results

Here is the reproduction result (left: input image; middle: ground truth UV position map; right: estimated UV position map)

Update Notes

  • SMPL official UV map is now supported! Please checkout PREPS.md for details.
  • Code reformating complete! Please refer to data_utils/UV_map_generator.py for more details.
  • Thanks Raj Advani for providing new hand crafted UV maps!

Training Guidelines

Please follow the instructions PREPS.md to prepare your training dataset and UV maps. Then run train.sh or nohup_train.sh to begin training.

Customizations

To train with your own UV map, checkout UV_MAPS.md for detailed instructions.

To explore different network architectures, checkout NETWORKS.md for detailed instructions.

TODO List

  • Creating ground truth UV position maps for Human36m dataset.

    • 20190329 Finish UV data processing.
    • 20190331 Align SMPL mesh with input image.
    • 20190404 Data washing: Image resize to 256*256 and 2D annotation compensation.
    • 20190411 Generate and save UV position map.
      • radvani Hand parsed new 3D UV data
      • Validity checked with minor artifacts (see results below)
      • Making UV_map generation module a separate class.
    • 20190413 Prepare ground truth UV maps for washed dataset.
    • 20190417 SMPL official UV map supported!
    • 20190613 A testing toy dataset has been released!
  • Prepare baseline model training

    • 20190414 Network design, configs, trainer and dataloader
    • 20190414 Baseline complete with first-hand results. Something issue still needs to be addressed.
    • 20190420 Testing with different UV maps.

Authors

Lingbo Yang(Lotayou): The owner and maintainer of this repo.

Raj Advani(radvani): Provide several hand-crafted UV maps and many constructive feedbacks.

Citation

Please consider citing the following paper if you find this project useful.

DenseBody: Directly Regressing Dense 3D Human Pose and Shape From a Single Color Image

Acknowledgements

The network training part is inspired by BicycleGAN

Comments
  •  Can I use other datasets?

    Can I use other datasets?

    Thank you for your hard work. Great job! I want to try your method, but I haven't got the human 3.6m dataset yet. Can I try with other datasets like the SURREAL dataset or DenseposeCoCo?

    enhancement 
    opened by pacifinapacific 10
  • why did the shape is not the same

    why did the shape is not the same

    After I trained it several epoch ,The problem shows that : Traceback (most recent call last): File "nohup_train.py", line 120, in visualizer.save_results(model.get_current_visuals(), epoch, i) File "/data/home/data_utils/visualizer.py", line 48, in save_results resampled_verts = self.UV_sampler.resample(self.tensor2numpy(fake_UV)) File "/data/home/data_utils/uv_map_generator.py", line 409, in resample vt_3d = np.stack(vt_3d) File "/opt/conda/lib/python3.6/site-packages/numpy/core/shape_base.py", line 416, in stack raise ValueError('all input arrays must have the same shape') ValueError: all input arrays must have the same shape can you help me analyze the problem?

    opened by LeifSun 9
  • Issues with UV Map Generation and Subsequent SMPL Object Generation

    Issues with UV Map Generation and Subsequent SMPL Object Generation

    Hi,

    I am trying out this repo, and am trying to generate a 3D SMPL model out of a 2D image using the "in-the-wild" mode.

    I used the sample image found in the teaser folder, and the UV Maps & SMPL Model generated appears cranky.

    densebody_resnet200_00000

    image

    Not sure if I am doing something wrong... Using the below parameters:

    • Using the encoder & decoder weights
    • Using model_lsp.pkl generated via instructions here
    • Using radvani.pickle generated from template.obj via UV_Map_Generator class, and the resulting barycentric_h0256_w0256_radvani.pickle
    • Saw this issue and tried using [-1, 1] (by default via densebody_dataset.py) & [0, 255] UV Maps output, but both gave similar results above
    opened by yongyct 4
  • The shape of output .obj and .pkl is wrong

    The shape of output .obj and .pkl is wrong

    Hi Lotayou, Thank you for your work and detailed instructions. I followed your steps to prepare Datasets and UV. image

    However I got wrong results on the model I trained by myself and I also tested on your pre-trained model. image

    Maybe My SMPL model isn't right? And I have no ideal which step I failed. Any help would be deeply appreciated! ^_^

    opened by UnrealPawn 4
  • what data do I need to download in Human3.6M?

    what data do I need to download in Human3.6M?

    @Lotayou Thanks for your awesome work, I want train the human3.6M dataset, but I don't know what data do I need to download. Does the code need videos, pose, segments ? or I need download them all. Hope you can help me, thanks in advace.

    image

    opened by lxy5513 3
  • How is the annotation_large.h5 generated from human 3.6M in data_washing.py?

    How is the annotation_large.h5 generated from human 3.6M in data_washing.py?

    when I ran data_washing.py, it reported missing annotation_large.h5. How is this file generated? I use https://github.com/anibali/h36m-fetch to preprocess human3.6m it only generated anno.h5 file for each subject.

    opened by fliman 2
  • could not train a well-performed model...

    could not train a well-performed model...

    I have used the original code and the provided toy dataset and trained with enough time, but the predicted UV map I get seems wrong... Does anyone encounter this problem? How to solve it? Thanks!

    This is the UV map generated during the training process...(I have trained like, about 200 epochs...) 202_01999

    opened by gaizixuan0128 2
  • no model.pkl

    no model.pkl

    Hello, I can not find the model.pkl when I run the smpl_torch_batch.py. Could you tell me how to find it ? Besides, there is an 'indexerror: index 6890 is out of bounds for axis 0 with size 6890' when I run the triangulation.py, I do not know if the error is caused by the model.pkl, maybe there are some other mistakes? I put the 'for (i,line) in enumerate(lines):' modify to 'for (i,line) in enumerate(lines[0:6890]):', the indexerror is lost.But there is another 'indexerror:index 13790 is out of bounds for axis 0 with size 13776.

    opened by LH-Abner 2
  • Any solutions for extracting texture from the image and fitting to this model.

    Any solutions for extracting texture from the image and fitting to this model.

    Hi, Thanks for sharing this amazing work. This will strongly support my research. I need to develop a 3d model with the scanned image. This project has the first part of developing the skeleton. How can I add texture of the same image to this?

    opened by AIdeveloper-oz 1
  • Can I combine multiple images into one UV map for modeling?

    Can I combine multiple images into one UV map for modeling?

    not an issue but a question, let's say if I have 4 cameras around the same person and can I put 4 images into the singe UV map and generate this person's better 3D model?

    opened by wine3603 1
  • The scale of  x,y,z  in UV map is  different

    The scale of x,y,z in UV map is different

    _min = np.amin(verts, axis=0, keepdims=True) _max = np.amax(verts, axis=0, keepdims=True) verts = (verts - _min) / (_max - _min)`` image

    I think here is wrong, the scale of x,y,z is different

    opened by 2294462474 1
  • h36 toy to H36M original

    h36 toy to H36M original

    Hi Lotayou, thanks for your project and nice instructions. I just want to ask that do you have the code to process the H36M downloaded from the original website. It seems that the code is made just for the toy dataset. Thanks

    opened by phuvm72 0
  • Invalid Link to Pretrained models

    Invalid Link to Pretrained models

    Hi @Lotayou, thanks for your great effort! But I found the link to pretrained encoder and decoder cannot be reached. Would you mind reupload them again? Thanks!

    opened by gsygsy96 0
  • shape mismatch: value array of shape (7521,3) could not be broadcast to indexing result of shape (7576,3)

    shape mismatch: value array of shape (7521,3) could not be broadcast to indexing result of shape (7576,3)

    I am not sure if the smpl_fbx_template.obj file I generated is correct. image image image After I run uv_map_generator.py, I get an error. ValueError: shape mismatch: value array of shape (7521,3) could not be broadcast to indexing result of shape (7576,3)

    opened by electronicliujiang 2
  • sth strange when trainning

    sth strange when trainning

    hi, I modify the train.sh as :

    python train.py --name resnet_radvani_32000_20190415 --model resnet --netD conv-up --batch_size 4 --max_dataset_size 32000 --niter 20 --niter_decay 50 --save_result_freq 250 --save_epoch_freq 2 --ndown 6 --data_root /home/liwensh/data
    

    and run about 16 hours(44 epoch), and at the end of log.txt shows:

    epoch 43 iter 6499:  l1: 11.288669 tv: 1.522304 total: 11.288669
    epoch 43 iter 6749:  l1: 11.599895 tv: 0.667862 total: 11.599895
    epoch 43 iter 6999:  l1: 11.125267 tv: 1.277602 total: 11.125267
    epoch 43 iter 7249:  l1: 11.893361 tv: 1.366742 total: 11.893361
    epoch 43 iter 7499:  l1: 11.343329 tv: 1.228081 total: 11.343329
    epoch 43 iter 7749:  l1: 11.397069 tv: 1.426213 total: 11.397069
    epoch 43 iter 7999:  l1: 11.519998 tv: 0.664876 total: 11.519998
    epoch 44 iter 249:  l1: 11.183926 tv: 1.258252 total: 11.183926
    epoch 44 iter 499:  l1: 11.555054 tv: 1.201256 total: 11.555054
    epoch 44 iter 749:  l1: 12.041154 tv: 1.312884 total: 12.041154
    epoch 44 iter 999:  l1: 11.605458 tv: 0.706056 total: 11.605458
    epoch 44 iter 1249:  l1: 11.589639 tv: 1.093558 total: 11.589639
    epoch 44 iter 1499:  l1: 11.533211 tv: 1.338729 total: 11.533211
    epoch 44 iter 1749:  l1: 11.822362 tv: 1.297630 total: 11.822362
    epoch 44 iter 1999:  l1: 12.410873 tv: 1.159959 total: 12.410873
    epoch 44 iter 2249:  l1: 11.855060 tv: 1.531642 total: 11.855060
    

    the total have not changed much since the 5th epoch. and the inter output is strange(44 epoch): image I wonder if it it because the batch size is too small, since I have no enough GPU memory. Or maybe other option set I am wrong?

    opened by liwenssss 6
  • some tips(advice) to better performance and UV-map performance

    some tips(advice) to better performance and UV-map performance

    Hello, i have tried your code and make some changes(tips) to perform better. Hope it would help:

    1. L1 loss weight . The L1 loss weight generated is wrong accrodding to your code and your uv-map-template after dilation. UV map shouldnot be dilated
    2. TV loss. I added tv loss with corrected weights. The TV loss weights should smaller than L1 loss two order of magnitudes . The results showed it improved a little.
    3. From UV map to Verts. changed SAMPLE algorithm little.
    4. Increase joints-center verts loss weight.

    However,the MPJPE-PA i calculated is about 62, much lager than the paper listed. The MPJPE-PA between joints from UV-map-generated-form-gt3d and gt3ds is about 22mm, it also much larger than paper listed.

    opened by GuodongQi 3
Owner
Lingbo Yang
Math B.S. at PKU, currently pursuing Ph. D. at IDM VCL Love it when 3D meets 2D!
Lingbo Yang
Implementation of TransGanFormer, an all-attention GAN that combines the finding from the recent GanFormer and TransGan paper

TransGanFormer (wip) Implementation of TransGanFormer, an all-attention GAN that combines the finding from the recent GansFormer and TransGan paper. I

Phil Wang 146 Dec 6, 2022
A concise but complete implementation of CLIP with various experimental improvements from recent papers

x-clip (wip) A concise but complete implementation of CLIP with various experimental improvements from recent papers Install $ pip install x-clip Usag

Phil Wang 515 Dec 26, 2022
A concise but complete implementation of CLIP with various experimental improvements from recent papers

x-clip (wip) A concise but complete implementation of CLIP with various experimental improvements from recent papers Install $ pip install x-clip Usag

Phil Wang 115 Dec 9, 2021
A curated (most recent) list of resources for Learning with Noisy Labels

A curated (most recent) list of resources for Learning with Noisy Labels

Jiaheng Wei 321 Jan 9, 2023
This is the implementation of our work Deep Extreme Cut (DEXTR), for object segmentation from extreme points.

This is the implementation of our work Deep Extreme Cut (DEXTR), for object segmentation from extreme points.

Sergi Caelles 828 Jan 5, 2023
Implementation for the IJCAI2021 work "Beyond the Spectrum: Detecting Deepfakes via Re-synthesis"

Beyond the Spectrum Implementation for the IJCAI2021 work "Beyond the Spectrum: Detecting Deepfakes via Re-synthesis" by Yang He, Ning Yu, Margret Keu

Yang He 27 Jan 7, 2023
PyTorchVideo is a deeplearning library with a focus on video understanding work

PyTorchVideo is a deeplearning library with a focus on video understanding work. PytorchVideo provides resusable, modular and efficient components needed to accelerate the video understanding research. PyTorchVideo is developed using PyTorch and supports different deeplearning video components like video models, video datasets, and video-specific transforms.

Facebook Research 2.7k Jan 7, 2023
Provided is code that demonstrates the training and evaluation of the work presented in the paper: "On the Detection of Digital Face Manipulation" published in CVPR 2020.

FFD Source Code Provided is code that demonstrates the training and evaluation of the work presented in the paper: "On the Detection of Digital Face M

null 88 Nov 22, 2022
Official code of our work, Unified Pre-training for Program Understanding and Generation [NAACL 2021].

PLBART Code pre-release of our work, Unified Pre-training for Program Understanding and Generation accepted at NAACL 2021. Note. A detailed documentat

Wasi Ahmad 138 Dec 30, 2022
This repo contains the official code of our work SAM-SLR which won the CVPR 2021 Challenge on Large Scale Signer Independent Isolated Sign Language Recognition.

Skeleton Aware Multi-modal Sign Language Recognition By Songyao Jiang, Bin Sun, Lichen Wang, Yue Bai, Kunpeng Li and Yun Fu. Smile Lab @ Northeastern

Isen (Songyao Jiang) 128 Dec 8, 2022
Official repo for the work titled "SharinGAN: Combining Synthetic and Real Data for Unsupervised GeometryEstimation"

SharinGAN Official repo for the work titled "SharinGAN: Combining Synthetic and Real Data for Unsupervised GeometryEstimation" The official project we

Koutilya PNVR 23 Oct 19, 2022
Evaluating different engineering tricks that make RL work

Reinforcement Learning Tricks, Index This repository contains the code for the paper "Distilling Reinforcement Learning Tricks for Video Games". Short

Anssi 15 Dec 26, 2022
This is the repo for our work "Towards Persona-Based Empathetic Conversational Models" (EMNLP 2020)

Towards Persona-Based Empathetic Conversational Models (PEC) This is the repo for our work "Towards Persona-Based Empathetic Conversational Models" (E

Zhong Peixiang 35 Nov 17, 2022
The codes for the work "Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation"

Swin-Unet The codes for the work "Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation"(https://arxiv.org/abs/2105.05537). A validatio

null 869 Jan 7, 2023
The personal repository of the work: *DanceNet3D: Music Based Dance Generation with Parametric Motion Transformer*.

DanceNet3D The personal repository of the work: DanceNet3D: Music Based Dance Generation with Parametric Motion Transformer. Dataset and Results Pleas

南嘉Nanga 36 Dec 21, 2022
ST++: Make Self-training Work Better for Semi-supervised Semantic Segmentation

ST++ This is the official PyTorch implementation of our paper: ST++: Make Self-training Work Better for Semi-supervised Semantic Segmentation. Lihe Ya

Lihe Yang 147 Jan 3, 2023
Official code of our work, AVATAR: A Parallel Corpus for Java-Python Program Translation.

AVATAR Official code of our work, AVATAR: A Parallel Corpus for Java-Python Program Translation. AVATAR stands for jAVA-pyThon progrAm tRanslation. AV

Wasi Ahmad 26 Dec 3, 2022
Hand tracking demo for DIY Smart Glasses with a remote computer doing the work

CameraStream This is a demonstration that streams the image from smartglasses to a pc, does the hand recognition on the remote pc and streams the proc

Teemu Laurila 20 Oct 13, 2022
Official Repo of my work for SREC Nandyal Machine Learning Bootcamp

About the Bootcamp A 3-day Machine Learning Bootcamp organised by Department of Electronics and Communication Engineering, Santhiram Engineering Colle

MS 1 Nov 29, 2021