face recognition test

This commit is contained in:
Sefik Ilkin Serengil 2020-03-23 09:04:29 +03:00 committed by GitHub
parent 626190cb5f
commit caf29b6567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,17 +17,7 @@ result = DeepFace.verify("img1.jpg", "img2.jpg")
print("Is verified: ", result["verified"])
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/tests/dataset/test-case-2.jpg" width="50%" height="50%"></p>
```json
{
"verified": true,
"distance": 0.25638097524642944,
"max_threshold_to_verify": 0.40,
"model": "VGG-Face",
"similarity_metric": "cosine"
}
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/tests/dataset/test-case-4.jpg" width="95%" height="95%"></p>
Each call of verification function builds a face recognition model from scratch and this is a costly operation. If you are going to verify multiple faces sequentially, then you should pass an array of faces to verification function to speed the operation up. In this way, complex face recognition models will be built once.