mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Add logging to test case.
This commit is contained in:
parent
5d4146b248
commit
a05c2ea813
@ -84,6 +84,12 @@ def test_max_faces():
|
|||||||
|
|
||||||
|
|
||||||
def test_represent_detector_backend():
|
def test_represent_detector_backend():
|
||||||
|
"""
|
||||||
|
There shouldn't be a difference between:
|
||||||
|
- Using a detector backend provided by `represent`
|
||||||
|
- Manually calling a detector backend, then calling `represent`.
|
||||||
|
"""
|
||||||
|
|
||||||
# Results using a detection backend.
|
# Results using a detection backend.
|
||||||
results_1 = DeepFace.represent(img_path="dataset/img1.jpg")
|
results_1 = DeepFace.represent(img_path="dataset/img1.jpg")
|
||||||
assert len(results_1) == 1
|
assert len(results_1) == 1
|
||||||
@ -101,3 +107,4 @@ def test_represent_detector_backend():
|
|||||||
embedding_1 = results_1[0]['embedding']
|
embedding_1 = results_1[0]['embedding']
|
||||||
embedding_2 = results_2[0]['embedding']
|
embedding_2 = results_2[0]['embedding']
|
||||||
assert embedding_1 == embedding_2
|
assert embedding_1 == embedding_2
|
||||||
|
logger.info("✅ test represent function for consistent output.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user