Open zhixingrenai opened 1 year ago
step 2 error, who know it, thank you
Replace the line trans_params = np.array([w0, h0, s, np.asscalar(t[0]), np.asscalar(t[1])]) with below lines trans_params = np.array([w0, h0, s]) trans_params = np.append(trans_params, t[0]) trans_params = np.append(trans_params, t[1]) It worked for me.
is ok now, numpy version change is ok
as I am having the same error what fixed it was it the numpy version change? what version did you end up using?
Edit: I fixed mine by following deepakkupandas fix of editing the preproccess file, i also changed the numpy version
downgrading to numpy==1.23.1
fixed it without having to replace any text as stated above
[Step 2] 3DMM Extraction In Video:: 0%| | 0/135 [00:00<?, ?it/s] Traceback (most recent call last): File "inference.py", line 342, in
main()
File "inference.py", line 100, in main
trans_params, im_idx, lmidx, = align_img(frame, lm_idx, lm3d_std)
File "G:\pythonProject\third_part\face3d\util\preprocess.py", line 196, in align_img
trans_params = np.array([w0, h0, s, t[0], t[1]])
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.
PS G:\pythonProject>