BLUR-38: Add different shape for blurring faces, to make them look aesthetic.

This commit is contained in:
Gosia 2023-12-19 10:55:55 +01:00
parent b27f4930db
commit 6d2b939987

View File

@ -38,7 +38,7 @@ def blur_boxes_on_image(
if box.object == "plate":
draw_mask.rectangle(box.get_params(), fill=0)
elif box.object == "face":
draw_mask.rectangle(box.get_params(), fill=0)
draw_mask.ellipse(box.get_params(), fill=0)
mask = mask.filter(ImageFilter.GaussianBlur(radius=3))
img = composite(img, blur_img, mask)
if not out_image_path: