CodeFormer icon indicating copy to clipboard operation
CodeFormer copied to clipboard

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

Open XxsStrongest opened this issue 1 year ago • 0 comments
trafficstars

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?

XxsStrongest avatar Jun 19 '24 02:06 XxsStrongest