Giter VIP home page Giter VIP logo

ml-neuman's Introduction

NeuMan: Neural Human Radiance Field from a Single Video

This repository is a reference implementation for NeuMan. NeuMan reconstructs both the background scene and an animatable human from a single video using neural radiance fields.

[Paper]

Video demos

Novel view and novel pose synthesis

[Bike] [Citron] [Parking lot] [Jogging] [Lab] [Seattle]

Compositional Synthesis

[Handshake] [Dance]

Environment

To create the environment using Conda:

conda env create -f environment.yml

Alternately, you can create the environment by executing:

conda create -n neuman_env python=3.7 -y;
conda activate neuman_env;
conda install pytorch==1.8.0 torchvision==0.9.0 cudatoolkit=10.2 -c pytorch;
# For RTX 30 series GPU with CUDA version 11.x, please use:
# conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
conda install -c fvcore -c iopath -c conda-forge fvcore iopath;
conda install -c bottler nvidiacub;
conda install pytorch3d -c pytorch3d;
conda install -c conda-forge igl;
pip install opencv-python joblib open3d imageio tensorboardX chumpy lpips scikit-image ipython matplotlib;

Notice that pytorch3d requires a specific version of pytorch, in our case pytorch=1.8.0.

Activate the environment:

conda activate neuman_env

Demo

  • Download SMPL weights:

    • Registration is required to download the UV map(Download UV map in OBJ format) from SMPL.
    • Download neutral SMPL weights(SMPLIFY_CODE_V2.ZIP) from SMPLify, extract basicModel_neutral_lbs_10_207_0_v1.0.0.pkl and rename it to SMPL_NEUTRAL.pkl.
    • Put the all the downloaded files into ./data/smplx folder with following structure:
     .
     └── data
         └── smplx
             ├── smpl
             │   └── SMPL_NEUTRAL.pkl
             └── smpl_uv.obj
  • Download NeuMan dataset and pretrained models:

    Alternately, run the following script to set up data and pretrained models.

    bash setup_data_and_models.sh
  • (Optional) Download AMASS dataset for reposing:

    • AMASS dataset is used for rendering novel poses, specifically render_reposing.py and render_gathering.py.
    • We used SFU mocap(SMPL+H G) subset, please download from AMASS.
    • Put the downloaded mocap data in to ./data/SFU folder.
     .
     └── data
         └── SFU
             ├── 0005
             ├── 0007
             │   ...
             └── 0018
  • Render using pretrained model

    Render 360 views of a canonical human:

    python render_360.py --scene_dir ./data/bike --weights_path ./out/bike_human/checkpoint.pth.tar --mode canonical_360

    Render 360 views of a posed human:

    python render_360.py --scene_dir ./data/bike --weights_path ./out/bike_human/checkpoint.pth.tar --mode posed_360

    Render test views of a sequence, and evaluate the metrics:

    python render_test_views.py --scene_dir ./data/bike --weights_path ./out/bike_human/checkpoint.pth.tar

    Render novel poses with the background:

    python render_reposing.py --scene_dir ./data/bike --weights_path ./out/bike_human/checkpoint.pth.tar --motion_name=jumpandroll

    Render telegathering:

    python render_gathering.py --actors parkinglot seattle citron --scene_dir ./data/seattle --weights_path ./out/seattle_human/checkpoint.pth.tar

Training

  • Download NeuMan dataset

  • Train scene NeRF

python train.py --scene_dir ./data/bike/ --name=bike_background --train_mode=bkg
  • Train human NeRF
python train.py --scene_dir ./data/bike  --name=bike_human --load_background=bike_background --train_mode=smpl_and_offset

Use your own video

Citation

@inproceedings{jiang2022neuman,
  title={NeuMan: Neural Human Radiance Field from a Single Video},
  author={Jiang, Wei and Yi, Kwang Moo and Samei, Golnoosh and Tuzel, Oncel and Ranjan, Anurag},
  booktitle={Proceedings of the European conference on computer vision (ECCV)},
  year={2022}
}

License

The code is released under the LICENSE terms.

ml-neuman's People

