mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 19:45:21 +00:00
facial analysis timeit
This commit is contained in:
parent
b7ba13f273
commit
efc8221d32
@ -53,7 +53,7 @@ deepface_result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "DeepFace
|
||||
|
||||
VGG-Face has the highest accuracy score but it is not convenient for real time studies because of its complex structure. FaceNet is a complex model as well. On the other hand, OpenFace has a close accuracy score but it performs the fastest. That's why, OpenFace is much more convenient for real time studies.
|
||||
|
||||
The complexity of each face recognition model is different. Mean ± std. dev. of 7 runs for each model in my experiments is illustrated in the following table.
|
||||
The complexity of each face recognition model is different. Mean ± std. dev. of 7 runs on CPU for each model in my experiments is illustrated in the following table.
|
||||
|
||||
| Model | VGG-Face | OpenFace | Google FaceNet | Facebook DeepFace |
|
||||
| --- | --- | --- | --- | --- |
|
||||
@ -88,6 +88,13 @@ print("Race: ", demography["dominant_race"])
|
||||
|
||||
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-2.jpg" width="95%" height="95%"></p>
|
||||
|
||||
Model building and prediction times are different for those facial analysis models. Mean ± std. dev. of 7 runs on CPU for each model in my experiments is illustrated in the following table.
|
||||
|
||||
| Model | Emotion | Age | Gender | Race |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Building | 243 ms ± 15.2 ms | 2.25 s ± 34.9 | 2.25 s ± 90.9 ms | 2.23 s ± 68.6 ms |
|
||||
| Prediction | 389 ms ± 11.4 ms | 524 ms ± 16.1 ms | 516 ms ± 10.8 ms | 493 ms ± 20.3 ms |
|
||||
|
||||
# Streaming and Real Time Analysis
|
||||
|
||||
You can run deepface for real time videos as well. Calling stream function under the DeepFace interface will access your webcam and apply both face recognition and facial attribute analysis. Stream function expects a database folder including face images. VGG-Face is the default face recognition model and cosine similarity is the default distance metric similar to verify function. The function starts to analyze if it can focus a face sequantially 5 frames. Then, it shows results 5 seconds.
|
||||
|
Loading…
x
Reference in New Issue
Block a user