diff --git a/dan/ocr/transforms.py b/dan/ocr/transforms.py index d9b80c6ad90cd5d08e7a72cfc5779cea24c12903..3a8c74f64ac5f586a02ce070f4ca6aaf1c3bd03f 100644 --- a/dan/ocr/transforms.py +++ b/dan/ocr/transforms.py @@ -6,6 +6,7 @@ from enum import Enum from random import randint import albumentations as A +import cv2 import numpy as np from albumentations.augmentations import ( Affine, @@ -190,7 +191,9 @@ def get_augmentation_transforms() -> A.Compose: return A.Compose( [ # Scale between 0.75 and 1.0 - RandomScale(scale_limit=[-0.25, 0], always_apply=True), + RandomScale( + scale_limit=[-0.25, 0], always_apply=True, interpolation=cv2.INTER_AREA + ), A.SomeOf( [ ErosionDilation(min_kernel=1, max_kernel=4, iterations=1),