exadel-inc / CompreFace

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

Use 4K cameras for better facial recognition? #990

Open atv2016 opened 1 year ago

atv2016 commented 1 year ago

Even though i use arcnet-cpu, and det-threshold of 98, i still get mislabeled faces outside. Partly this might be from needing more pictures (have about 80-100 per person, from different angles/light/etc) and partly because the resolution is to low (using 1080P) when viewed from far away.

Seriously thinking about upgrading to 4K cameras. Going from substream to main stream was such a big difference, and my inference speed event went down to 10ms on the coral TPU.

Evgl1 commented 1 year ago

Hi. I have never received false recognition at the threshold of 0.98. I did this: 1 photo per person in the database. In good lighting, without shadows and glare, the shoulders should be visible. A look into the camera. Behind the person is a plain, light, simple background. Photos on a good iPhone camera without effects. I used Mobile Net. The recognition camera is set to good quality. There should be good lighting for better recognition. At a distance of several meters, I recognized without problems. There were a couple of false ones when there were photos of poor quality in the database... The higher the resolution of the camera, the more it recognizes from a greater distance. you can write in a telegram, I can tell you more

atv2016 commented 1 year ago

Interesting. Might have to try that, just one pic per person. Yes, i'm either going to point my camera downwards so it doesn't pick up everyone from the street anymore, and 'force' a good resolution, or get 4K cameras (albeit that would be an expensive upgrade, and no idea if i can run 6 of those at mainstream in frigate).

At 98% and with arcnet i do get good results, and unknowns, but every now and then it will still mislabel.

Maybe i will just get a 4 channel set and see how they perform, i have a feeling a lot of this mainly happen because of low resolution on recognition (because it's too far away, which 4K would help with. Same thing happened when i moved det_threshold to 98, it would not accept low res faces for recognition anymore, any blurry pics were discarded).

bagobones commented 1 year ago

I am using double-take in front of compreface, I had to set min_area: 1750 in double-take to stop feeding horrible low pixel blobs into detection. I can get away with a det_prob_threshold: 0.97 in compreface with this..

I think compreface needs a similar min area.. If you go crop your face areas and look at the actual face yourself it gets really hard once you are below a certain threshold of pixels on the face alone.. I found that sure I could recognize someone based on hair and body no problem but the faces are a mess past a certain threshold.

All training photos should be as high quality / pixel count as you can get.. I rarely train from anything other than photos from my iPhone etc, cropped a bit.. security footage is often blurred and the motion blur / soft your training photos the more broad the matches tend to be.

Going back to the original question.. You are going to need "more pixel density" to capture faces at a distance.. 1080p will probably work at a doorbell cam for example because the person will be so close and filling the frame.. If you have a high mounted camera pointed down a hallway or outside.. You will need more resolution for the faces to even be distinguishable.