center_and_crop_rescale seems to be returning unexpected array structure, made minor adjustment.

This commit is contained in:
nomcycle
2024-07-22 22:17:47 -06:00
parent 565a8640d5
commit 87feeea77b
+1 -1
View File
@@ -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)