Hello. My curiosity led me to test an API that claims to do face detection and facial recognition.
Exploring a little more with my esp32-cam I took three pictures of my face keeping the same position, same lighting, etc.
The API responded in JSON:
{"results":[{"status":{"code":"ok","message":"Success"},"name":"esp32-cam.jpg","md5":"9d69b87ca4f638f685f85cd70f4feccf","entities":[{"kind":"objects","name":"face-detector","objects":[{"box":[0.26976995218709976,0.12491494323036217,0.5152465488728709,0.6869953984971613],"entities":[{"kind":"classes","name":"face","classes":{"face":0.9388834238052368}},{"kind":"namedpoints","name":"face-landmarks","namedpoints":{"left-eye":[0.37281060695648194,0.3989172077178955],"right-eye":[0.5729453086853027,0.3699918079376221],"nose-tip":[0.451428747177124,0.5087626254558564],"mouth-left-corner":[0.435301628112793,0.6622309684753418],"mouth-right-corner":[0.5814676094055176,0.6382978916168214]}}]}]}]}]}
16168214]}
{"results":[{"status":{"code":"ok","message":"Success"},"name":"esp32-cam.jpg","md5":"b22d28c4ec09ea54b05e689564b2f130","entities":[{"kind":"objects","name":"face-detector","objects":[{"box":[0.21273358143976484,0.19003698955126802,0.5770508424915641,0.7694011233220854],"entities":[{"kind":"classes","name":"face","classes":{"face":0.9846720099449158}},{"kind":"namedpoints","name":"face-landmarks","namedpoints":{"left-eye":[0.3557454586029053,0.4791991996765136],"right-eye":[0.5900873565673829,0.47020770072937007],"nose-tip":[0.4579240131378174,0.6371343088150024],"mouth-left-corner":[0.3957681941986084,0.7933987998962402],"mouth-right-corner":[0.5702394294738771,0.7867423629760741]}}]}]}]}]}
29760741]}
{"results":[{"status":{"code":"ok","message":"Success"},"name":"esp32-cam.jpg","md5":"0095a1904e0e979483c53d69ed40b3e9","entities":[{"kind":"objects","name":"face-detector","objects":[{"box":[0.2333206442123697,0.13479227484942086,0.5248686450469403,0.6998248600625872],"entities":[{"kind":"classes","name":"face","classes":{"face":0.9846428632736206}},{"kind":"namedpoints","name":"face-landmarks","namedpoints":{"left-eye":[0.3545965671539307,0.4072417259216308],"right-eye":[0.5614657402038574,0.3929729652404785],"nose-tip":[0.43846559524536133,0.5404448652267456],"mouth-left-corner":[0.3985099267959595,0.681445655822754],"mouth-right-corner":[0.549906005859375,0.6702262496948242]}}]}]}]}]}
96948242]}
But in all fields the data is different. How do you know it's the same person?
I try to answer this question by imagining that in the code, in the arduino for example, I will store the 4 fields of values ββfor the tip of the nose, left and right corner of the mouth, etc. and create an average and create a String to then be compared with the next readings.
Is this how it's done?
Because I noticed very different values ββin the three API responses. Unless the variation is minimal and it is this minimal variation that will differentiate one person from another.
Anyway, does anyone have a piece of code that I can test here, turn on the espcam flash led only if the face is mine.
Thanks