exadel-inc / CompreFace

Leading free and open-source face recognition system
https://exadel.com/accelerator-showcase/compreface/
Apache License 2.0
5.69k stars 775 forks source link

face recognition error #1212

Open zhouyong297137551 opened 11 months ago

zhouyong297137551 commented 11 months ago

I created an actor database with hundreds of people and used a TV drama to extract faces for recognition. When I did face recognition on continuous frames of the same person, I found that the first few frames were correctly recognized, but then a mouth movement was recognized as another character, and the similarity was above 0.99. I set the parameter det_prob_threshold to 0.8 when creating the template and performing face recognition. I also tried adjusting it from 0.5 to 0.95, but the problem still persisted. Are there any other parameters that can be adjusted?

loyal2dagame commented 11 months ago

I'm experiencing a similar result. I enrolled the faces of over 1500 children age 1 - 6. Then then randomly chose images of children of about the same age off of google. Compreface gives me high probability of match, above .97, for every random face off the internet that I try. The API works great it's unfortunate that the it doesn't work for the intended purpose. Is there something I'm missing?

pospielov commented 11 months ago

@zhouyong297137551 I have two suggestions:

  1. Try to use one of the custom builds. They show better accuracy: https://github.com/exadel-inc/CompreFace/tree/master/custom-builds
  2. When you define face collection, try to use the best possible photo
  3. When you recognize a person, choose the best possible frame - without blurring, when the face looks straight to the camera, etc.
  4. Finally, as I understand, the actor database is huge, but the actual number of actors on TV is usually not very high. So you can compare frames with each other to understand if this is the same person. Then, choose several best frames. Then, run facial recognition on the best frames.

@loyal2dagame Here is where the problem - face recognition accuracy depends on the original dataset used to train the neural network. For example, if the dataset didn't include enough Asians, it would work poorly on Asians. This is why I usually suggest using custom builds, as they use datasets with more diversity. But here is the problem - usually, datasets don't include children, as they are protected much more strictly than adults. This is a reason why face recognition systems work poorly on children.