Contributors

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

ml-neuman's Issues

pose_offset in smpl

A question. why ignore the pose_offset when calculating the whole shape?

Question about "loss is nan during training" and "bad weights, reinitializing".

Thanks for releasing this excellent work!

I am trying to reproduce the results in the bike scene following the 2-stage training strategy. However, in the 2nd stage, I find that sometimes the total training loss is nan and it reports "loss is nan during training" (I attach the complete report problem below). I wonder is it common to encounter such problem or am I doing something wrong? And why the loss would be nan during training and how to avoid it?
Another question is that I sometimes encounter "bad weights, reinitializing" problem. Could you please give me some hints on where I might be wrong and how to avoid such problem? Thank you very much!

"loss is nan during training {'fine_rgb_loss': nan, 'lpips_loss': 0.0011485698632895947, 'color_range_reg': nan, 'smpl_sym_reg': 6.46794360363856e-05, 'smpl_shape_reg': 0.00019673457427415997, 'mask_loss': 2.684376340766903e-05, 'sparsity_reg': 0.00018622333300299942, 'rgb_loss': nan, 'can_loss': 0.00026141401031054556, 'total_loss': nan}"

Best regards!

Question about "ModuleNotFoundError: No module named 'igl'"

Thanks for releasing this excellent work!
I am trying to reproduce the results. However I meet the problem as follows.
When I run:
python render_360.py --scene_dir ./data/bike --weights_path ./out/bike_human/checkpoint.pth.tar --mode canonical_360
It shows:
Traceback (most recent call last):
File "render_360.py", line 20, in
from cameras.captures import ResizedPinholeCapture
File "/home/liudong/ml-neuman/cameras/captures.py", line 15, in
from utils import ray_utils
File "/home/liudong/ml-neuman/utils/ray_utils.py", line 7, in
import igl
ModuleNotFoundError: No module named 'igl'

I try to run 'conda list' and it shows I have installed igl

_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
blas 1.0 mkl defaults
bzip2 1.0.8 h7f98852_4 conda-forge
ca-certificates 2022.6.15 ha878542_0 conda-forge
certifi 2022.6.15 py37h89c1867_0 conda-forge
colorama 0.4.5 pyhd8ed1ab_0 conda-forge
cudatoolkit 11.1.1 ha002fc5_10 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
freetype 2.12.1 hca18f0e_0 conda-forge
fvcore 0.1.5.post20210915 py37 fvcore
gmp 6.2.1 h58526e2_0 conda-forge
gnutls 3.6.13 h85f3911_1 conda-forge
igl 2.2.1 py37h9d0810c_1 conda-forge
iopath 0.1.9 py37 iopath
jpeg 9b h024ee3a_2 defaults
lame 3.100 h7f98852_1001 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
libblas 3.9.0 12_linux64_mkl conda-forge
libcblas 3.9.0 12_linux64_mkl conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 12.1.0 h8d9b700_16 conda-forge
libgfortran-ng 12.1.0 h69a702a_16 conda-forge
libgfortran5 12.1.0 hdcd56e2_16 conda-forge
libiconv 1.17 h166bdaf_0 conda-forge
liblapack 3.9.0 12_linux64_mkl conda-forge
libnsl 2.0.0 h7f98852_0 conda-forge
libpng 1.6.37 h753d276_4 conda-forge
libsqlite 3.39.2 h753d276_1 conda-forge
libstdcxx-ng 12.1.0 ha89aaad_16 conda-forge
libtiff 4.0.9 he6b73bb_1 conda-forge
libuv 1.44.2 h166bdaf_0 conda-forge
libzlib 1.2.12 h166bdaf_2 conda-forge
llvm-openmp 14.0.4 he0ac6c6_0 conda-forge
mkl 2021.4.0 h8d4b97c_729 conda-forge
mkl-service 2.4.0 py37h402132d_0 conda-forge
mkl_fft 1.3.1 py37h3e078e5_1 conda-forge
mkl_random 1.2.2 py37h219a48f_0 conda-forge
ncurses 6.3 h27087fc_1 conda-forge
nettle 3.6 he412f7d_0 conda-forge
ninja 1.11.0 h924138e_0 conda-forge
numpy 1.21.5 py37h6c91a56_3 defaults
numpy-base 1.21.5 py37ha15fc14_3 defaults
nvidiacub 1.10.0 0 bottler
olefile 0.46 pyh9f0ad1d_1 conda-forge
openh264 2.1.1 h780b84a_0 conda-forge
openssl 3.0.5 h166bdaf_1 conda-forge
pillow 5.4.1 py37h34e0f95_0 defaults
pip 22.2.2 pyhd8ed1ab_0 conda-forge
portalocker 2.5.1 py37h89c1867_0 conda-forge
python 3.7.12 hf930737_100_cpython conda-forge
python_abi 3.7 2_cp37m conda-forge
pytorch 1.8.0 py3.7_cuda11.1_cudnn8.0.5_0 pytorch
pytorch3d 0.7.0 py37_cu111_pyt180 pytorch3d
pyyaml 6.0 py37h540881e_4 conda-forge
readline 8.1.2 h0f457ee_0 conda-forge
scipy 1.7.3 py37hf2a6cf1_0 conda-forge
setuptools 65.2.0 py37h89c1867_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.39.2 h4ff8645_1 conda-forge
tabulate 0.8.10 pyhd8ed1ab_0 conda-forge
tbb 2021.5.0 h924138e_1 conda-forge
termcolor 1.1.0 pyhd8ed1ab_3 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
torchaudio 0.8.0 py37 pytorch
torchvision 0.9.0 py37_cu111 pytorch
tqdm 4.64.0 pyhd8ed1ab_0 conda-forge
typing_extensions 4.3.0 pyha770c72_0 conda-forge
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yacs 0.1.8 pyhd8ed1ab_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
zlib 1.2.12 h166bdaf_2 conda-forge

