Effectively detecting the quality of blueberries is crucial for ensuring that high-quality products are supplied to the fresh market. This study developed a nondestructive method for determining the soluble solids content (SSC) of blueberry fruit by using a near-infrared hyperspectral imaging technique. The reflection hyperspectral images in the 900–1700 nm waveband range were collected from 480 fresh blueberry samples. An image analysis pipeline was developed to extract the spectrums of blueberries from the hyperspectral images. A regression model for quantifying SSC values was successfully established based on the full range of wavebands, achieving the highest of 0.8655 and the lowest RMSEP value of 0.4431 °Brix. Furthermore, three variable selection methods, namely the Successive Projections Algorithm (SPA), interval PLS (iPLS), and Genetic Algorithm (GA), were utilized to identify the feature wavebands for modeling. The models calibrated from feature wavebands generated an RMSEP of 0.4643 °Brix, 0.4791 °Brix, and 0.4764 °Brix, as well as the of 0.8507, 0.8397, and 0.8420 for SPA, iPLS, and GA, respectively. Furthermore, a pseudo-color distribution diagram of the SSC values within blueberries was successfully generated based on established models. This study demonstrated a novel approach for blueberry quality detection and inspection by jointly using hyperspectral imaging and machine learning methodologies. It can serve as a valuable reference for the development of grading equipment systems and portable testing devices for fruit quality assurance.
Anthracnose, a significant disease of aloe with characteristics of contact transmission, poses a considerable threat to the economic viability of aloe cultivation. To address the challenges of accurately detecting and classifying crop diseases in complex environments, this study proposes an enhanced algorithm, YOLOv11-seg-DEDB, based on the improved YOLOv11-seg model. This approach integrates multi-scale feature enhancement and a dynamic attention mechanism, aiming to achieve precise segmentation of aloe anthracnose lesions and effective disease level discrimination in complex scenarios. Specifically, a novel Disease Enhance attention mechanism is introduced, combining spatial attention and max pooling to improve the accuracy of lesion segmentation. Additionally, the DCNv2 is incorporated into the network neck to enhance the model’s ability to extract multi-scale features from targets in challenging environments. Furthermore, the Bidirectional Feature Pyramid Network structure, which includes an additional p2 detection head, replaces the original PANet network. A more lightweight detection head structure is designed, utilizing grouped convolutions and structural simplifications to reduce both the parameter count and computational load, thereby enhancing the model’s inference capability, particularly for small lesions. Experiments were conducted using a self-collected dataset of aloe anthracnose infected leaves. The results demonstrate that, compared to the original model, the improved YOLOv11-seg-DEDB model improves segmentation accuracy and mAP@50 for infected lesions by 5.3% and 3.4%, respectively. Moreover, the model size is reduced from 6.0 MB to 4.6 MB, and the number of parameters is decreased by 27.9%. YOLOv11-seg-DEDB outperforms other mainstream segmentation models, providing a more accurate solution for aloe disease segmentation and grading, thereby offering farmers and professionals more reliable disease detection outcomes.
Model updating is a challenging task with regard to maintaining the performance of non-destructive detection models while using hyperspectral imaging techniques for detecting the internal quality of fresh fruits like blueberries. Different sample batches and differences in hyperspectral image acquisition environments may lead to a significant decline in the performance of hyperspectral detection models. This study investigated the transferability of a hyperspectral model for the quantitating soluble solid content of blueberries across different batches for two harvest years. Hyperspectral images and SSC values of blueberries were collected from two batches, including 364 samples from 2024 and 175 samples from 2025. The differences between SSC measurements and spectral data across these two batches were analyzed. Based on the sample dataset of the year 2024, a high-performance quantitative model for detecting SSC values was established by combining it with partial least squares regression (PLSR) and competitive adaptive reweighted sampling (CARS). This high-performance model could achieve a high determination coefficient () of 0.8965 and a low root mean square error of prediction (RMSEP) of 0.3707 °Brix. Using the sample dataset for the year 2025, the hyperspectral model was updated by the semi-supervised parameter-free calibration enhancement (SS-PFCE) algorithm. The updated model performed better than those established using individual datasets from 2024 and 2025, and obtained an of 0.8347 and an RMSEP of 0.4930 °Brix. This indicates that the calibration transfer strategy is superior in improving hyperspectral model performance. This study demonstrated that the SS-PFCE algorithm, as a calibration transfer strategy, could effectively improve the transferability of the established model for detecting the SSC of blueberries across different sample batches.