AUTHOR=Elmessery Wael M. , Maklakov Danil V. , El-Messery Tamer M. , Baranenko Denis A. , Gutiérrez Joaquín , Shams Mahmoud Y. , El-Hafeez Tarek Abd , Elsayed Salah , Alhag Sadeq K. , Moghanm Farahat S. , Mulyukin Maksim A. , Petrova Yuliya Yu. , Elwakeel Abdallah E. TITLE=Semantic segmentation of microbial alterations based on SegFormer JOURNAL=Frontiers in Plant Science VOLUME=Volume 15 - 2024 YEAR=2024 URL=https://www.frontiersin.org/journals/plant-science/articles/10.3389/fpls.2024.1352935 DOI=10.3389/fpls.2024.1352935 ISSN=1664-462X ABSTRACT=Precise semantic segmentation of microbial alterations is paramount for their evaluation and treatment. This study focuses on harnessing the SegFormer segmentation model for precise semantic segmentation of strawberry diseases, aiming to improve disease detection accuracy under natural acquisition conditions. Three distinct Mix Transformer encoders-MiT-B0, MiT-B3, and MiT-B5were thoroughly analyzed to enhance disease detection, targeting diseases such as Angular leaf spot, Anthracnose rot, Blossom blight, Gray mold, Leaf spot, Powdery mildew on fruit, and Powdery mildew on leaves. The results reveal that MiT-B0 demonstrates balanced but slightly overfitting behavior, MiT-B3 adapts rapidly with consistent training and validation performance, and MiT-B5 offers efficient learning with occasional fluctuations, providing robust performance. Key insights gained from this study enable researchers to select the most suitable encoder for disease detection applications, thus improving accuracy, efficiency, and adaptability of disease detection systems and advancing the field. The dataset consisted of 2,450 raw images, expanded to 4,574 augmented images. The novel Segment Anything Model (SAM) integrated into the Roboflow annotation tool facilitated efficient annotation and preparation of a strawberry disease dataset. Various augmentation techniques, including horizontal flips, hue adjustments (-21° to +21°), saturation variations (-5% to +5%), brightness changes (-25% to +25%), blurring (up to 2.5 px), and noise introduction (up to 8% of pixels), enhanced the dataset's quality and diversity. Afterward, the dataset was divided into training, validation, and test subsets, considering each class's size for a balanced distribution. Utilizing PyTorch Lightning, a powerful deep learning framework, a semantic segmentation model was trained on the strawberry diseases dataset. The employment of early stopping and model checkpointing techniques optimized the model's performance, achieving impressive training and validation mIoU values of 0.96 and 0.93, respectively. The model successfully prevented overfitting and retained records of its highest performance levels. In comparison to other segmentation models, SegFormer demonstrated superior performance, surpassing classical models like U-Net, SegNet, and PSPNet in terms of mean IoU and mean pixel accuracy. Additionally, SegFormer operated with significantly fewer parameters and lower FLOPs than state-ofthe-art models like SETR and DeepLabV3+, establishing itself as a promising solution for real-world agriculture applications.