# A Hybrid Deep Learning Approach for Cotton Plant Disease Detection Using BERT-ResNet-PSO
###### Abstract  
Cotton is one of the most valuable non-food agricultural products in the world. However, cotton production is often hampered by the invasion of disease. In most cases, these plant diseases are a result of insect or pest infestations, which can have a significant impact on production if not addressed promptly. It is, therefore, crucial to accurately identify leaf diseases in cotton plants to prevent any negative effects on yield. This paper presents a hybrid deep learning approach based on Bidirectional Encoder Representations from Transformers with Residual network and particle swarm optimization (BERT-ResNet-PSO) for detecting cotton plant diseases. This approach starts with image pre-processing, which they pass to a BERT-like encoder after linearly embedding the image patches. It results in segregating disease regions. Then, the output of the encoded feature is passed to ResNet-based architecture for feature extraction and further optimized by PSO to increase the classification accuracy. The approach is tested on a cotton dataset from the Plant Village dataset, where the experimental results show the effectiveness of this hybrid deep learning approach, achieving an accuracy of 98.5%, precision of 98.2% and recall of 98.7% compared to the existing deep learning approaches such as ResNet50, VGG19, InceptionV3, and ResNet152V2. This study shows that the hybrid deep learning approach is capable of dealing with the cotton plant disease detection problem effectively. This study suggests that the proposed approach is beneficial to help avoid crop losses on a large scale and support effective farming management practices. c 2025 15 7075 11 May 2025 18 June 2025 18 June 2025 22 June 2025 22 June 2025 22 June 2025 22 June 2025 22 June 2025 22 June 2025 22 June 2025 222 June 2025 222 June 2025 222 June 2025 222 June 2025 22  
growth of the plants and the quality of the cotton. Thus, it is critical to develop an effective approach for detecting cotton plant diseases at the early stage for the protection of the cotton plants [4]. One of the main challenges in cotton farming is to accurately identify cotton diseases that affect the leaves in a timely manner [5]. Diseases such as White Spot Disease (Pandhari Mashii), Crumple Leaf Disease (Kokada) and Red Spot Disease (Lalya) are often found on cotton plants, and they can reduce the quality and quantity of the cotton produced if they are not detected early. Visual inspection is the most common model for plant disease detection; however, it is laborious, time-consuming and prone to error by farmers. Lacking identification, diseases can spread and be costly for farmers whose livelihoods involve cotton production, and the traditional model of detecting cotton diseases is by manual examination by agromomists or farmers with some experience. To detect these diseases successfully, farmers must be highly experienced to know the disease symptoms, like discoloration, leaf deformation and spots, and this also can be variable according to environmental conditions or the disease progression. In recent years, image-based recognition models have been adopted to analyze cotton leaves' images for identifying disease patterns. While some improvements have been made, existing techniques are still largely vendor and experiential-dependent. [PERSON] et al. [6], for example, developed the Xception model with transfer learning, which achieved high accuracy on an open-source cotton dataset, but their model may not generalize well to other plant species or environmental conditions, and it requires significant computational resources. Similarly, [PERSON] et al. [7] compared several CNN architectures, such as VGG19 and ResNet50, but did not specify the dataset size, making it difficult to compare the results accurately. Other studies, like [PERSON]'s [8] work with custom CNN and meta-deep learning, show promising results on specific datasets but face limitations in generalizability due to the relatively small dataset sizes.