• DepthAI
  • Face Recognition Limitations

Hi Everyone,
I was trying the face-recognition program in depthai-experiments repo.

I realised that the program crashes when we have a 4th face getting in the frame. I am trying to understand the reason for the limitation.

Basically I have 2 questions.

Is it safe to assume that the cause of this limitation is;

  1. The model created by InsightFace
  2. Intel Movidius Myriad X VPU
  3. Both

To be able to uniquely identify more faces would I need to use either a better performing model, a more powerful VPU or both?

Cheers!
Neil

  • erik replied to this.

    Hi neil ,
    This isn't limitation of the model - see How demo works here. So the model (arcface, see here) just gets one face frame at a time, so if you would have 100 faces in the frame it would (in theory) send each of these 100 faces one at a time to the model.

    So the limitation is likely in the pipeline implementation coupled with VPU performance. As with eg. 100 faces, you will need to do a lot of inferences (one after another) which takes some time. So you could configure the pipeline to be able to handle 5 faces as well (probably by configuring queue/pool sizes..), but it would limit the FPS. Another approach would be to edit the model itself so it would allow multiple faces at once, perhaps performance would be better. Another approach would be to run face recognition model on the host computer.

    Thoughts?
    Thanks, Erik

      Hi erik ,

      Thanks very much for the pointers. I am relatively new in the field. I was wondering if you could point me to the right direction on how to edit a neural network model?

      PS: Increasing the pool/queue size didn't make any difference. The program freezes when a forth face gets into the frame.
      Many thanks!

      • erik replied to this.

        Hi neil ,
        I am not that familiar with NNs and have never done it myself (so it's probably best to google this), but there are some tools (eg. onnx-processing-tools) that allow you to change/edit trained model.
        Thanks, Erik

        I ended up running the face-rec model on the host machine to solve this problem. Which handle the task fine given that it is a single board computer.
        I learned a lot in the process, thanks again for the guidance @erik

          2 months later

          neil Could you please specify the single board computer i.e., Raspberry Pi or NVIDIA Jetson.

          erik Can we solve this problem by running facial recognition model arc-face on Intel NCS-2 along-side with OAK-D.

          • erik replied to this.

            Hi SamiUddin , That would be possible as well - NCS2 or any kind of other GPU/AI accelerator for the recognition part.

            a year later

            I get what you mean about face recognition limitations. While it seems like magic, it does have its flaws. Sometimes, it needs help with different lighting or when someone has a hat or glasses on. It can also misidentify people, which is a bit concerning for privacy. Plus, not everyone feels comfortable with their face being scanned, and that's valid. I think it’s essential to balance using technology and respecting people's privacy. I prefer using an identity validation service, which feels more secure and reliable. It seems like a better way to verify who you are without the risks of face recognition.