Can ML-Neuman learn multiple people from the same scene?

The paper shows multiple people, learned from separate scenes, reposed within a novel scene, but how does it work when there are two humans in the same training video? Can it segment both humans out for training the scene NeRF and then iteratively apply the Human NeRF method to each individual?

I've tried applying the preprocess routine to a video with two people and the raw masks do not show two segmented humans. I'm still learning how this software works so I'm not sure if this is an error on my part or a limitation of the software.

No parkinglot_rotate in pretrained.zip

Thanks for the great work.

I tried to render telegathering with command python render_gathering.py --actors parkinglot seattle citron --scene_dir ./data/seattle --weights_path ./out/seattle_human/checkpoint.pth.tar but failed with No such file or directory: './out/parkinglot_rotate/checkpoint.pth.tar'. It looks like that parkinglot_rotate is not included in pretrained.zip. Do we have to train parkinglot_rotate by ourselves?

Dockerfile might need editing for cuda-pytorch compatibility

I'm running through the commands of your PreProcess Readme and everything runs well until the bash -i ./run.sh command.

The process freezes within the terminal, throwing a warning that my PyTorch installation is incompatible with my CUDA capability:

[09/13 20:37:07 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='../configs/COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml', input=['/neuman/data/my_video/my_example_video/raw_720p/00000.png', '/neuman/data/my_video/my_example_video/raw_720p/00001.png', '/neuman/data/my_video/my_example_video/raw_720p/00002.png', '/neuman/data/my_video/my_example_video/raw_720p/00003.png', '/neuman/data/my_video/my_example_video/raw_720p/00004.png', '/neuman/data/my_video/my_example_video/raw_720p/00005.png', '/neuman/data/my_video/my_example_video/raw_720p/00006.png', '/neuman/data/my_video/my_example_video/raw_720p/00007.png', '/neuman/data/my_video/my_example_video/raw_720p/00008.png', '/neuman/data/my_video/my_example_video/raw_720p/00009.png', '/neuman/data/my_video/my_example_video/raw_720p/00010.png', '/neuman/data/my_video/my_example_video/raw_720p/00011.png', '/neuman/data/my_video/my_example_video/raw_720p/00012.png', '/neuman/data/my_video/my_example_video/raw_720p/00013.png', '/neuman/data/my_video/my_example_video/raw_720p/00014.png', '/neuman/data/my_video/my_example_video/raw_720p/00015.png', '/neuman/data/my_video/my_example_video/raw_720p/00016.png', '/neuman/data/my_video/my_example_video/raw_720p/00017.png', '/neuman/data/my_video/my_example_video/raw_720p/00018.png', '/neuman/data/my_video/my_example_video/raw_720p/00019.png', '/neuman/data/my_video/my_example_video/raw_720p/00020.png', '/neuman/data/my_video/my_example_video/raw_720p/00021.png', '/neuman/data/my_video/my_example_video/raw_720p/00022.png', '/neuman/data/my_video/my_example_video/raw_720p/00023.png', '/neuman/data/my_video/my_example_video/raw_720p/00024.png', '/neuman/data/my_video/my_example_video/raw_720p/00025.png', '/neuman/data/my_video/my_example_video/raw_720p/00026.png', '/neuman/data/my_video/my_example_video/raw_720p/00027.png', '/neuman/data/my_video/my_example_video/raw_720p/00028.png', '/neuman/data/my_video/my_example_video/raw_720p/00029.png', '/neuman/data/my_video/my_example_video/raw_720p/00030.png', '/neuman/data/my_video/my_example_video/raw_720p/00031.png'], opts=['MODEL.WEIGHTS', './model_final_2d9806.pkl'], output='/neuman/data/my_video/my_example_video/raw_masks', video_input=None, webcam=False)
/opt/conda/envs/ROMP/lib/python3.8/site-packages/torch/cuda/__init__.py:106: UserWarning:
NVIDIA RTX A5000 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
If you want to use the NVIDIA RTX A5000 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))

