retuning regions as numpy int 32 was causing error in api

This commit is contained in:
Sefik Ilkin Serengil 2024-02-04 10:36:00 +00:00
parent 45e991f9f3
commit 08131731c5

View File

@ -167,10 +167,10 @@ def extract_faces(
{ {
"face": img_pixels[:, :, ::-1] if human_readable is True else img_pixels, "face": img_pixels[:, :, ::-1] if human_readable is True else img_pixels,
"facial_area": { "facial_area": {
"x": current_region.x, "x": int(current_region.x),
"y": current_region.y, "y": int(current_region.y),
"w": current_region.w, "w": int(current_region.w),
"h": current_region.h, "h": int(current_region.h),
}, },
"confidence": confidence, "confidence": confidence,
} }