Update README.md
Browse files
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))
|
|
|
|
| 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 |
|