View full-text article in PMC Diagnostics (Basel). 2025 Aug 28;15(17):2170. doi: 10.3390/diagnostics15172170 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 2 Image augmentation pipeline Require: Image Ialigned Ensure: Augmented Image I^ 1:I←tf.image.random_flip_left_right(I) 2:I←tf.image.random_flip_up_down(I) 3:I←tf.image.random_brightness(I,0.3) 4:I←tf.image.random_contrast(I,0.8,1.2) 5:I←tf.image.random_saturation(I,0.8,1.2) 6:I←tf.image.random_hue(I,0.02) 7:σ←tf.random.uniform([],0.1,2.0) 8:I←tf.image.gaussian_filter2d(I,(3,3),σ) 9:s←tf.shape(I)[:2]×tf.random.uniform([],0.8,1.0) 10:I←tf.image.random_crop(I,s) 11:I←tf.image.resize(I,tf.shape(I)[:2]) 12:I′←tf.random.normal(tf.shape(I),0.0,0.05) 13:I←tf.clip_by_value(I+I′,0.0,1.0) 14:return Augmented Image I^