Saturday, January 2, 2021

Random cutout image augmentation preprocessing layer for tensorflow keras


Hello friends: 

While training on image data, we often need to apply multiple augmentations like random cropping, random zoom etc. 

With the new keras preprocessing layers, these operations can be baked into the model pipeline. 

However, there is one more image augmentation technique we can perform which can provide better results while training. The technique is RANDOM CUTOUT which basically means to replace random sections of the image. This techinque is detailed in this paper.

 In this post, I will share how can we have this technique as a keras preprocessing layer.  

Tensorflow 2.3.1  

Tensorflow 2.4.0  

 Full working Kaggle Notebook is available here. Hope this helps.

Thanks for printing this post. Hope you liked it.
Keep visiting and sharing.


Post a Comment