Privacy Protection (License Plates)

Overview

Posting images or videos of our vehicles online might lead to others misusing our license plate numbers to reveal our personal information. Our solution performs license plate anonymization, and can also be used to comply with the General Data Protection Regulation (GDPR) or other data privacy laws.

../_images/privacy_protection_license_plates.gif

Our solution automatically detects and blurs vehicles’ license plates. This is explained in the How It Works section.

Demo

To try our solution on your own computer, install and run PeekingDuck with the configuration file privacy_protection_license_plates.yml as shown:

Terminal Session

[~user] > peekingduck run --config_path <path/to/privacy_protection_license_plates.yml>

How It Works

There are two main components to license plate anonymization:

  1. License plate detection, and

  2. License plate de-identification.

1. License Plate Detection

We use open-source object detection models under the YOLOv4 family to identify the locations of the license plates in an image/video feed. Specifically, we offer the YOLOv4-tiny model, which is faster, and the YOLOv4 model, which provides higher accuracy. The locations of detected license plates are returned as an array of coordinates in the form \([x_1, y_1, x_2, y_2]\), where \((x_1, y_1)\) is the top left corner of the bounding box, and \((x_2, y_2)\) is the bottom right. These are used to form the bounding box of each license plate detected. For more information on how to adjust the license plate detector node, check out the license plate detector configurable parameters.

2. License Plate De-Identification

To perform license plate de-identification, the areas bounded by the bounding boxes are blurred using a Gaussian blur function.

Nodes Used

These are the nodes used in the earlier demo (also in privacy_protection_license_plates.yml):

nodes:
- input.visual:
    source: <path/to/video with cars>
- model.yolo_license_plate
- draw.blur_bbox
- output.screen

1. License Plate Detection Node

By default, model.yolo_license_plate uses the v4 model type to detect license plates. If faster inference speed is required, the v4tiny model type can be used instead.

2. License Plate De-Identification Nodes

You can choose to mosaic or blur the detected license plate using the draw.mosaic_bbox or draw.blur_bbox node in the run config declaration.

De-identification effect comparison

De-identification with mosaic (left) and blur (right).

3. Adjusting Nodes

With regard to the YOLOv4 model, some common node configurations that you might want to adjust are:

  • score_threshold: The bounding boxes with confidence score less than the specified score threshold are discarded. (default = 0.1)

  • iou_threshold: The overlapping bounding boxes above the specified Intersection over Union (IoU) threshold are discarded. (default = 0.3)

In addition, some common node behaviors that you might want to adjust for the dabble.mosaic_bbox and dabble.blur_bbox nodes are:

  • mosaic_level: Defines the resolution of a mosaic filter (\(width \times height\)); the value corresponds to the number of rows and columns used to create a mosaic. (default = 7) For example, the default value creates a \(7 \times 7\) mosaic filter. Increasing the number increases the intensity of pixelization over an area.

  • blur_level: Defines the standard deviation of the Gaussian kernel used in the Gaussian filter. (default = 50) The higher the blur level, the greater the blur intensity.