From e8700921a4ca30a4deb2d93bb24268bd7c2157f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sol=C3=A8ne=20Tarride?= <starride@teklia.com> Date: Fri, 7 Jul 2023 17:30:57 +0200 Subject: [PATCH] Update documentation --- docs/usage/train/augmentation.md | 6 +++--- docs/usage/train/parameters.md | 13 +------------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/docs/usage/train/augmentation.md b/docs/usage/train/augmentation.md index ff68a8a2..784ba6b1 100644 --- a/docs/usage/train/augmentation.md +++ b/docs/usage/train/augmentation.md @@ -15,6 +15,7 @@ This page lists data augmentation transforms used in DAN. | CPU time (seconds/10 images) | 0.44 (3013x128 pixels) / 0.86 (1116x581 pixels) | ### PieceWise Affine +:warning: This transform is temporarily removed from the pipeline until [this issue](https://github.com/albumentations-team/albumentations/issues/1442) is fixed. | | PieceWise Affine | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -126,9 +127,8 @@ This page lists data augmentation transforms used in DAN. ## Full augmentation pipeline -* Data augmentation is applied with a probability of 0.9. -* In this case, two transformations are randomly selected to be applied. -* `ElasticTransform` and `PieceWiseAffine` cannot be applied on the same image. +* Data augmentation is applied with a probability of 0.9 +* In this case, two transformations are randomly selected to be applied * Reproducibility is possible by setting `random.seed` and `np.random.seed` (already done in `dan/ocr/document/train.py`) * Examples with new pipeline: diff --git a/docs/usage/train/parameters.md b/docs/usage/train/parameters.md index f7560051..77f4f1fd 100644 --- a/docs/usage/train/parameters.md +++ b/docs/usage/train/parameters.md @@ -96,18 +96,7 @@ transforms = SomeOf( Perspective(scale=(0.05, 0.09), fit_output=True), GaussianBlur(sigma_limit=2.5), GaussNoise(var_limit=50**2), - ColorJitter(contrast=0.2, brightness=0.2, saturation=0.2, hue=0.2), - OneOf( - [ - ElasticTransform( - alpha=20.0, - sigma=5.0, - alpha_affine=1.0, - border_mode=0, - ), - PiecewiseAffine(scale=(0.01, 0.04), nb_rows=1, nb_cols=4), - ] - ), + ColorJitter(contrast=0.2, brightness=0.2, saturation=0.ElasticTransform(alpha=20.0, sigma=5.0, alpha_affine=1.0, border_mode=0), Sharpen(alpha=(0.0, 1.0)), ErosionDilation(min_kernel=1, max_kernel=4, iterations=1), Affine(shear={"x": (-20, 20), "y": (0, 0)}), -- GitLab