diff --git a/dan/ocr/transforms.py b/dan/ocr/transforms.py index 9f6bef8bada5f92790b8fc429bd039e67fb0fd7f..d9b80c6ad90cd5d08e7a72cfc5779cea24c12903 100644 --- a/dan/ocr/transforms.py +++ b/dan/ocr/transforms.py @@ -195,25 +195,25 @@ def get_augmentation_transforms() -> A.Compose: [ ErosionDilation(min_kernel=1, max_kernel=4, iterations=1), Perspective(scale=(0.05, 0.09), fit_output=True, p=0.4), - GaussianBlur(sigma_limit=2.5, always_apply=True), - GaussNoise(var_limit=50**2, always_apply=True), + GaussianBlur(sigma_limit=2.5, p=1), + GaussNoise(var_limit=50**2, p=1), ColorJitter( contrast=0.2, brightness=0.2, saturation=0.2, hue=0.2, - always_apply=True, + p=1, ), ElasticTransform( alpha=20.0, sigma=5.0, alpha_affine=1.0, border_mode=0, - always_apply=True, + p=1, ), - Sharpen(alpha=(0.0, 1.0), always_apply=True), - Affine(shear={"x": (-20, 20), "y": (0, 0)}, always_apply=True), - CoarseDropout(always_apply=True), + Sharpen(alpha=(0.0, 1.0), p=1), + Affine(shear={"x": (-20, 20), "y": (0, 0)}, p=1), + CoarseDropout(p=1), ToGray(p=0.5), ], n=2,