While I did need to make sure that my pytorch installation was installed using the locally instructions, I've had no issues running the Demo instructions for the rendering. I'm wondering whether your dockerfile needs alteration and/or your readme needs to mention that this an error is possible without changing the dockerfile instructions.

Edit - pertinent venv library versions:

cudatoolkit               11.3.1               h2bc3f7f_2
nvidiacub                 1.10.0                        0    bottler
python                    3.7.13               h12debd9_0
pytorch                   1.12.1          py3.7_cuda11.3_cudnn8.3.2_0    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pytorch3d                 0.7.0           py37_cu113_pyt1121    pytorch3d
torchaudio                0.12.1               py37_cu113    pytorch
torchvision               0.13.1               py37_cu113    pytorch

the training step takes too much time

image
Hi, thanks for your nice work. I train the scene NeRF with the command:
python train.py --scene_dir ./data/bike/ --name=bike_background --train_mode=bkg --rays_per_batch 1024 --samples_per_ray 64
and as shown in the image, it seems that the training step will take almost 10 days. Is this normal?

There was something wrong in ./models/smpl.py self.faces = data_struct.f AttributeError: 'Struct' object has no attribute 'f'

Thanks for your excellent work!

Traceback (most recent call last):
File "render_360.py", line 164, in
main_posed_360(opt)
File "render_360.py", line 91, in main_posed_360
smpl_type='optimized'
File "/home/zhaozisong/ml-neuman/data_io/neuman_helper.py", line 245, in read_scene
smpls, world_verts, static_verts, Ts = cls.read_smpls(scene_dir, scene.captures, scale=scale, smpl_type=smpl_type)
File "/home/zhaozisong/ml-neuman/data_io/neuman_helper.py", line 272, in read_smpls
device=device
File "/home/zhaozisong/ml-neuman/models/smpl.py", line 76, in init
self.faces = data_struct.f
AttributeError: 'Struct' object has no attribute 'f'

What should I do to solve this error so that I can start Render using pretrained model/Training the model?

Training details for NeuMan dataset

Hi,

Thanks for the great work and for sharing the well-written code. I want to train a model on my own video with similar configurations as done in the paper. I wonder if you use the default configuration (e.g. 4096 rays/batch, 128 samples/ray, 1M iterations) for training all the sequences? It seems that it takes longer than 2 days to train the background model with such configurations on an RTX 3090.

