From 4919e4e931db0edb219ba5086b3c10b8af750631 Mon Sep 17 00:00:00 2001 From: cubiq Date: Tue, 8 Oct 2024 14:32:21 +0200 Subject: [PATCH] fix small bug when no face is detected --- faceanalysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faceanalysis.py b/faceanalysis.py index b6d1e6a..04d0322 100644 --- a/faceanalysis.py +++ b/faceanalysis.py @@ -702,7 +702,7 @@ class FaceWarp: if shape_from is None or shape_to is None: print(f"\033[96mNo landmarks detected at frame {i}\033[0m") - img = img_to.unsqueeze(0) + img = image_to[i].unsqueeze(0) mask = torch.zeros_like(img)[:,:,:1] result_image.append(img) result_mask.append(mask)