hongsukchoi / TCMR_RELEASE

Official Pytorch implementation of "Beyond Static Features for Temporally Consistent 3D Human Pose and Shape from a Video", CVPR 2021
MIT License
274 stars 39 forks source link

error #20

Open liuhaorandezhanghao opened 2 years ago

liuhaorandezhanghao commented 2 years ago

Running TCMR on each person tracklet... 0%| | 0/1 [00:01<?, ?it/s] Traceback (most recent call last): File "demo_gzh.py", line 383, in main(args) File "demo_gzh.py", line 188, in main output = model(batch)[0][-1] File "/home/vtuber/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, kwargs) File "/home/vtuber/project/TCMR_RELEASE-master/lib/models/tcmr.py", line 146, in forward smpl_output = self.regressor(feature, is_train=is_train, J_regressor=J_regressor) File "/home/vtuber/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, *kwargs) File "/home/vtuber/project/TCMR_RELEASE-master/lib/models/spin.py", line 269, in forward pose2rot=False, File "/home/vtuber/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(input, kwargs) File "/home/vtuber/project/TCMR_RELEASE-master/lib/models/smpl.py", line 83, in forward full_pose=smpl_output.full_pose) TypeError: init() got an unexpected keyword argument 'body_pose'

hongsukchoi commented 2 years ago

Hi, it seems you are running your modified codes. Would you provide your full codes?

Mirandl commented 2 years ago

Hi, I got a similar error but there's a little different

Running TCMR on each person tracklet... 0%| | 0/5 [00:04<?, ?it/s] Traceback (most recent call last): File "/root/data/TCMR/demo.py", line 375, in main(args) File "/root/data/TCMR/demo.py", line 186, in main output = model(batch)[0][-1] File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, kwargs) File "/root/data/TCMR/lib/models/tcmr.py", line 146, in forward smpl_output = self.regressor(feature, is_train=is_train, J_regressor=J_regressor) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, *kwargs) File "/root/data/TCMR/lib/models/spin.py", line 269, in forward pose2rot=False, File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(input, kwargs) File "/root/data/TCMR/lib/models/smpl.py", line 74, in forward smpl_output = super(SMPL, self).forward(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/smplx/body_models.py", line 376, in forward self.lbs_weights, pose2rot=pose2rot, dtype=self.dtype) File "/usr/local/lib/python3.6/dist-packages/smplx/lbs.py", line 205, in lbs J_transformed, A = batch_rigid_transform(rot_mats, J, parents, dtype=dtype) File "/usr/local/lib/python3.6/dist-packages/smplx/lbs.py", line 347, in batch_rigid_transform rel_joints.view(-1, 3, 1)).view(-1, joints.shape[1], 4, 4) RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

Process finished with exit code 1

could you help me figure out what's wrong with it? (btw I didn't change your code)

liuhaorandezhanghao commented 2 years ago

因为view()需要Tensor中的元素地址是连续的,但是有些情况会出现不连续的情况,因此使用.contiguous()将它在内存中变成连续的分布

On 03/3/2022 @.***> wrote:

Hi, I got a similar error but there's a little different

Running TCMR on each person tracklet... 0%| | 0/5 [00:04<?, ?it/s] Traceback (most recent call last): File "/root/data/TCMR/demo.py", line 375, in main(args) File "/root/data/TCMR/demo.py", line 186, in main output = model(batch)[0][-1] File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, kwargs) File "/root/data/TCMR/lib/models/tcmr.py", line 146, in forward smpl_output = self.regressor(feature, is_train=is_train, J_regressor=J_regressor) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, *kwargs) File "/root/data/TCMR/lib/models/spin.py", line 269, in forward pose2rot=False, File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(input, kwargs) File "/root/data/TCMR/lib/models/smpl.py", line 74, in forward smpl_output = super(SMPL, self).forward(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/smplx/body_models.py", line 376, in forward self.lbs_weights, pose2rot=pose2rot, dtype=self.dtype) File "/usr/local/lib/python3.6/dist-packages/smplx/lbs.py", line 205, in lbs J_transformed, A = batch_rigid_transform(rot_mats, J, parents, dtype=dtype) File "/usr/local/lib/python3.6/dist-packages/smplx/lbs.py", line 347, in batch_rigid_transform rel_joints.view(-1, 3, 1)).view(-1, joints.shape[1], 4, 4) RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

Process finished with exit code 1

could you help me figure out what's wrong with it? (btw I didn't change your code)

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

hongsukchoi commented 2 years ago

You can change the library code with sudo privilege, if the library code is the problem