Hami melon is a widely consumed fruit worldwide, and its sweetness, characterized by soluble solids content (SSC), is a key indicator of fruit quality and commercial value. In this study, hyperspectral imaging combined with machine learning was systematically applied to develop non-destructive models for SSC prediction in multiple Hami melon varieties. Four varieties, namely ‘Xizhoumi’, ‘Jiashigua’, ‘Jinfenghuang’, and ‘Heimeimao’, with a total of 160 samples, were used as the test materials. Hyperspectral images were collected, and SSC was measured at two pulp positions for each sample (denoted as BRIX1 and BRIX2). After applying preprocessing methods including Standard Normal Variate (SNV) transformation and Savitzky–Golay smoothing, five machine learning models were compared: XGBoost, LightGBM, Random Forest (RF), Support Vector Regression (SVR), and Partial Least Squares Regression (PLSR). Furthermore, an ensemble modeling strategy based on residual predictive deviation (RPD) weighting from the validation set was proposed. The results show that all models could effectively predict SSC, with the ensemble model achieving the best performance: the coefficients of determination (R2) for BRIX1 and BRIX2 were 0.848 and 0.833, the root mean square errors (RMSEs) were 0.992 and 0.899, the Mean Absolute Percentage Errors (MAPEs) were 6.90% and 6.76%, and the RPD values were 2.57 and 2.45, respectively, demonstrating its strong quantitative analysis capability. This performance benefited from three core optimized designs adopted in this study: (1) a multi-cultivar experimental design that verified the stable correlation between sugar-related spectral features and internal SSC across different Hami melon varieties; (2) an RPD-weighted ensemble modeling strategy that balanced the fitting ability and generalization performance of linear and nonlinear models; and (3) a dual-position SSC measurement design that validated the robustness of the model for SSC prediction at different spatial positions in the pulp. This study confirms the feasibility of hyperspectral imaging technology for non-destructive SSC detection in the four tested Hami melon varieties under laboratory-controlled conditions. The proposed ensemble model achieved a marginal but stable improvement in overall prediction accuracy across the tested varieties compared with the optimal single model, providing a preliminary methodological reference and data support for the development of cross-cultivar non-destructive SSC detection models for Hami melon.
Zheng et al. (Sat,) studied this question.