In agricultural production, the nitrogen content of sugarcane is assessed with precision and the economy, which is crucial for balancing fertilizer application, reducing resource waste, and minimizing environmental pollution. As an important economic crop, the productivity of sugarcane is significantly influenced by various environmental factors, especially nitrogen supply. Traditional methods based on manually extracted image features are not only costly but are also limited in accuracy and generalization ability. To address these issues, a novel regression prediction model for estimating the nitrogen content of sugarcane, named SC-ResNeXt (Enhanced with Self-Attention, Spatial Attention, and Channel Attention for ResNeXt), has been proposed in this study. The Self-Attention (SA) mechanism and Convolutional Block Attention Module (CBAM) have been incorporated into the ResNeXt101 model to enhance the model’s focus on key image features and its information extraction capability. It was demonstrated that the SC-ResNeXt model achieved a test R2 value of 93.49% in predicting the nitrogen content of sugarcane leaves. After introducing the SA and CBAM attention mechanisms, the prediction accuracy of the model improved by 4.02%. Compared with four classical deep learning algorithms, SC-ResNeXt exhibited superior regression prediction performance. This study utilized images captured by smartphones combined with automatic feature extraction and deep learning technologies, achieving precise and economical predictions of the nitrogen content in sugarcane compared to traditional laboratory chemical analysis methods. This approach offers an affordable technical solution for small farmers to optimize nitrogen management for sugarcane plants, potentially leading to yield improvements. Additionally, it supports the development of more intelligent farming practices by providing precise nitrogen content predictions.
Traditional nutritional diagnosis suffers from inefficiency, high cost, and damage when predicting the nitrogen, phosphorus, and potassium content of sugarcane leaves. Non-destructive nutritional diagnosis of sugarcane leaves based on traditional machine learning and deep learning suffers from poor generalization and lower accuracy. To address these issues, this study proposes a novel convolutional neural network called WT-ResNet. This model incorporates wavelet transform into the residual network structure, enabling effective feature extraction from sugarcane leaf images and facilitating the regression prediction of nitrogen, phosphorus, and potassium content in the leaves. By employing a cascade of decomposition and reconstruction, the wavelet transform extracts multi-scale features, which allows for the capture of different frequency components in images. Through the use of shortcut connections, residual structures facilitate the learning of identity mappings within the model. The results show that by analyzing sugarcane leaf images, our model achieves R2 values of 0.9420 for nitrogen content prediction, 0.9084 for phosphorus content prediction, and 0.8235 for potassium content prediction. The accuracy rate for nitrogen prediction reaches 88.24% within a 0.5 tolerance, 58.82% for phosphorus prediction within a 0.1 tolerance, and 70.59% for potassium prediction within a 0.5 tolerance. Compared to other algorithms, WT-ResNet demonstrates higher accuracy. This study aims to provide algorithms for non-destructive sugarcane nutritional diagnosis and technical support for precise sugarcane fertilization.
Accurate assessment of nitrogen content in maize leaves is crucial for scientific fertilization and environmental protection in agricultural production. Traditional nutrient diagnosis methods are inefficient, costly, and destructive, while machine learning approaches based on handcrafted features rely heavily on manual design, leading to limited generalization ability and suboptimal prediction accuracy. To address these issues, this paper proposes a convolutional neural network model named SCBI-EfficientNetV2, which adopts EfficientNetV2-S as the backbone to overcome the limitations of manual feature engineering through automatic feature extraction. Furthermore, a Spatial and Channel Synergistic Attention (SCSA) module is introduced to enhance the modeling of critical regions and informative channels, and a Bidirectional Feature Pyramid Network (BiFPN) is incorporated to achieve effective multi-scale feature fusion, thereby improving the representation of hierarchical structural features in maize leaves. Experimental results show that SCBI-EfficientNetV2 achieves a coefficient of determination (R2) of 0.9417 on the test set, representing a 5.25% improvement over the baseline model and outperforming five classical deep learning approaches. In addition, the proposed model maintains high prediction accuracy with relatively low computational cost, demonstrating good adaptability for edge deployment. This study provides a feasible solution for non-destructive intelligent diagnosis of maize nutrition and offers technical support for precision fertilization and sustainable agricultural development.