deepinsight / deepinsight/insightface
AttributeError: 'list' object has no attribute 'kps'
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
Below is the code I was trying to run and the error I got:
```
import numpy as np
import os
import glob
import cv2
from PIL import Image
import insightface
from insightface.app import FaceAnalysis
from insightface.data import get_image as ins_get_image
app = FaceAnalysis(name="buffalo_l")
app.prepare(ctx_id=0, det_size=(640,640))
img = cv2.imread("friends.png")
rob = cv2.imread("rob.png")
faces = app.get(img)
rob_faces = app.get(rob)
swapper = insightface.model_zoo.get_model('../inswapper_128.onnx',download=False,download_zip=False)
res = img.copy()
for face in faces:
res = swapper.get(res,faces,rob_faces,paste_back=True)
```
Facing the below issue, while running the above code:
Error:
```
aimg, M = face_align.norm_crop2(img, target_face.kps, self.input_size[0])
AttributeError: 'list' object has no attribute 'kps'
```
Any help on this regard would be greatly appreciated. Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.