espressif / esp-who

Face detection and recognition framework
Other
1.69k stars 468 forks source link

Results from testing face recognition with photographs #17

Closed xgarb closed 5 years ago

xgarb commented 5 years ago

I've been testing the camera_web_server example using the AI-Thinker ESP32-CAM.

Using a collection of photographs the face detection works really well. The face recognition part isn't so successful. I've gone through a set of 10 photographs and 'enrolled' them. When I run through the same photos, starting at the point linked in the video below, the system doesn't recognize many of them.

https://youtu.be/dDyx15JrrcA?t=230

0 man isn't recognized 1 woman mistaken for 4 or 6 2 woman not recognized 3 man not recognized 4 Correct 5 Thinks three different people 6 Correct 7 8 and 9 wrong people.

You can see the whole process of enrolling if you jump to the start of the video.

Is this just because I'm using photographs and the algorithm is optimized for live faces?

xgarb commented 5 years ago

I realised that I was over-writing previous recognitions with new people on the video above so I tried again:

https://youtu.be/EVCXtY92x6Y

It works OK to start and then it thinks all the women are Julia Roberts

XiaochaoGONG commented 5 years ago

Hi, can you increase the FACE_REC_THRESHOLD to 0.65 and have a try?

https://github.com/espressif/esp-face/blob/master/face_recognition/include/fr_forward.h#L15

In your project, it may be in esp-who/components/esp-face/include/fr_forward.h

xgarb commented 5 years ago

Hi,

It seems better: https://youtu.be/zJla1XgWh1o?t=40

What are the 5 samples it does for each person? Would this work better with a real moving person?

It forgets the first person on the video. Is this a capacity problem?

XiaochaoGONG commented 5 years ago

It's a demo, you can modify the number as you want https://github.com/espressif/esp-who/blob/be4f0e13a2f099d7ebc75dc0395940271d8bfc7b/examples/single_chip/camera_web_server/main/app_httpd.c#L38 The samples are used to better reduce the impact of some abstract images for identification.

xgarb commented 5 years ago

I've put up another video showing various tests.

https://www.youtube.com/watch?v=gZgGniTLCiU

So far I've not had much success recognizing the same people in different photographs. Maybe this is something that would work better with live people rather than photographs. I'll test that at some point.

XiaochaoGONG commented 5 years ago

Thank you for that testing ! There is a trade-off between recognizing the registered people in different environment and distinguishing the different people. We will still work on that to improve the performance.

xgarb commented 5 years ago

If you want to send me an ESP-EYE board I can do another Youtube video and installation blog post.

Looks like Ai-Thinker have stopped making the ESP32-CAM.

XiaochaoGONG commented 5 years ago

Could you post your email address so that I can contact with you

xgarb commented 5 years ago

If you send an email to gitespwho at firemouth dot net I'll reply to it with my normal email. Thanks,