Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit 46e27ac

Browse files
authored
A README for the preprocessing layers (#1979)
* init * nits * review comments * nits
1 parent a90e468 commit 46e27ac

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Preprocessing Layers
2+
3+
KerasCV offers many preprocessing and data augmentation layers which support classification, object detection, and segmentation masks. When you use KerasCV augmentation layers to augment your training data, class labels, bounding boxes, and mask labels automatically get augmented alongside the image augmentations!
4+
5+
The provided table gives an overview of the different augmentation layers available and the data formats they support.
6+
7+
| Layer Name | Vectorized | Segmentation Masks | BBoxes | Class Labels |
8+
| :-- | :--: | :--: | :--: | :--: |
9+
| AugMix |||||
10+
| AutoContrast |||||
11+
| ChannelShuffle |||||
12+
| CutMix |||||
13+
| Equalization |||||
14+
| FourierMix |||||
15+
| Grayscale |||||
16+
| GridMask |||||
17+
| JitteredResize |||||
18+
| MixUp |||||
19+
| Mosaic |||||
20+
| Posterization |||||
21+
| RandAugment |||||
22+
| RandomApply <sup>+</sup> | - | - | - | - |
23+
| RandomAspectRatio |||||
24+
| RandomBrightness |||||
25+
| RandomChannelShift |||||
26+
| RandomChoice <sup>+</sup> | - | - | - | - |
27+
| RandomColorDegeneration |||||
28+
| RandomColorJitter |||||
29+
| RandomContrast |||||
30+
| RandomCropAndResize |||||
31+
| RandomCrop |||||
32+
| RandomCutout |||||
33+
| RandomFlip |||||
34+
| RandomGaussianBlur |||||
35+
| RandomHue |||||
36+
| RandomJpegQuality |||||
37+
| RandomRotation |||||
38+
| RandomSaturation |||||
39+
| RandomSharpness |||||
40+
| RandomShear |||||
41+
| RandomTranslation |||||
42+
| RandomZoom |||||
43+
| RepeatedAugmentation <sup>+</sup> | - | - | - | - |
44+
| Rescaling |||||
45+
| Resizing |||||
46+
| Solarization |||||
47+
48+
<sup>+</sup> Meta Layers, the data types will depend on the Sub Layers.
49+
50+
# Base Layers
51+
52+
- BaseImageAugmentationLayer
53+
- VectorizedBaseImageAugmentationLayer
54+
- RandomAugmentationPipeline

keras_cv/layers/preprocessing/base_image_augmentation_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class BaseImageAugmentationLayer(base_class):
7676
The `call()` method supports two formats of inputs:
7777
1. A single image tensor with shape (height, width, channels) or
7878
(batch_size, height, width, channels)
79-
1. A dict of tensors with any of the following keys (note that `"images"`
79+
2. A dict of tensors with any of the following keys (note that `"images"`
8080
must be present):
8181
* `"images"` - Image Tensor with shape (height, width, channels) or
8282
(batch_size, height, width, channels)

0 commit comments

Comments
 (0)