deface icon indicating copy to clipboard operation
deface copied to clipboard

Parameter to limit the number of faces in the scene

Open OndraZizka opened this issue 3 years ago • 2 comments

Sometimes there's a scene with a fixed number of people.
So there is an assumption they each have 1 face.

deface --facesCount=3

This would reduce the blurred regions to just the 3 top candidates.

By having such parameter, the false positives could be reduced.

OndraZizka avatar Mar 03 '21 02:03 OndraZizka

Good idea :+1: A maximum setting would be easy to implement, something like:

  • --max-faces=k: Face detection candidates are sorted by their scores and only the top k candidates are selected. Does nothing if there are less than k candidates.

Instead of implementing a setting for the or exact number of expected faces (if such a need arises), I would rather recommend setting the --thresh to a very low number (0.1 or 0.05 - smaller numbers slow down inference too much) and setting --max-faces to the expected number of hits.

Would you like to implement this? Otherwise I'll work on it myself in the near future.

mdraw avatar Apr 06 '21 17:04 mdraw

Yes, exactly. I could have a look at implementing it, but first around autumn this year. So, if "near future" is before that, you'll be quicker. Thanks!

OndraZizka avatar Jun 14 '21 00:06 OndraZizka