sicxu / Deep3DFaceRecon_pytorch

Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set (CVPRW 2019). A PyTorch implementation.
MIT License
1.7k stars 315 forks source link

torch1.13.1+cuda11.6 error #140

Open flydragon2018 opened 1 year ago

flydragon2018 commented 1 year ago

when do the test.py run:

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part.

what could be the problem?

yulies commented 1 year ago

In the file Deep3DFaceRecon_pytorch/util/preprocess.py line 202, change from: trans_params = np.array([w0, h0, s, t[0], t[1]]) to: trans_params = np.array([w0, h0, s, t[0, 0], t[1, 0]])

This solved the issue for me.