From 87feeea77b86adf22903cddecb68e38753b7d4e1 Mon Sep 17 00:00:00 2001 From: nomcycle Date: Mon, 22 Jul 2024 22:17:47 -0600 Subject: [PATCH] center_and_crop_rescale seems to be returning unexpected array structure, made minor adjustment. --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 2cb01f8..e82a89a 100644 --- a/test.py +++ b/test.py @@ -36,7 +36,7 @@ def main(): # Crop and save each detected face cropped_imgs = rf.center_and_crop_rescale(img_raw, dets) - for index, cropped_img in enumerate(cropped_imgs): + for index, cropped_img in enumerate(cropped_imgs[0]): # Save the final image os.makedirs(output_dir, exist_ok=True) cv2.imwrite(os.path.join(output_dir, f"cropped_face_{index}.jpg"), cropped_img)