expand facial area tests

This commit is contained in:
Sefik Ilkin Serengil 2024-03-02 20:43:02 +00:00
parent c61cb6faf2
commit 20070a3f97

View File

@ -25,6 +25,7 @@ detector_backends = [
"ssd",
"dlib",
"mtcnn",
"fastmtcnn",
# "mediapipe", # crashed in mac
"retinaface",
"yunet",
@ -56,9 +57,9 @@ for df in dfs:
logger.info(df)
# img_paths = ["dataset/img11.jpg", "dataset/img11_reflection.jpg", "dataset/couple.jpg"]
img_paths = ["dataset/img11.jpg"]
expand_areas = [0, 25]
img_paths = ["dataset/img11.jpg", "dataset/img11_reflection.jpg"]
for expand_area in expand_areas:
for img_path in img_paths:
# extract faces
for detector_backend in detector_backends:
@ -66,8 +67,7 @@ for img_path in img_paths:
img_path=img_path,
detector_backend=detector_backend,
align=True,
# expand_percentage=10,
# target_size=None,
expand_percentage=expand_area,
)
for face_obj in face_objs:
face = face_obj["face"]