Spaces:
Runtime error
Runtime error
Commit
Β·
01cca4c
1
Parent(s):
e1293f8
Update icpr2020dfdc/blazeface/face_extract.py
Browse files
icpr2020dfdc/blazeface/face_extract.py
CHANGED
|
@@ -408,7 +408,7 @@ class FaceExtractor:
|
|
| 408 |
for i in range(len(detections)):
|
| 409 |
kpts = []
|
| 410 |
size = int(face_fraction * min(detections[i, 2] - detections[i, 0], detections[i, 3] - detections[i, 1]))
|
| 411 |
-
kpts_coords = detections[i, 4:16].cpu().numpy().astype(np.
|
| 412 |
for kpidx in range(6):
|
| 413 |
kpx, kpy = kpts_coords[kpidx * 2:kpidx * 2 + 2]
|
| 414 |
kpt = frame[kpy - size // 2:kpy - size // 2 + size, kpx - size // 2:kpx - size // 2 + size, ]
|
|
|
|
| 408 |
for i in range(len(detections)):
|
| 409 |
kpts = []
|
| 410 |
size = int(face_fraction * min(detections[i, 2] - detections[i, 0], detections[i, 3] - detections[i, 1]))
|
| 411 |
+
kpts_coords = detections[i, 4:16].cpu().numpy().astype(np.int64)
|
| 412 |
for kpidx in range(6):
|
| 413 |
kpx, kpy = kpts_coords[kpidx * 2:kpidx * 2 + 2]
|
| 414 |
kpt = frame[kpy - size // 2:kpy - size // 2 + size, kpx - size // 2:kpx - size // 2 + size, ]
|