Last active
July 27, 2020 19:09
-
-
Save ternaus/a6a11847e3a1b0da41fc84de85476ef5 to your computer and use it in GitHub Desktop.
For medium. Image+mask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import albumentations as A | |
transform = A.Compose([ | |
A.HorizontalFlip(p=0.5), | |
A.ShiftScaleRotate(border_mode=cv2.BORDER_CONSTANT, | |
scale_limit=0.3, | |
rotate_limit=(10, 30), | |
p=0.5) | |
], p=1) | |
transformed = transform(image=image, mask=mask) | |
image_transformed = transformed['image'] | |
mask_transformed = transformed['mask'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment