Skip to content

Commit

Permalink
chore(): Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Abramov committed Nov 10, 2023
1 parent 8c6f3fd commit 791067b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ Edux supports a variety of image augmentations, which can be used to increase th
<img src="https://github.com/Samyssmile/edux/assets/6922428/25a8b2e5-0373-4781-8001-114e699fc2fe" width="300" alt="Monochrome + Noise Image">
</figure>

#### Code Example

```java
AugmentationSequence augmentationSequence=
new AugmentationBuilder()
.addAugmentation(new ResizeAugmentation(width*2,height*2,ResizeQuality.QUALITY))
.addAugmentation(new ContrastAugmentation(0.6f))
.addAugmentation(new BlurAugmentation(5))
.addAugmentation(new NoiseInjectionAugmentation(40))
.addAugmentation(new MonochromeAugmentation())
.addAugmentation(new FlippingAugmentation())
.addAugmentation(new ColorEqualizationAugmentation())
.addAugmentation(new CroppingAugmentation(0.2f))
.addAugmentation(new ElasticTransformationAugmentation(5,0.5))
.addAugmentation(new PerspectiveTransformationsAugmentation(Perspective.RIGHT_TILT))
.addAugmentation(new RandomDeleteAugmentation(5,20,20))
.build();
```

### Battle Royale - Which algorithm is the best?

We run all algorithms on the same dataset and compare the results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ void shouldApplyAugmentationSequenceOnSingleImage() throws IOException, Interrup

AugmentationSequence augmentationSequence =
new AugmentationBuilder()
.addAugmentation(new PerspectiveTransformationsAugmentation(Perspective.RIGHT_TILT))
.addAugmentation(new ResizeAugmentation(3840, 2160, ResizeQuality.QUALITY))
.addAugmentation(
new PerspectiveTransformationsAugmentation(Perspective.SQUEEZE_VERTICAL))
.build();

BufferedImage augmentedImage = augmentationSequence.applyTo(image);
Expand Down

0 comments on commit 791067b

Please sign in to comment.