A million home photos: faces, faces, faces

So, all the photos are arranged in folders and it became quick and convenient to find photos of New Years or birthdays. Vacation photos can also be found relatively quickly, but I wanted more. Namely, search by people and not just by people, but by a set of people, for example, to find all joint photos of children or photos with grandmother, etc.





So I decided to delve a little deeper into the so-called Face Recognition .





Is it that simple?

, , , : , , , , , , ; ( , , ) « ». , . , ( , , ..). , . ( ).





, , , . , , « » : , ., , , , , opensource.





, , , , .





.





?

, , , , , , . 





, , , , , .





« » , - . , - .





, , :





https://azure.microsoft.com/en-us/services/cognitive-services/face/





https://cloud.google.com/vision/docs/face-tutorial





https://aws.amazon.com/rekognition/





, . , , .





CPU -> GPU

, , CNN (. ) CPU. 





1000 , . , , , , .





, , , GPU. , Face Recognition . , , GeForce GTX 1050 Ti. , , … ! , , . .





: CUD. … CUD? , , , GPU .





— ( ), .





, , , CPU GPU , .





:





  1. (face detection)





  2. (landmarks detection)





  3. (face encoding)





  4. (face matching)





, :





  • (HOG).





  • (CNN).





HOG , CPU, .





CNN GPU, .





face_recognition ( , , . ). dlib.





8 , : «» , , , , 4 GB . 1000 (max_image_size



, ), , ( , , , )





. — , , , . , .





, , , .





«» : face_recognition ( dlib), face-alignment.





, -, , , . «». «» , , «». :





, - .





, « » , 10000 / … 80%, , . , , , , .





. … . , , . , , . , , , , .





, , , -, , , -, , , . , , , , .





( deepface) , ( face_recogintion, dlib).









( ) , . . . , , .





«» .





.





( , 10) , , . , /, , . , , , . , - , « » (weak match) , , .





«-»

, , , , . . , , .





, . , ( - ) , , . , - , ( ) , frontal.cfg .





?

, , , , ? , , , , , , - . , .





« »: , , , .





-, (max_video_frames



) , , . -, , (video_frames_step



) , . , , (min_video_face_count



) , , .





( ), . , . , , , , , , , , , .





- , .









, , README .





. :





«Recognition» -> «Add new files…»





( , )





:





( ) , :





, , ( 0_face.jpg). 





, , , . , , (trash).





, , , . «Bad encoding», , .





: «Match» -> «Rematch folder…».





, «weak», .. , . . , , Shift Ctrl. 





«weak» «unknown» .





« » , , -, ( ), -,





.









( , ).





, ?

? , . ! ? Plex, , . , API , , , sqlite . . ( Plex, , - , plexdb.py).





. , .





face-rec-plexsync -a set_tags







! !





, - Plex . , ( , .. ). , , . , , . (Up: , - )





, , 2020





face-rec-db -a find_files_by_names -f 2020 -n ,







, , -





| xargs -I{} ln -s {} /mnt/multimedia/query/ 







, , .





, - , «» , , plexsync.py, .





, , , , , . ( ?). Plex. ..





.





, , «», - :





  • . , , .





  • : , .





  • , : , , ..





  • , : , , , , .





Sometimes it seems to me, looking back and assessing the time spent, that it would be easier to pay for some cloud system, such as Google photos, which provides similar functionality in some form, but, firstly, local storage (with backup, itself itself) is safer and faster, and, secondly, I got invaluable experience and this is the main thing!





Thanks for attention!








All Articles