How to augment training data 'on the fly' with multiclass segmentation using Keras

I am trying to follow through this code sample: https://keras.io/examples/vision/deeplabv3_plus/

The author is not augmenting the data in any way. The dataset used here (CIHP) has training, validation, and test images and both training and validation have corresponding masks for the objects of interest.

How can we run augmentations on the data during training? Can you guys provide some examples?

Here is some nice guide. You should modify your data_generator method.