Soil organic matter (SOM) content is a key indicator for assessing soil health, carbon cycling, and soil degradation. Traditional SOM detection methods are complex and time-consuming and do not meet the modern agricultural demand for rapid, non-destructive analysis. While significant progress has been made in spectral inversion for SOM prediction, its accuracy still lags behind traditional chemical methods. This study proposes a novel approach to predict SOM content by integrating spectral, texture, and color features using a three-branch convolutional neural network (3B-CNN). Spectral reflectance data (400–1000 nm) were collected using a portable hyperspectral imaging device. The top 15 spectral bands with the highest correlation were selected from 260 spectral bands using the Correlation Coefficient Method (CCM), Boruta algorithm, and Successive Projections Algorithm (SPA). Compared to other methods, CCM demonstrated superior dimensionality reduction performance, retaining bands highly correlated with SOM, which laid a solid foundation for multi-source data fusion. Additionally, six soil texture features were extracted from soil images taken with a smartphone using the gray-level co-occurrence matrix (GLCM), and twelve color features were obtained through the color histogram. These multi-source features were fused via trilinear pooling. The results showed that the 3B-CNN model, integrating multi-source data, performed exceptionally well in SOM prediction, with an R2 of 0.87 and an RMSE of 1.68, a 23% improvement in R2 compared to the 1D-CNN model using only spectral data. Incorporating multi-source data into traditional machine learning models (SVM, RF, and PLS) also improved prediction accuracy, with R2 improvements ranging from 4% to 11%. This study demonstrates the potential of multi-source data fusion in accurately predicting SOM content, enabling rapid assessment at the field scale and providing a scientific basis for precision fertilization and agricultural management.
Soil organic matter (SOM) and total nitrogen (TN) are critical indicators for assessing soil fertility. Although laboratory chemical analysis methods can accurately measure their contents, these techniques are time-consuming and labor-intensive. Spectral technology, characterized by its high sensitivity and convenience, has been increasingly integrated with machine learning algorithms for soil nutrient monitoring. However, the process of spectral data analysis remains complex and requires further optimization for simplicity and efficiency to improve prediction accuracy. This study proposes a novel model to enhance the accuracy of SOM and TN predictions in northeast China’s black soil. Visible/Shortwave Near-Infrared Spectroscopy (Vis/SW-NIRS) data within the 350–1070 nm range were collected, preprocessed, and dimensionality-reduced. The scores of the first nine principal components after a partial least squares (PLS) dimensionality reduction were selected as inputs, and the measured SOM and TN contents were used as outputs to build a back-propagation neural network (BPNN) model. The results show that spectral data processed by the combination of standard normal variate (SNV) and multiple scattering correction (MSC) have the best modeling performance. To improve the accuracy and stability of this model, three algorithms named random search (RS), grid search (GS), and Bayesian optimization (BO) were introduced. The results demonstrate that Vis/SW-NIRS provides reliable predictions of SOM and TN contents, with the PLS-RS-BPNN model achieving the best performance (R2 = 0.980 and 0.972, RMSE = 1.004 and 0.006 for SOM and TN, respectively). Compared to traditional models such as random forests (RF), one-dimensional convolutional neural networks (1D-CNNs), and extreme gradient boosting (XGBoost), the proposed PLS-RS-BPNN model improves R2 by 0.164–0.344 in predicting SOM and by 0.257–0.314 in predicting TN, respectively. These findings confirm the potential of Vis/SW-NIRS technology and the PLS-RS-BPNN model as effective tools for soil nutrient prediction, offering valuable insights for the application of spectral technology in sensing soil information.