fix bug with new mask

This commit is contained in:
David Chatel
2024-03-13 12:20:51 +01:00
parent 49341156b6
commit 605b429760
2 changed files with 11 additions and 10 deletions
+2 -1
View File
@@ -94,8 +94,9 @@ class Face:
T4 = np.array([[1, 0, cx], [0, 1, cy], [0, 0, 1]])
N = N @ T4 @ S @ T3
crop = cv2.warpAffine(self.image.numpy(), N, (size, size))
maskedcrop = cv2.warpAffine(self.img.numpy(), N, (size, size))
return N, crop
return N, crop, maskedcrop
def detect_faces(img, threshold):
img = pad_to_stride(img, stride=32)