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

TypeError: expected np.ndarray (got numpy.ndarray) #381

Open
XxsStrongest opened this issue Jun 19, 2024 · 0 comments
Open

TypeError: expected np.ndarray (got numpy.ndarray) #381

XxsStrongest opened this issue Jun 19, 2024 · 0 comments

Comments

@XxsStrongest
Copy link

Traceback (most recent call last):
File "/data/workpace/CodeFormer/inference_codeformer.py", line 190, in
num_det_faces = face_helper.get_face_landmarks_5(
File "/data/workpace/CodeFormer/facelib/utils/face_restoration_helper.py", line 217, in get_face_landmarks_5
bboxes = self.face_detector.detect_faces(input_img)
File "/data/workpace/CodeFormer/facelib/detection/retinaface/retinaface.py", line 205, in detect_faces
image, self.resize = self.transform(image, use_origin_size)
File "/data/workpace/CodeFormer/facelib/detection/retinaface/retinaface.py", line 190, in transform
image = torch.from_numpy(image).unsqueeze(0)
TypeError: expected np.ndarray (got numpy.ndarray)

python verison:3.9
torch version:2.1.0
numpy version: 1.24.1
What causes this problem?

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

1 participant