Smart Plant Disease Diagnosis via MERN Stack Interface and PyTorch Deep Learning Models
Main Article Content
Abstract
Context: Early identification of plant diseases plays a crucial role in enhancing crop productivity and promoting sustainable agricultural practices. Advances in artificial intelligence and web-based technologies have paved the way for smart systems capable of automatically diagnosing diseases in crops like rice and sugarcane. Objective: This research focuses on developing a smart plant disease diagnosis system that integrates deep learning techniques with a MERN (MongoDB, Express.js, React.js, Node.js) stack to provide accurate, real-time classification of rice and sugarcane leaves diseases through a user-friendly web interface. Method: The proposed framework employs a Convolutional Neural Network (CNN) built with PyTorch and trained using a carefully curated dataset of diseased rice and sugarcane leaf images. The developed model was incorporated into a web application built using the MERN stack to enable seamless frontend-backend communication and real-time disease prediction. The model’s effectiveness was assessed using evaluation metrics such as precision, recall, F1-score, and confusion matrix analysis. Results: The CNN model achieved high classification performance, with an average class accuracy of 95.92%, overall classification accuracy of 91.83%, average precision of 91.85%, average recall of 92.05%, and average F1-score of 91.86%. Confusion matrix analysis further validated the model’s efficiency in accurately recognizing rice and sugarcane leaves diseases. The integrated web platform demonstrated efficient and user-friendly real-time disease prediction capabilities. Conclusions: The developed AI-based plant disease detection system highlights the effectiveness of integrating deep learning techniques with modern web technologies to support scalable agricultural solutions. The system provides a practical solution for farmers and agronomists seeking early and accurate crop disease detection. Future enhancements may include multilingual support, mobile application integration, and agronomic advisory modules to further advance precision agriculture initiatives.
Article Details
Issue
Section

