From fd932b391ceeddcad07f93e44545694c727d409f Mon Sep 17 00:00:00 2001 From: Anton Repushko Date: Sat, 20 Apr 2019 21:16:08 +0300 Subject: [PATCH 1/2] Add albumentations to Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 3d94fc4b..ad4cfd33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -479,6 +479,7 @@ RUN pip install flashtext && \ pip install optuna && \ pip install chainercv && \ pip install plotly_express && \ + pip install albumentations && \ /tmp/clean-layer.sh # Tesseract and some associated utility packages From 5b1756c82fdd7301b021daba4adcf067524d9a33 Mon Sep 17 00:00:00 2001 From: Anton Repushko Date: Sat, 20 Apr 2019 21:36:39 +0300 Subject: [PATCH 2/2] Create test on albumentations library --- tests/test_albumentations.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/test_albumentations.py diff --git a/tests/test_albumentations.py b/tests/test_albumentations.py new file mode 100644 index 00000000..677c90c2 --- /dev/null +++ b/tests/test_albumentations.py @@ -0,0 +1,10 @@ +import unittest + +import cv2 +from albumentations import HorizontalFlip + +class TestAlbumentations(unittest.TestCase): + def test_rotate(self): + image = cv2.imread('/input/tests/data/dot.png') + aug = HorizontalFlip(p=1) + image_rotated = aug(image=image)['image']