ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
52.94k stars 13.44k forks source link

How print distance in example face_recognition_knn.py? #785

Open arpsyapathy opened 5 years ago

arpsyapathy commented 5 years ago

Hello!

I want use example "face_recognition_knn.py" https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py In result i have:

Training KNN classifier...
Training complete!
Looking for faces in _XG0JZpUZ54.jpg
- Found 26532610 at (242, 201)

How i can return name (26532610) and distace from input image(XG0JZpUZ54.jpg)?

Like this:

Training KNN classifier...
Training complete!
Looking for faces in _XG0JZpUZ54.jpg
- Found 26532610 with distance 0.967866

Thank you advance

xSNYPSx commented 5 years ago

Interested in it too