Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A error about 3DMMExtract/Coarse/util/preprocess.py #4

Open
904763189cy opened this issue Sep 6, 2023 · 1 comment
Open

A error about 3DMMExtract/Coarse/util/preprocess.py #4

904763189cy opened this issue Sep 6, 2023 · 1 comment

Comments

@904763189cy
Copy link

Hi

t[0] and t[1] are list

so I change the code:
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]])

then code executed successfully.
But I’m not sure if this is the correct way to modify the code.

Error:
Traceback (most recent call last):
File “/home/visionx/CIY/OTAvatar_processing_ultimate/3DMMExtract/Coarse/face_recon_videos.py”, line 187, in
main(opt, model)
File “/home/visionx/CIY/OTAvatar_processing_ultimate/3DMMExtract/Coarse/face_recon_videos.py”, line 118, in main
print(dataset[0])
File “/home/visionx/CIY/OTAvatar_processing_ultimate/3DMMExtract/Coarse/face_recon_videos.py”, line 61, in getitem
= self.image_transform(frames[i], lm[i])
File “/home/visionx/CIY/OTAvatar_processing_ultimate/3DMMExtract/Coarse/face_recon_videos.py”, line 97, in image_transform
trans_params, img, lm, _ = align_img(images, lm, self.lm3d_std)
File “/home/visionx/CIY/OTAvatar_processing_ultimate/3DMMExtract/Coarse/util/preprocess.py”, line 98, 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.

@TaekyungKi
Copy link

Modifying the line trans_params = np.array([w0, h0, s, t[0], t[1]]) to trans_params = np.array([w0, h0, s, t[0], t[1]], dtype=object) may resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants