mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
test batch extract faces
This commit is contained in:
parent
0ad7c57abf
commit
b38e95c407
@ -79,6 +79,20 @@ def test_different_detectors():
|
|||||||
logger.info(f"✅ extract_faces for {detector} backend test is done")
|
logger.info(f"✅ extract_faces for {detector} backend test is done")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("detector_backend", [
|
||||||
|
# "YOLO",
|
||||||
|
"opencv",
|
||||||
|
])
|
||||||
|
def test_batch_extract_faces(detector_backend):
|
||||||
|
img_paths = [
|
||||||
|
"dataset/img2.jpg",
|
||||||
|
"dataset/img3.jpg",
|
||||||
|
"dataset/img11.jpg",
|
||||||
|
]
|
||||||
|
img_objs = DeepFace.extract_faces(img_path=img_paths, detector_backend=detector_backend)
|
||||||
|
assert len(img_objs) == 3
|
||||||
|
|
||||||
|
|
||||||
def test_backends_for_enforced_detection_with_non_facial_inputs():
|
def test_backends_for_enforced_detection_with_non_facial_inputs():
|
||||||
black_img = np.zeros([224, 224, 3])
|
black_img = np.zeros([224, 224, 3])
|
||||||
for detector in detectors:
|
for detector in detectors:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user