Anonymize (blurring faces and license plates) before upload

I succeeded to make this tool work under Debian and did some tests with captured sequences. My experience, mainly with plate detection as this is easier to verify than face detection:

  • Face and plate detection seems to work very well. However, with the default parameters, some plates are not detected. Lowering the detection thresholds from 0.3 to 0.1 results in close to 100% detection rate. In several hundred photos, I did not find one where a plate or a face has not been detected.
  • In some rare cases, a plate is detected with a bad position and the the bounding rectangle does not or not fully cover the plate. I suppose that this is a bug in the tool.
  • With the default blurring parameters ( --obfuscation-kernel 21,2,9), large size plates in the foreground are not sufficiently blurred. The size of the gaussian kernel must be increased significantly to get good results. I got good results with --obfuscation-kernel 47,1,9
  • Surprisingly (for me), the processing performance of the tool depends mainly on the blurring parameters, especially on the the gaussian kernel size value. On my system, processing of a picture with the default values takes about one minute. With --obfuscation-kernel 47,1,9 it takes up to 3 minutes, with --obfuscation-kernel 1,1,1 it takes less than 10 seconds (without any blurring, of course).

To get a decent processing time I set up this workflow:

  • Process the images with anonymizer --obfuscation-kernel 1,0,1
  • Throw away the output images and keep the JSON files
  • Blur the original images with imagemagick -gaussian-blur using the rectangle coordinates from the JSON files

This is sufficiently fast for my purpose. The blurred areas have sharp borders which does not bother me. There is probably a way to get smooth transitions with imagemagick.

1 Like