Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Commits
2981d712
Verified
Commit
2981d712
authored
1 year ago
by
Solene Tarride
Committed by
Mélodie Boillet
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove PiecewiseAffine transforms from data augmentation pipeline
parent
2bb85c50
No related branches found
No related tags found
1 merge request
!196
Remove PiecewiseAffine augmentation transform
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dan/transforms.py
+2
-10
2 additions, 10 deletions
dan/transforms.py
with
2 additions
and
10 deletions
dan/transforms.py
+
2
−
10
View file @
2981d712
...
...
@@ -6,7 +6,7 @@ from enum import Enum
from
random
import
randint
import
numpy
as
np
from
albumentations
import
OneOf
,
SomeOf
from
albumentations
import
SomeOf
from
albumentations.augmentations
import
(
Affine
,
CoarseDropout
,
...
...
@@ -16,7 +16,6 @@ from albumentations.augmentations import (
GaussianBlur
,
GaussNoise
,
Perspective
,
PiecewiseAffine
,
Sharpen
,
ToGray
,
)
...
...
@@ -180,14 +179,7 @@ def get_augmentation_transforms() -> SomeOf:
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
),
]
),
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
)}),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment