Skip to content

Commit

Permalink
Affine transform arg in elastictransform is deprecated
Browse files Browse the repository at this point in the history
factor it out. Fixes #648
  • Loading branch information
mittagessen committed Oct 8, 2024
1 parent 30716fe commit 8ac1163
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kraken/lib/dataset/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self):
import cv2
cv2.setNumThreads(0)
from albumentations import (Blur, Compose, ElasticTransform,
MedianBlur, MotionBlur, OneOf,
MedianBlur, MotionBlur, OneOf, Affine,
OpticalDistortion, PixelDropout,
ShiftScaleRotate, ToFloat)

Expand All @@ -74,7 +74,8 @@ def __init__(self):
ShiftScaleRotate(shift_limit=0.0625, scale_limit=0.2, rotate_limit=1, p=0.2),
OneOf([
OpticalDistortion(p=0.3),
ElasticTransform(alpha=64, sigma=25, alpha_affine=0.25, p=0.1),
ElasticTransform(alpha=64, sigma=25, p=0.1),
Affine(translate_px=(0, 5), rotate=(-3, 3), shear=(-5, 5), p=0.2)
], p=0.2),
], p=0.5)

Expand Down

0 comments on commit 8ac1163

Please sign in to comment.