The model seems to not be regressing the texture correctly

Hello, I am incurring in some problems while training your model. From tensorboard, it looks like the model is unable to correctly regress the color of the canonical human, either predicting black or white regions.
At first I thought it was my own data, but now I am training on the lab scene and it looks like it's producing the same pattern. Have experienced the same issues during your experiments? Is it just a matter of giving the model more time to converge (for now I trained for max 50-60k iterations) or playing with the hyperparameters?

Thank you very much and nice work!

Question about the TRAIN_SET_LENGTH constant value

Hi, thanks for open-source the excellent work.

I have a question that In dataset code, why use a large number TRAIN_SET_LENGTH=1000000 to represent the length of the training set, such that the training epoch (max_epoch) is always be 1 for both background and human nerf training. Any consideration for this value? Thanks.

einsum() operands do not broadcast with remapped shapes

ths for you excellent work!
i follow the guide, but met this error

(neuman_env) root@cabdd5912088:/workspace/ml-neuman# CUDA_VISIBLE_DEVICES=7 python render_reposing.py --scene_dir ./data/bike --weights_path ./out/bike_human/checkpoint.pth.tar --motion_name=jumpandroll
reading cameras: 100%|█████████████████████████| 1/1 [00:00<00:00, 27060.03it/s]
reading images meta: 100%|██████████████████| 104/104 [00:00<00:00, 7290.91it/s]
reading point cloud: 100%|████████████| 33742/33742 [00:00<00:00, 206208.52it/s]
Computing near/far for ['bkg']: 100%|█████████| 104/104 [00:01<00:00, 97.03it/s]
using optimized smpl
Traceback (most recent call last):
  File "render_reposing.py", line 199, in <module>
    main(opt)
  File "render_reposing.py", line 135, in main
    smpl_type='optimized'
  File "/workspace/ml-neuman/data_io/neuman_helper.py", line 245, in read_scene
    smpls, world_verts, static_verts, Ts = cls.read_smpls(scene_dir, scene.captures, scale=scale, smpl_type=smpl_type)
  File "/workspace/ml-neuman/data_io/neuman_helper.py", line 303, in read_smpls
    concat_joints=True
  File "/workspace/ml-neuman/models/smpl.py", line 152, in verts_transformations
    return_T=True, concat_joints=concat_joints)
  File "/workspace/ml-neuman/models/smpl.py", line 310, in lbs
    v_shaped = v_template + blend_shapes(betas, shapedirs)
  File "/workspace/ml-neuman/models/smpl.py", line 403, in blend_shapes
    blend_shape = torch.einsum('bl,mkl->bmk', [betas, shape_disps])
  File "/opt/conda/envs/neuman_env/lib/python3.7/site-packages/torch/functional.py", line 406, in einsum
    return einsum(equation, *_operands)
  File "/opt/conda/envs/neuman_env/lib/python3.7/site-packages/torch/functional.py", line 408, in einsum
    return _VF.einsum(equation, operands)  # type: ignore
RuntimeError: einsum() operands do not broadcast with remapped shapes [original->remapped]: [1, 10]->[1, 1, 1, 10] [6890, 3, 300]->[1, 6890, 3, 300]

The reconstructed human model are not good for custom data

Hi,
I try to train your model after following the data processing procedure for custom data, the processed results seems correct, but the reconstruction of human models are not good, with blurry and ghosting effects,a large gap with your present results. Any issues may lead to this phenomenon?Any tips for training a good model? Thanks

WSL issue with Path to smpl_file

No issues setting up the data directories nor environment, but I am having trouble getting any of the training rendering scripts to run thru my Ubuntu (20.04) WSL. Here's the error traceback resulting from the Train NeRF scene command, plus some debug print-outs:

(neuman_venv) domattioli@my_pc_wsl:~/Projects/HPSE/src/ml-neuman$ sudo env "PATH=$PATH" python train.py --scene_dir ./data/bike/ --name=bike_background --train_mode=bkg
[truncated output...]
Computing near/far for ['bkg']: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 104/104 [00:00<00:00, 438.03it/s]

