From 6ce02b050e7498e48f8c60d645d053daa6c07041 Mon Sep 17 00:00:00 2001 From: Matias Grynberg Portnoy <43388395+mgp123@users.noreply.github.com> Date: Sun, 28 Apr 2024 15:10:32 -0300 Subject: [PATCH] bug-fix .size instead of size() --- models/utils/detect_face.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/utils/detect_face.py b/models/utils/detect_face.py index f5db6a40..ff5d514d 100644 --- a/models/utils/detect_face.py +++ b/models/utils/detect_face.py @@ -35,7 +35,7 @@ def detect_face(imgs, minsize, pnet, rnet, onet, threshold, factor, device): else: if not isinstance(imgs, (list, tuple)): imgs = [imgs] - if any(img.size != imgs[0].size for img in imgs): + if any(img.size() != imgs[0].size() for img in imgs): raise Exception("MTCNN batch processing only compatible with equal-dimension images.") imgs = np.stack([np.uint8(img) for img in imgs]) imgs = torch.as_tensor(imgs.copy(), device=device)