From febcfa74bc4714666c041184bf01b079c66b049e Mon Sep 17 00:00:00 2001 From: yusuke-a-uchida Date: Sat, 11 Aug 2018 14:47:49 +0900 Subject: [PATCH] random erasing --- age_estimation/generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/age_estimation/generator.py b/age_estimation/generator.py index aaa8e21..d2107e4 100644 --- a/age_estimation/generator.py +++ b/age_estimation/generator.py @@ -18,6 +18,7 @@ def get_transform_func(): p.random_color(probability=1, min_factor=0.8, max_factor=1.2) p.random_contrast(probability=1, min_factor=0.8, max_factor=1.2) p.random_brightness(probability=1, min_factor=0.8, max_factor=1.2) + p.random_erasing(probability=0.5, rectangle_area=0.2) def transform_image(image): image = [Image.fromarray(image)]