-----Debug Print-Outs:-----
...creating 'smpl_path' var...
found this path: /home/domattioli/Projects/HPSE/src/ml-neuman/data/smplx/smpl/SMPL_NEUTRAL.pkl
....advancing to path check...
------------------------------

Traceback (most recent call last):
  File "train.py", line 262, in <module>
    train_background(opt)
  File "train.py", line 29, in train_background
    train_split, val_split, _ = neuman_helper.create_split_files(opt.scene_dir)
  File "/home/domattioli/Projects/HPSE/src/ml-neuman/data_io/neuman_helper.py", line 153, in create_split_files
    dummy_scene = NeuManReader.read_scene(scene_dir)
  File "/home/domattioli/Projects/HPSE/src/ml-neuman/data_io/neuman_helper.py", line 245, in read_scene
    smpls, world_verts, static_verts, Ts = cls.read_smpls(scene_dir, scene.captures, scale=scale, smpl_type=smpl_type)
  File "/home/domattioli/Projects/HPSE/src/ml-neuman/data_io/neuman_helper.py", line 272, in read_smpls
    device=device
  File "/home/domattioli/Projects/HPSE/src/ml-neuman/models/smpl.py", line 73, in __init__
    with open(smpl_path, 'rb') as smpl_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/domattioli/Projects/HPSE/src/ml-neuman/data/smplx/smpl/SMPL_NEUTRAL.pkl'

Yet, here is the path of the model and it appears to be located where it should:

(neuman_venv) domattioli@my_pc_wsl:~/Projects/HPSE/src/ml-neuman$ cd data/smplx/smpl
(neuman_venv) domattioli@my_pc_wsl:~/Projects/HPSE/src/ml-neuman/data/smplx/smpl$ ls
SMPL_NEUTRAL.pk1

I assume this is an issue associated with the WSL setup but I'd like a second set of eyes to double check that nothing in the repo is hard-coded.

Preprocessing my video can't get the Sparse scene reconstrution output.

When I use the /preprocess/run.sh to preprocess my video, I can't use the colmap to get sparse scene reconstrution. I get the error  "Finding good initial image pair: No good initial image pair found" 
My videos are fixed camera or multiperson in a video. If the proprocess is only used for the camera moving with people or not?

a

Some questions about custom datasets

Hello~When I use my own datasets for training, I have several questions:

  1. I use my own video for preprocessing and training. Then I get the human model and scene model. But when I try to render reposing, the rendering effect is not as good as that in the paper. The rendering pictures are a little bit vague. Is it related to the parameters that I set in trainging? For example, samples_per_ray, rays_per_batch or any other parameter?
  2. When I try to use other datasets not SFU datasets for render reposing, are there any parameters that I need to adjust in render_reposing.py except for parameters in get_manual_alignment function?
    Thanks for your reply!

Code of rendering background scenes

Thanks for releasing this excellent work!

I am reproducing the results following your two stage training instructions. After training, I see there are some artifacts in background when rendering test view results, and want to render the background scene using the scene model to see bg reconstruction results separately. I have found no code release of the rendering and try to implement myself, but the result is not correct though.

Could you please release the code for rendering background scene? Thanks.

why use Da_pose?

In paper, I only find " In comparison to the traditional T-pose, Da-pose avoids volume collision when warping from observation space to canonical space for the legs." But I can't understand this. Why is there volume collision during warping?

The problem of predicting my own data set

I test my own dataset using your trained bike_human model, Enter
python render_360.py --scene_dir data/mydata/output --weights_path out/bike_human/checkpoint.pth --mode canonical_360,
we get the following result
out_0000
Excuse me, is there something wrong with me? Or would I have to retrain for my own data set

How to change new poses of rendering?

Hello! Can you provide more details in adjusting the values of variables in get_manual_alignment function? For example, which files are needed to open in Blender and which function is needed in Blender? Or can you give a brief exmaple of adjusting the values of bike demo? Thanks a lot!

Problem occured preprocessing my own video __ SMPL parameters8/10

The detail is in the picture down below.

624804f27906884237e2edc9d70c6f6

I've been following the bash file ./run.sh
The problem occurs when using the tuned model ROMP_HRNet32_V1.pkl

Processed 0 / 23 images
Then it terminates. I really have no idea what to do. Could you please help me out of the situation?

Some questions about reproduction on new datasets

Dear author Jiang,
I have some questions to run your code on my custom dataset.
Q1: My dataset is a video of moving person captured by a moving camera, which is similar with your datasets. However, the difference is that I am planning to use altogether 360 frames for training, which will be more than yours(~100frames), will it increase training time( as I don't know in the 7 days training time as you mentioned, which one is slower(bottomneck), Human Model or the Scene Model? Moreover, the movement of the human body is not a continuous movement, but divided into two different movements, will it affect the training of Human Model? Should I modify something?
Q2: As you mentioned, the 2 stages costs about 7 days for training on a V100, Can you tell me What is the most time-consuming operation in Stage1 and Stage2, seperately? Because the second stage cannot support full-GPU, I wonder if I can improve the training speed by easily modifying some configurations, so that I can see a relatively correct result in a shorter time.

I hava a new problem

RuntimeError: CUDA out of memory. Tried to allocate 1024.00 MiB (GPU 0; 12.00 GiB total capacity; 10.73 GiB already allocated; 0 bytes free; 11.27 GiB reserved in total by PyTorch)�

Some confusion about the sequence of scene-alignment and SMPL optimization

Thanks for your excellent work!

In the paper, SMPL optimization is done before scene-alignment. However, the sequence is reserved in the code. Which one is correct?

"Therefore, we refine the SMPL estimates by optimizing the SMPL parameters using silhouette estimated from [8,48], and 2D joints estimated from [3,4] as detailed in the supplementary material. We then align the SMPL estimates in the scene coordinates."

At the same time, I found the head of SMPL is smaller than G.T. in my own data. Is the mismatching caused by the reversed sequence?
1660546379367

Some went wrong when I run "python render_360.py --scene_dir ./data/bike --weights_path ./out/bike_human/checkpoint.pth.tar --mode canonical_360"

Here's the log

Traceback (most recent call last): File "render_360.py", line 23, in from utils import render_utils, utils File "/root/ml-neuman/utils/render_utils.py", line 11, in from pytorch3d.renderer import ( File "/root/.local/conda/envs/neuman_env/lib/python3.7/site-packages/pytorch3d/renderer/init.py", line 7, in from .blending import ( File "/root/.local/conda/envs/neuman_env/lib/python3.7/site-packages/pytorch3d/renderer/blending.py", line 11, in from pytorch3d import _C ImportError: /root/.local/conda/envs/neuman_env/lib/python3.7/site-packages/pytorch3d/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7is_cudaEv

Question about method vertex_forward

Thanks for your great work.
I have a question about this method.
image

In this method, to get world_verts, da_pose_verts are first transformed by mesh_transf. But I think this equivalent to directly use pose_verts. In code :
mesh_transf @ da_pose_verts)
is equivalent to

    pose_verts, _= body_model(return_tensor=True,
                                               return_joints=True,
                                               poses=pose[None],
                                               betas=betas[None],
                                               transl=torch.zeros([1, 3]).float().to(device),
                                               )

I have checked this by debugging.
So I'm really confused, is this redundancy? Thanks!

The problem with render_reposing.py

I use your trained model to reason my own data with the following command: 

python render_reposing.py --scene_dir data/mydata/output --weights_path out/lab_human/checkpoint.pth.tar --motion_name=jumpandroll.
the result for a frame is as follows:
out_0007
The people in the picture above are still the people in the training set, not the people in my data set. What is the problem?

Error with visualize_scene.py -- cannot advance beyond assert check

Preprocess script for a custom video passed all ten steps of the bash script. There are reasonable smpl overlays in the overlays/optimized and overlays/romp folders. Running

python visualize_scene.py --scene_dir /home/me/src/ml-neuman/data/example-single_person-moving-football_receiver_wide_open/my_video/output

produces the error traceback:

entered main
reading cameras: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 29959.31it/s]
reading images meta: 100%|████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 12002.78it/s]
reading point cloud: 100%|███████████████████████████████████████████████████████████████████████████████████| 359/359 [00:00<00:00, 423440.70it/s]
Computing near/far for ['bkg']: 100%|██████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 5588.27it/s]

...creating 'smpl_path' var...
assert command will check this path: /home/me/src/ml-neuman/data/smplx/smpl/SMPL_NEUTRAL.pkl
....advancing to assert check...

using optimized smpl
Traceback (most recent call last):
  File "visualize_scene.py", line 64, in <module>
    main(opt)
  File "visualize_scene.py", line 28, in main
    smpl_type='optimized'
  File "/home/me/src/ml-neuman/data_io/neuman_helper.py", line 245, in read_scene
    smpls, world_verts, static_verts, Ts = cls.read_smpls(scene_dir, scene.captures, scale=scale, smpl_type=smpl_type)
  File "/home/me/src/ml-neuman/data_io/neuman_helper.py", line 281, in read_smpls
    raw_smpl = joblib.load(smpl_path)
  File "/home/me/venv/neuman_venv/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 587, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/home/me/venv/neuman_venv/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 506, in _unpickle
    obj = unpickler.load()
  File "/home/me/venv/neuman_venv/lib/python3.7/pickle.py", line 1088, in load
    dispatch[key[0]](self)
KeyError: 0

The file extension is .pkl, not .pk1, but to me, the KeyError: 0 suggests that this is an issue with the python 3.7 pickle.py function. Here is a screenshot of my output folder:
image

Issues with ./run.sh script: `cd: restricted` and `CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.`

I altered the preprocess Dockerfile.txt for a custom video, had some success with one video, but now am (days later) getting these errors throughout the ./run.sh bash file run:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.


python: can't open file 'demo.py': [Errno 2] No such file or directory
CommandNotFoundError: Your shell has not been properly configured to use 'conda deactivate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.


./run.sh: line 13: cd: restricted

I'm going to try appending sudo to the beginning of the suggested commands to rebuild the docker image. Just wondering if anyone else has come across this?

Preprocess cannot optimize SMPL using silhouette for custom video

I'm trying to train on a custom video but the bash -i ./run.sh cannot get past the 10th steps:. The read out is:

alignment matrix saved at: /data/elements_of_dance-cut/output/alignments.npy
========================================
10/10: Optimize SMPL using silhouette
========================================
reading cameras: 100%|██████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 30174.85it/s]
reading images meta: 100%|██████████████████████████████████████████████████████| 171/171 [00:00<00:00, 14839.26it/s]
reading point cloud: 100%|███████████████████████████████████████████████████| 6653/6653 [00:00<00:00, 212868.39it/s]
can not find keypoints for 00000.png
....
can not find keypoints for 00170.png
Computing near/far for ['bkg']: 100%|████████████████████████████████████████████| 171/171 [00:00<00:00, 1054.49it/s]
Traceback (most recent call last):
  File "optimize_smpl.py", line 327, in <module>
    main(opt)
  File "optimize_smpl.py", line 266, in main
    smpl_type='romp'
  File "../data_io/neuman_helper.py", line 245, in read_scene
    smpls, world_verts, static_verts, Ts = cls.read_smpls(scene_dir, scene.captures, scale=scale, smpl_type=smpl_type)
  File "../data_io/neuman_helper.py", line 272, in read_smpls
    device=device
  File "../models/smpl.py", line 71, in __init__
    smpl_path)
AssertionError: Path /neuman/data/smplx/smpl does not exist!

I'm confused on why this error is being thrown when there are .npy and .png files of the SMPL mesh for the human in each image of the video at ./output/smpl_pred.

GPU numbers and hours

Hi! Thanks for releasing this wonderful work!

I wonder how many GPUs and what types of GPUs are you using to train the 2 stages, and how long does it take to train the background part and human body part? Thank you!

Best regards!

Can't install nvidiacub in Apple M1

when i run command : conda install -c bottler nvidiacub in Apple M1
get error:
The following packages are not available from current channels:

  • nvidiacub

how to slove it?

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.