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.