mks0601 / I2L-MeshNet_RELEASE

Official PyTorch implementation of "I2L-MeshNet: Image-to-Lixel Prediction Network for Accurate 3D Human Pose and Mesh Estimation from a Single RGB Image", ECCV 2020
MIT License
708 stars 130 forks source link

when running the command: python demo.py --gpu 3 --stage param --test_epoch 8 I get the following error, can someone help me please to solve it #126

Open duanyuanyi opened 1 year ago

duanyuanyi commented 1 year ago

(I2l-meshnet) [duanyuanyi@gpu demo]$ python demo.py --gpu 3 --stage param --test_epoch 8

Using GPU: 3 /public/home/duanyuanyi/I2L-MeshNet_RELEASE-master/main/../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)) Load checkpoint from ./snapshot_8.pth.tar /public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/functional.py:478: 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:2895.) return _VF.meshgrid(tensors, *kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "demo.py", line 94, in out = model(inputs, targets, meta_info, 'test') File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, *kwargs) File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 169, in forward return self.gather(outputs, self.output_device) File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 181, in gather return gather(outputs, output_device, dim=self.dim) File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 80, in gather res = gather_map(outputs) File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 69, in gather_map return type(out)((k, gather_map([d[k] for d in outputs])) File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 69, in return type(out)((k, gather_map([d[k] for d in outputs])) File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 73, in gather_map return type(out)(map(gather_map, zip(outputs))) TypeError: expected a sequence of integers or a single integer, got '<map object at 0x2b262fd888b0>'

duanyuanyi commented 1 year ago

The issue has been resolved by downgrading the PyTorch version to 1.4.0. The reason was that the higher version was causing compatibility problems. By matching the corresponding versions, PyTorch and torchvision can be made compatible, ensuring smooth execution of the code.