cpu and gpu deformer
This commit is contained in:
Rafał Tłuchowski
2025-01-26 13:06:12 +01:00
parent aaca513c6f
commit 1e248e60f7
+1 -2
View File
@@ -10,7 +10,7 @@ class GPUDeformer:
"""
@staticmethod
def warp_face(image, source_landmarks, target_landmarks, device='cuda'):
def warp_face(image, source_landmarks, target_landmarks):
"""
Warp the face image using parallel GPU processing with reverse mapping.
Now includes boundary triangles for complete image warping.
@@ -19,7 +19,6 @@ class GPUDeformer:
image: Input PIL Image or numpy array
source_landmarks: Detected face landmarks
target_landmarks: Target base landmarks
device: 'cuda' or 'cpu' (default: 'cuda')
Returns:
PIL Image: Warped image