Customize Blurring

Make the default anonymization method visually more appealing and accurate.

Celantur Container can be customized to make default anonymization visually more appealing.

There are two sets of parameters that the user can tweak to customize the output. The default settings of these parameters were carefully selected to never harm the quality of anonymization, but that means that in certain scenarios (for example, low resolution images) these protective anonymization measures might harm visual appearance of the final result. This might become an issue if the anonymized data is publicly available.

Gradual blur

Currently, gradual anonymization works with license plates and faces. Each of the anonymized objects has two parameters that are responsible for gradual blur.

In the image 3 bounding boxes around the face are depicted: outer, inner, and actual bounding boxes. Outside the outer bounding box nothing is blurred and inside the inner bounding box the blurring is maximal. Between these two boxes, the transition from no blur to maximum blur happens linearly. The location of outer and inner bounding boxes is determined as relative difference in bounding box size with respect to the actual bounding box. These differences are controlled by two parameters: --<object>-anonymization-gradient-start to control the outer boundary box and --<object>-anonymization-gradient-stop to control the inner boundary box. The total list of the parameters that are currently supported:

  • --face-anonymization-gradient-start x

  • --face-anonymization-gradient-stop x

  • --license-plate-anonymization-gradient-start x

  • --license-plate-anonymization-gradient-stop x

For example, if one sets parameter --face-anonymization-gradient-start 0.5, it means that the gradual blurring will start at 50% outside the actual bounding box. If one then sets --face-anonymization-gradient-stop 0.2 the anonymization will not be maximal in the bounding box itself, but only inside 80% of the remaining bounding box. The default value of this parameter is set to 0, because it is not safe to change it (anonymization might not be perfect if this parameter is set to anything but the default value).

ParameterDefault value

face-anonymization-gradient-start

0.3

face-anonymization-gradient-stop

0.0

license-plate-anonymization-gradient-start

0.3

license-plate-anonymization-gradient-stop

0.0

Kernel size

Another tool that exists to improve anonymization and control its visual appearance is --kernel-size-<anonymized_object>. The kernel size determines the size of the neighborhood that the anonymized value is calculated from. The larger the kernel size, the more pixels will be included in the neighborhood, and the greater the blur/pixelate effect will be. A smaller kernel size will result in more preservation of details. The full list of kernel size parameters goes as follows:

  • --kernel-size-face x

  • --kernel-size-person x

  • --kernel-size-license-plate x

  • --kernel-size-vehicle x

Kernel size can be set up in either relative or absolute values. Normally, default absolute kernel size values are enough, however, in certain scenarios relative values might become handy. Relative values are in the range 0..1 and determine the kernel size for anonymized objects as relative to the object size. This can be useful in the following scenarios:

  • Objects in the images are often either very small (distant) or very large (close). This setting guarantees that the anonymization will look similar on both types of objects.

  • In videos, this setting is very effective to combat flickering of anonymized objects and therefore is enabled by default.

ParameterDefault value imageDefault value video

kernel-size-face

0.35

0.35

kernel-size-person

91

91

kernel-size-license-plate

0.5

0.5

kernel-size-vehicle

61

0.15

Last updated