This work is licensed under a Creative Commons Attribution 4.0 International License.
Articles published in SyCom are open access and distributed under the terms of the Creative Commons Attribution 4.0 International License (CC BY 4.0).
How to Cite
References
[1] FAO, Plant pests and diseases. Food and Agriculture Organization of the United Nations. [Online]. Available: https://www.fao.org [Accessed: Jun. 22, 2025].
[2] S. P. Mohanty, D. P. Hughes, and M. Salathé, “Using Deep Learning for Image-Based Plant Disease Detection,” Front. Plant Sci., vol. 7, Sep. 2016. https://doi.org/10.3389/fpls.2016.01419.
[3] K. P. Ferentinos, “Deep learning models for plant disease detection and diagnosis,” Computers and Electronics in Agriculture, vol. 145, pp. 311–318, Feb. 2018. https://doi.org/10.1016/j.compag.2018.01.009.
[4] E. C. Too, L. Yujian, S. Njuki, and L. Yingchun, “A comparative study of fine-tuning deep learning models for plant disease identification,” Computers and Electronics in Agriculture, vol. 161, pp. 272–279, Jun. 2019. https://doi.org/10.1016/j.compag.2018.03.032.
[5] S. Sladojevic, M. Arsenovic, A. Anderla, D. Culibrk, and D. Stefanovic, “Deep Neural Networks Based Recognition of Plant Diseases by Leaf Image Classification,” Computational Intelligence and Neuroscience, vol. 2016, pp. 1–11, 2016. https://doi.org/10.1155/2016/3289801.
[6] N. Zhang, M. Wang, and N. Wang, “Precision agriculture—a worldwide overview,” Computers and Electronics in Agriculture, vol. 36, no. 2–3, pp. 113–132, Nov. 2002. https://doi.org/10.1016/s0168-1699(02)00096-0.
[7] Md. M. Islam et al., “DeepCrop: Deep learning-based crop disease prediction with web application,” Journal of Agriculture and Food Research, vol. 14, p. 100764, Dec. 2023. https://doi.org/10.1016/j.jafr.2023.100764.
[8] M. H. Saleem, J. Potgieter, and K. M. Arif, “Plant Disease Detection and Classification by Deep Learning,” Plants, vol. 8, no. 11, p. 468, Oct. 2019. https://doi.org/10.3390/plants8110468.
[9] A. G. Howard et al., “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications,” 2017, arXiv. https://doi.org/10.48550/ARXIV.1704.04861.
[10] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,” in 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT: IEEE, Jun. 2018, pp. 4510–4520. https://doi.org/10.1109/CVPR.2018.00474.
[11] S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 39, no. 6, pp. 1137–1149, Jun. 2017. https://doi.org/10.1109/TPAMI.2016.2577031.
[12] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection,” in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA: IEEE, Jun. 2016, pp. 779–788. https://doi.org/10.1109/CVPR.2016.91.
[13] K. He, G. Gkioxari, P. Dollar, and R. Girshick, “Mask R-CNN,” in 2017 IEEE International Conference on Computer Vision (ICCV), Venice: IEEE, Oct. 2017, pp. 2980–2988. https://doi.org/10.1109/ICCV.2017.322.
[14] J. G. A. Barbedo, “Impact of dataset size and variety on the effectiveness of deep learning and transfer learning for plant disease classification,” Computers and Electronics in Agriculture, vol. 153, pp. 46–53, Oct. 2018. https://doi.org/10.1016/j.compag.2018.08.013.
[15] C. Shorten and T. M. Khoshgoftaar, “A survey on Image Data Augmentation for Deep Learning,” J Big Data, vol. 6, no. 1, p. 60, Dec. 2019. https://doi.org/10.1186/s40537-019-0197-0.
[16] I. J. Goodfellow et al., “Generative Adversarial Nets,” in Advances in Neural Information Processing Systems, Z. Ghahramani, M. Welling, C. Cortes, N. Lawrence, and K. Weinberger, Eds., Curran Associates, Inc., 2014. [Online]. Available: https://proceedings.neurips.cc/paper_files/paper/2014/file/f033ed80deb0234979a61f95710dbe25-Paper.pdf [Accessed: Oct. 24, 2025].
[17] A. Kamilaris and F. X. Prenafeta-Boldú, “Deep learning in agriculture: A survey,” Computers and Electronics in Agriculture, vol. 147, pp. 70–90, Apr. 2018. https://doi.org/10.1016/j.compag.2018.02.016.
[18] K. Liakos, P. Busato, D. Moshou, S. Pearson, and D. Bochtis, “Machine Learning in Agriculture: A Review,” Sensors, vol. 18, no. 8, p. 2674, Aug. 2018. https://doi.org/10.3390/s18082674.
[19] S. Balasubramanian, S. Rajaram, S. Selvabharathy, V. Krishnamurthy, V. Sakthivel, A. Ramprasad, “Mobile Application for Leaf Disease Classification,” in Lecture Notes in Networks and Systems, Singapore: Springer Nature Singapore, 2023, pp. 297–307. https://doi.org/10.1007/978-981-99-5085-0_29.
[20] L. Jain, H. V. M.A., N. M.L., and S. S.S., “Cloud-Based System for Supervised Classification of Plant Diseases Using Convolutional Neural Networks,” in 2017 IEEE International Conference on Cloud Computing in Emerging Markets (CCEM), Bangalore: IEEE, Nov. 2017, pp. 63–68. https://doi.org/10.1109/ccem.2017.22.
[21] M. Manerikar, K. Maski, Y. Sasane, and O. Pawar, “Journeying through Query Verse: A MERN-Stack Implementation for Dynamic Web-based Inquiry,” IJRASET, vol. 12, no. 2, pp. 89–98, Feb. 2024. https://doi.org/10.22214/ijraset.2024.58264.
[22] P. Porter, S. Yang, and X. Xi, “The Design and Implementation of a RESTful IoT Service Using the MERN Stack,” in 2019 IEEE 16th International Conference on Mobile Ad Hoc and Sensor Systems Workshops (MASSW), Monterey, CA, USA: IEEE, Nov. 2019, pp. 140–145. https://doi.org/10.1109/massw.2019.00035.
[23] R. Lohith, K. E. Cholachgudda, and R. C. Biradar, “PyTorch Implementation and Assessment of Pre-Trained Convolutional Neural Networks for Tomato Leaf Disease Classification,” in 2022 IEEE Region 10 Symposium (TENSYMP), Mumbai, India: IEEE, Jul. 2022, pp. 1–6. https://doi.org/10.1109/tensymp54529.2022.9864390.
[24] A.A. Ali, B. Chramcov, R. Jasek, R. Katta, S. Krayem, “Classification of Plant Diseases Using Convolutional Neural Networks,” in Lecture Notes in Networks and Systems, Cham: Springer International Publishing, 2021, pp. 268–275. https://doi.org/10.1007/978-3-030-77445-5_24.
[25] A. Bruno et al., “Improving plant disease classification by adaptive minimal ensembling,” Front. Artif. Intell., vol. 5, Sep. 2022. https://doi.org/10.3389/frai.2022.868926.
[26] D. A. Kumar, P. S. Chakravarthi, and K. S. Babu, “Multiclass Support Vector Machine based Plant Leaf Diseases Identification from Color, Texture and Shape Features,” in 2020 Third International Conference on Smart Systems and Inventive Technology (ICSSIT), Tirunelveli, India: IEEE, Aug. 2020, pp. 1220–1226. https://doi.org/10.1109/icssit48917.2020.9214142.
[27] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra, “Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization,” Int J Comput Vis, vol. 128, no. 2, pp. 336–359, Feb. 2020. https://doi.org/10.1007/s11263-019-01228-7.
[28] A. Dosovitskiy et al., “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale,” 2020. arXiv. https://doi.org/10.48550/ARXIV.2010.11929.
[29] Z. Salman, A. Muhammad, and D. Han, “Plant disease classification in the wild using vision transformers and mixture of experts,” Front. Plant Sci., vol. 16, p. 1522985, Jun. 2025. https://doi.org/10.3389/fpls.2025.1522985.
[30] S. M. Alhammad, D. S. Khafaga, W. M. El-hady, F. M. Samy, and K. M. Hosny, “Deep learning and explainable AI for classification of potato leaf diseases,” Front. Artif. Intell., vol. 7, p. 1449329, Feb. 2025. https://doi.org/10.3389/frai.2024.1449329.
[31] H. Chung, J.-H. Kim, J. Ahn, Y. Chung, E. Kim, and W. Heo, “Resource-Constrained Edge AI Solution for Real-Time Pest and Disease Detection in Chili Pepper Fields,” Agriculture, vol. 16, no. 2, p. 223, Jan. 2026. https://doi.org/10.3390/agriculture16020223.