wanghaofan commited on
Commit
57b32df
1 Parent(s): 1305afc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -79,7 +79,8 @@ Then, you can customized your own face images
79
  image = load_image("your-example.jpg")
80
 
81
  # prepare face emb
82
- face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))[-1]
 
83
  face_emb = face_info['embedding']
84
  face_kps = draw_kps(face_image, face_info['kps'])
85
 
 
79
  image = load_image("your-example.jpg")
80
 
81
  # prepare face emb
82
+ face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
83
+ face_info = sorted(face_info, key=lambda x:(x['bbox'][2]-x['bbox'][0])*x['bbox'][3]-x['bbox'][1])[-1] # only use the maximum face
84
  face_emb = face_info['embedding']
85
  face_kps = draw_kps(face_image, face_info['kps'])
86