Leaf diseases of maize have contributed to the most significant loss in crop productivity and food insecurity across several regions, thus necessitating early and accurate disease identification as a critical need due to its application in precision agriculture. Traditional deep learning techniques sometimes have shortcomings because of growing disparities in the environmental conditions, improper extraction of features, and imperfect tuning of hyperparameters. To tackle these obstacles, this study proposes dual-optimized attention convolutional neural network which is based on convolution architecture optimization using particle swarm optimization in conjunction with hyperparameter tuning employing bayesian optimization. Moreover, a convolutional block attention module is included to improve the utilization of features learned from maize leaf images by emphasizing disease-relevant areas. The proposed framework is implemented on a publicly available maize leaf disease dataset of 4,887 images comprising four different disease categories. The experimental results demonstrate that DOA-CNN obtains a classification accuracy of 91.34%, which is also the state-of-the-art result among other models as well overfitting gap for the considered model with 0.01% margin. The results reveal that the dual-optimization frameworks together with attention mechanisms confer a large boost in classification accuracy and generalizability on smart agriculture applications.
Introduction
Maize is a highly important crop worldwide, contributing significantly to food security, agriculture, and industrial production. However, foliar diseases such as Common Rust, Gray Leaf Spot, and Northern Leaf Blight can severely reduce yields by 20–30%, threatening farmers' livelihoods and global food supplies. Traditional disease detection methods rely on manual inspection by experts, which is time-consuming, subjective, and difficult to scale.
To address these challenges, this study proposes a Dual-Optimized Attention Convolutional Neural Network (DOA-CNN) framework for automated maize leaf disease classification. The system combines advanced computer vision, deep learning, and optimization techniques to improve disease detection accuracy. Unlike conventional CNN-based approaches, the proposed model integrates:
Particle Swarm Optimization (PSO) for global CNN architecture optimization.
Bayesian Optimization (BO) for efficient hyperparameter tuning.
Convolutional Block Attention Module (CBAM) to focus on disease-relevant regions of leaf images.
The dataset consists of 4,887 maize leaf images categorized into four classes: Healthy, Common Rust, Gray Leaf Spot, and Northern Leaf Blight. Images were preprocessed through resizing, normalization, augmentation, and class imbalance handling using class weights and focal loss.
The DOA-CNN architecture employs convolutional layers, max-pooling, CBAM attention mechanisms, and Global Average Pooling (GAP) for effective feature extraction and classification. The model was trained using the Adam optimizer with data augmentation techniques to improve generalization.
Experimental results demonstrate that the proposed DOA-CNN achieved the highest classification accuracy of 91.34%, outperforming Baseline CNN (82.28%), BO-CNN (90.12%), PSO-CNN (90.18%), and Hybrid CNN (90.39%). It also recorded the lowest error rate (8.66%), indicating superior robustness and reliability. Training and validation curves showed minimal overfitting, while GAP activation analysis confirmed the model's ability to focus on disease-specific features.
Conclusion
This work, proposes a dual-optimized attention convolutional neural network framework for accurate and robust classification of maize leaf diseases. After using ML models, tackle some of the most substantial challenges associated in agricultural image analysis including environmental variation, inefficient feature extraction and sub-optimal hyperparameter tuning. This framework utilizes PSO to optimize the configurations of deep neural networks and BO for hyperparameter tuning to improve learning skills from data and prediction than standard CNN models. The CBAM also allows you to selectively emphasize relevant spatial regions related to diseases, enhancing its ability to extract features in a better way. In addition, the sequential channel and spatial attention strategies allow effective learning of subtle visual differences between disease categories to improve classification reliability and reduce misclassifications. The accuracy of the DOA-CNN model achieved 91.34%, precision of 91.55, recall of 91.53, and an F1-score of 91.40, which was better than other models. It had lowest error rate of 8.66 % and overfitting gap only 0.01% confirming its best in terms of generalization. A comparative analysis shows that the fusion of dual optimization strategies with attention-based feature enhancement provides major improvements to deep learning on agricultural image classification tasks.
References
[1] L.-H. Li and R. Tanone, \"Improving robustness using MixUp and CutMix augmentation for corn leaf disease classification based on ConvMixer architecture,\" I.J. ICT Res. Appl., vol. 17, no. 2, pp. 167–180, 2023. https://doi.org/10.5614/itbj.ict.res.appl.2023.17.2.3
[2] R. Ariska, C. A. Sari, and E. H. Rachmawanto, \"Classification of corn leaf disease using convolutional neural network,\" Advance Sustainable Sci. Eng. Technol. (ASSET), vol. 6, no. 4, pp. 0240408-01–0240408-08, Oct. 2024. https://doi.org/10.26877/asset.v6i4.772
[3] K. V. Deputy, K. Passi, and C. K. Jain, \"Crop disease detection using deep learning techniques on images,\" J. Comput. Sci., vol. 19, no. 12, pp. 1438–1449, 2023. https://doi.org/10.3844/jcssp.2023.1438.1449
[4] N. C. Z. Deepa and J. Ruby, \"Multi-disease classification of mango tree leaf and fruit using meta-heuristic-based weighted feature selection and hybrid LSTM and DNN model,\" Int. Res. J. Modernization Eng. Technol. Sci., vol. 4, no. 12, pp. 549–560, Dec. 2022. https://doi.org/10.56726/IRJMETS32054
[5] A. Rachmad, M. Fuad, and E. M. S. Rochman, \"Convolutional neural network-based classification model of corn leaf disease,\" Math. Model. Eng. Probl., vol. 10, no. 2, pp. 530–536, Apr. 2023. https://doi.org/10.18280/mmep.100220
[6] A. R. Khan, I. Abunadi, B. AlGhofaily, H. Ali, and T. Saba, \"Automatic diagnosis of rice leaf diseases using hybrid deep learning model,\" J. Adv. Inf. Technol., vol. 14, no. 3, pp. 418–428, 2023. https://doi.org/10.12720/jait.14.3.418-428
[7] Y. Yang, C. Wang, Q. Zhao, G. Li, and H. Zang, \"SE-Swin U-Net for image segmentation of major maize foliar diseases,\" Engenharia Agrícola, vol. 44, e20230097, 2024. https://doi.org/10.1590/1809-4430-Eng.Agric.v44e20230097/2024
[8] Jia, X., Yin, D., Bai, Y., Yu, X., Song, Y., Cheng, M., Liu, S., Bai, Y., Meng, L., Liu, Y., Liu, Q., Nan, F., Nie, C., Shi, L., Dong, P., Guo, W., & Jin, X., \"Monitoring maize leaf spot disease using multi-source UAV imagery,\" Drones, vol. 7, no. 11, p. 650, Oct. 2023. https://doi.org/10.3390/drones7110650
[9] M. Bagga and S. Goyal, \"Image-based detection and classification of plant diseases using deep learning: State-of-the-art review,\" Urban Agriculture & Regional Food Systems, vol. 9, Article e202305, 2024. https://doi.org/10.1002/uar2.202305
[10] Barburiceanu et al., \"Texture-based classification using CNN layers and machine learning classifiers,\" Pattern Recognition Letters, vol. 148, pp. 120–127, 2021.
[11] M. Waqas et al., \"Applications of machine learning and deep learning in agriculture: A comprehensive review,\" Green Technologies and Sustainability, vol. 3, no. 3, Article 100199, 2025. https://doi.org/10.1016/j.grets.2025.100199
[12] Deputy, K. V., Passi, K., & Jain, C. K. “Crop disease detection using deep learning techniques on images”. Journal of Computer Science, 19(12), 1438–1449. 2023 https://doi.org/10.3844/jcssp.2023.1438.1449
[13] Yang, Y., Wang, C., Zhao, Q., Li, G., & Zang, H. “SE-Swin UNET for image segmentation of major maize foliar diseases”. Engenharia Agrícola, 44, Article e20230097. 2024 https://doi.org/10.1590/1809-4430-Eng.Agric.v44e20230097/2024
[14] Haque, M. A., Marwaha, S., Debi, C. K., Nigam, S., Arora, A., Hooda, K. S., Soujanya, P. L., Aggarwal, S. K., Lall, B., Kumar, M., Islam, S., Panwar, M., Kumar, P., & Agrawal, R. C. “Deep learning-based approach for identification of diseases of maize crop”. Scientific Reports, 12, Article 6336. 2022 https://doi.org/10.1038/s41598-022-10140-0
[15] Deepa, N. C. Z., & Ruby, J. “Multi-disease classification of mango tree leaf and fruit using meta-heuristic-based weighted feature selection and hybrid LSTM and DNN model”. International Research Journal of Modernization in Engineering Technology and Science, 4(12), 549–560. 2022, https://doi.org/10.56726/IRJMETS32054
[16] Liu, H., Lv, H., Li, J., Liu, Y., & Deng, L. “Research on maize disease identification methods in complex environments based on cascade networks and two-stage transfer learning”. Scientific Reports, 12, Article 23484. 2022 https://doi.org/10.1038/s41598-022-23484-3
[17] Chan, K. C., Islambekov, U., Luchinsky, A., & Sanders, R. “A computationally efficient framework for vector representation of persistence diagrams”. Journal of Machine Learning Research, 23(112), 1–33. 2022.
[18] Bagga, M., & Goyal, S. “Image-based detection and classification of plant diseases using deep learning: State-of-the-art review”. Urban Agriculture & Regional Food Systems, 9, Article e202305. 2024, https://doi.org/10.1002/uar.202305
[19] Wamaitha, M. J., Nigam, D., Maina, S., Stomeo, F., Wangai, A., Njuguna, J. N., Holton, T. A., Wanjala, B. W., Wamalwa, M., Lucas, T., Djikeng, A., & García-Ruiz, H. “Metagenomic analysis of viruses associated with maize lethal necrosis in Kenya”. Virology Journal, 15, Article 90. 2018, https://doi.org/10.1186/s12985-018-0999-2
[20] Huangfu, Y., Pan, J., Li, Z., Wang, Q., Mastouri, F., Li, Y., Yang, S., Liu, M., Dai, S., & Liu, W. “Genome-wide identification of PTI1 family in Setaria italica and salinity-responsive functional analysis of SiPTI1-5”. BMC Plant Biology, 21, Article 319. 2021, https://doi.org/10.1186/s12870-021-03174-4
[21] Kannan, M., Ismail, I., & Bunawan, H. “Maize dwarf mosaic virus: From genome to disease management”. Viruses, 10(9), Article 492. 2018, https://doi.org/10.3390/v10090492
[22] Ahmad, Z., Wu, J., Chen, L., & Dong, W. “Isolated Bacillus subtilis strain 330-2 and its antagonistic genes identified by the removing PCR”. Scientific Reports, 7, Article 1777. 2017, https://doi.org/10.1038/s41598-017-01942-9
[23] Cui, Z., Dong, H., Zhang, A., Ruan, Y., Jiang, S., He, Y., & Zhang, Z. “Denser markers and advanced statistical method identified more genetic loci associated with husk traits in maize”. Scientific Reports, 10, Article 8165. 2020, https://doi.org/10.1038/s41598-020-65164-4
[24] Luo, L., Chang, Q., Wang, Q., & Huang, Y. “Identification and severity monitoring of maize dwarf mosaic virus infection based on hyperspectral measurements”. Remote Sensing, 13(22), Article 4560. 2021, https://doi.org/10.3390/rs13224560
[25] Deputy, K. V., Passi, K., & Jain, C. K. “Crop disease detection using deep learning techniques on images”. Journal of Computer Science, 19(12), 1438–1449. 2023, https://doi.org/10.3844/jcssp.2023.1438.1449
[26] Yang, Y., Wang, C., Zhao, Q., Li, G., & Zang, H. “SE-Swin UNET for image segmentation of major maize foliar diseases”. Engenharia Agrícola, 44, Article e20230097, 2024. https://doi.org/10.1590/1809-4430-Eng.Agric.v44e20230097/2024