mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
unit tests for detector backends
This commit is contained in:
parent
b9abfb9c00
commit
16f1ac0d48
@ -1,5 +1,7 @@
|
|||||||
from deepface import DeepFace
|
from deepface import DeepFace
|
||||||
|
from deepface.commons import functions
|
||||||
import json
|
import json
|
||||||
|
import time
|
||||||
|
|
||||||
import os
|
import os
|
||||||
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
|
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
|
||||||
@ -213,3 +215,20 @@ print(df)
|
|||||||
|
|
||||||
#-----------------------------------
|
#-----------------------------------
|
||||||
print("--------------------------")
|
print("--------------------------")
|
||||||
|
|
||||||
|
print("Different face detector backends")
|
||||||
|
|
||||||
|
backends = ['opencv', 'ssd', 'dlib', 'mtcnn']
|
||||||
|
|
||||||
|
for backend in backends:
|
||||||
|
|
||||||
|
tic = time.time()
|
||||||
|
|
||||||
|
processed_img = functions.preprocess_face(img = "dataset/img11.jpg", detector_backend = backend)
|
||||||
|
|
||||||
|
toc = time.time()
|
||||||
|
|
||||||
|
print("Backend ", backend, " is done in ", toc-tic," seconds")
|
||||||
|
|
||||||
|
#-----------------------------------
|
||||||
|
print("--------------------------")
|
Loading…
x
Reference in New Issue
Block a user