Applying image augmentation with Albumentations
More often than not, in machine learning (ML), data is crucial to getting better performances of models. Computer vision is no exception, and data augmentation with images can be easily taken to another level.
Indeed, it is possible to easily augment an image, for example, by mirroring it, as shown in Figure 11.1.
Figure 11.1 – On the left, the original picture of my dog, and on the right, a mirrored picture of my dog
However, beyond this, many more types of augmentation are possible and can be divided into two main categories: pixel-level and spatial-level transformations.
Let's discuss both of these in the following sections.
Spatial-level augmentation
The mirroring is an example of spatial-level augmentation; however, much more than simple mirroring can be done. For example, see the following:
- Shifting: Shifting an image in a certain direction
- Shearing: Add shearing...