EfficientNet-Based Cotton Disease Detection and Treatment Support System for Smart Farming
Abstract
Cotton is one of the most economically significant cash crops in the world, contributing approximately 70,000 crore annually to India’s agricultural economy and supporting roughly 15 million farming households. Yet, undetected leaf diseases and nutrient deficiencies cause 20-40% annual yield losses, and smallholder farmers in rural areas rarely have timely access to agronomic expertise. This paper presents CottonCare AI, an EfficientNet-B4-based cotton leaf disease detection and treatment support system designed for smart and precision farming. The system introduces a dual-module deep learning framework: a primary Disease Detection Module that classifies six conditions-Aphids, Army Worm, Bacterial Blight, Powdery Mildew, Target Spot, and Healthy Leaf-with 96.3% test accuracy and a macro-averaged F1-score of 96.0%, trained on 4,200 images per class acquired across RGB, grayscale, and alternative color-space representations; and a complementary Nutrient Deficiency Module that separately identifies four macro-nutrient deficiencies-Nitrogen, Potassium, Magnesium, and Iron-through priority-ordered HSV color-space analysis. A dedicated severity estimation module quantifies the fraction of leaf area affected and categorizes disease progression as Mild, Moderate, or Severe, achieving 89% agreement (Cohen’s $\kappa=0.83$) with expert-annotated ground truth. Explainable AI (XAI) techniques-Grad-CAM and SHAP-are integrated to generate spatial heatmaps and pixel-level attributions, making every prediction transparent and auditable by farmers and extension officers alike. A hybrid treatment recommendation engine provides disease-specific chemical and organic management options, including neem oil, bio-fungicides, and soil amendments, promoting environmentally responsible farming. The full-stack system is deployed as a React.js web dashboard, a Flutter mobile application, and a FastAPI backend orchestrated with Docker and Kubernetes, achieving sub-3-second inference latency. Comparative experiments demonstrate consistent outperformance of VGG16 (87.2%), ResNet50 (90.4%), DenseNet121 (91.1%), InceptionV3 (89.7%), and EfficientNet-B3 (94.1%) under identical experimental conditions.