BLUR-38: Add different shape for blurring faces, to make them look aesthetic.
This commit is contained in:
parent
b27f4930db
commit
6d2b939987
@ -38,7 +38,7 @@ def blur_boxes_on_image(
|
|||||||
if box.object == "plate":
|
if box.object == "plate":
|
||||||
draw_mask.rectangle(box.get_params(), fill=0)
|
draw_mask.rectangle(box.get_params(), fill=0)
|
||||||
elif box.object == "face":
|
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))
|
mask = mask.filter(ImageFilter.GaussianBlur(radius=3))
|
||||||
img = composite(img, blur_img, mask)
|
img = composite(img, blur_img, mask)
|
||||||
if not out_image_path:
|
if not out_image_path:
|
||||||
|
Loading…
Reference in New Issue
Block a user