hongsukchoi / 3DCrowdNet_RELEASE

Official Pytorch implementation of "Learning to Estimate Robust 3D Human Mesh from In-the-Wild Crowded Scenes", CVPR 2022
MIT License
155 stars 15 forks source link

How can I get J_regressor_coco_hip_smpl.npy file? #2

Closed uyoung-jeong closed 2 years ago

uyoung-jeong commented 2 years ago

Thanks for the great work. I am trying to run 3DPW evaluation script, but the test script raises an error due to nonexistence of J_regressor_coco_hip_smpl.npy file. It seems that you did not provide a download link for it. Is this file the same as this one? https://github.com/mks0601/I2L-MeshNet_RELEASE/blob/master/data/MSCOCO/J_regressor_coco_hip_smpl.npy

uyoung-jeong commented 2 years ago

After downloading above .npy file, I ran into another error. Line https://github.com/uyoung-jeong/Custom3DCrowd/blob/a41312d248d494feec34505825a6c052d3dff67a/common/base.py#L160 raises an AssertionError stating that it cannot find model at output/{exp_name}/snapshot_10.pth.tar It seems that your current code does not load the model weight stored in ${ROOT}/tool/.

After fixing above error, I could finish the testing script, but the result seems weird. I ran the following command line: python test.py --gpu 0-3 --cfg ../assets/yaml/3dpw.yml --exp_dir ../output/exp_04-06_23:43 --test_epoch 10 And I got the below command line output. I modified file path string.

output dir:  /${ROOT}/output/exp_05-02_10:58
>>> Using GPU: 0,1,2,3
/${ROOT}/main/config.py:105: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  exp_config = edict(yaml.load(f))
05-02 10:58:54 Creating dataset...
/${ROOT}/common/utils/smplpytorch/smplpytorch/pytorch/smpl_layer.py:41: UserWarning: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at  ../torch/csrc/utils/tensor_numpy.cpp:178.)
  torch.Tensor(smpl_data['betas'].r).unsqueeze(0))
loading annotations into memory...
Done (t=6.19s)
creating index...
index created!
Load OpenPose input
check hhrnet input:  0
3dpw data len:  35515
05-02 10:59:04 Load checkpoint from ../tool/snapshot_0.pth.tar
05-02 10:59:04 Creating graph...
Found Trained Model: /${ROOT}/common/utils/human_model_files/smpl/VPOSER_CKPT/snapshots/TR00_E096.pt
  0%|                                                                                                                                                                                                                    | 0/139 [00:00<?, ?it/s]/home/uyoung/anaconda3/envs/3dcrowd/lib/python3.8/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  ../aten/src/ATen/native/TensorShape.cpp:2228.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 139/139 [02:43<00:00,  1.18s/it]
MPJPE from mesh: 449.29 mm
PA MPJPE from mesh: 98.73 mm
MPVPE from mesh: 473.70 mm
hongsukchoi commented 2 years ago

Thanks for the great work. I am trying to run 3DPW evaluation script, but the test script raises an error due to nonexistence of J_regressor_coco_hip_smpl.npy file. It seems that you did not provide a download link for it. Is this file the same as this one? https://github.com/mks0601/I2L-MeshNet_RELEASE/blob/master/data/MSCOCO/J_regressor_coco_hip_smpl.npy

Thanks for letting me know. I updated the link.

After downloading above .npy file, I ran into another error. Line https://github.com/uyoung-jeong/Custom3DCrowd/blob/a41312d248d494feec34505825a6c052d3dff67a/common/base.py#L160 raises an AssertionError stating that it cannot find model at output/{exp_name}/snapshot_10.pth.tar It seems that your current code does not load the model weight stored in ${ROOT}/tool/.

The test codes do not load model weight from ${ROOT}/tool/.. Did you downloaded the pre-trained model weights and place them in the right place?

After fixing above error, I could finish the testing script, but the result seems weird. I ran the following command line:

Please tell me if the result is still weird.

uyoung-jeong commented 2 years ago

Thanks for the reply. I confused pretrained 3DCrowdNet file with the pretrained backbone file. The result is okay after fixing the issue.