CropFace now returns crop_sized black crops when no face is detected.

This commit is contained in:
David Chatel
2024-12-08 12:27:26 +01:00
parent f1230284b1
commit 3391fb9537
+1 -1
View File
@@ -176,7 +176,7 @@ class SoftErosion:
soft_m = np.minimum(dist / size, 1)
soft_m = torch.from_numpy(soft_m)
soft_mask.append(soft_m)
soft_mask = torch.from_numpy(np.array(soft_mask))
soft_mask = torch.from_numpy(np.array(soft_mask)).type(torch.FloatTensor)
return (soft_mask, )
class ApplyMask: