In order to overcome the key challenges associated with detecting tomato leaf disease in complex agricultural environments, such as leaf occlusion, variation in lesion size and light interference, this study presents a lightweight detection model called ToMASD. This model integrates multi-scale feature decoupling and an adaptive alignment mechanism. The model innovatively comprises a dual-branch adaptive alignment module (TAAM) that achieves cross-scale lesion semantic alignment via a dynamic feature pyramid, a local context-aware gated unit (Faster-GLUDet) that uses a spatial attention mechanism to suppress background noise interference, and a multi-scale decoupling detection head (MDH) that balances the detection accuracy of small and diffuse lesions. On a dataset containing six types of disease under various weather conditions, ToMASD achieves an average precision of 84.3%,.by a margin of 4.7% to 12.1% over thirteen mainstream models. The computational load is compressed to 7.1 GFLOPs. Through the introduction of a transfer learning paradigm, the pre-trained weights of the tomato disease detection model can be transferred to common bean and potato detection tasks. Through domain adaptation layers and adversarial feature decoupling strategies, the domain shift problem is overcome, achieving an average precision of 92.7% on the target crop test set. False detection rates in foggy and strong light conditions are controlled at 6.3% and 9.8%, respectively. This study achieves dual breakthroughs in terms of both high-precision detection in complex scenarios and the cross-crop generalization ability of lightweight models. It provides a new paradigm for universal agricultural disease monitoring systems that can be deployed at the edge.
The maturity of Lentinus edodes directly affects its quality, taste, and market value. Currently, maturity assessment primarily relies on manual experience, making it difficult to ensure efficiency and consistency. To achieve efficient and accurate detection of Lentinus edodes maturity, this study proposes an improved lightweight object detection model, YOLOv8n-CFS. Based on YOLOv8n, the model integrates the SegNeXt Attention structure to enhance key feature extraction capabilities and optimize feature representation. A Feature Diffusion Propagation Network (FDPN) is designed to improve the expressive ability of objects at different scales through cross-layer feature propagation, enabling precise detection. The CSFCN module combines global cue reasoning with fine-grained spatial information to enhance detection robustness and generalization performance in complex environments. The CWD method is adopted to further optimize the model. Experimental results demonstrate that the proposed model achieves 97.34% mAP50 and 84.5% mAP95 on the Lentinus edodes maturity detection task, representing improvements of 2.02% and 4.92% compared to the baseline method, respectively. It exhibits excellent stability in five-fold cross-validation and outperforms models such as Faster R-CNN, YOLOv5n, YOLOv7-tiny, YOLOv8n, YOLOv8s, YOLOv10n, YOLOv11n, and YOLOv12. This study provides efficient and reliable technical support for Lentinus edodes maturity detection and holds significant implications for the intelligent production of edible fungi.
In traditional time-series image prediction tasks, both accuracy and image quality tend to deteriorate as the prediction horizon extends. To address this challenge in Shiitake mushroom fruiting body growth prediction, this study selected Shiitake mushroom strain No. 509, cultivated by the Shanghai Academy of Agricultural Sciences, as the experimental subject and proposed an enhanced model, VMRNN-DMSA, based on the Vision Mamba RNN Depth architecture. This model integrates a skip-connection mechanism with a Max Feature Map module to effectively filter and fuse features, enhancing feature representation and prediction accuracy. Additionally, a Spatial Attention Mechanism was introduced to strengthen the perception of key regions and improve spatial modeling. Furthermore, an Adaptive Kernel Convolution module with irregular context convolution kernels was incorporated to extract fine-grained local features and enhance visual quality. A weighted loss function was used to balance pixel-level accuracy, structural fidelity, and perceptual quality. This function combines Mean Squared Error Loss, Multi-Scale Structural Similarity, and Perceptual Loss. Experimental results showed that the proposed method achieved an MSE of 39.4255, an SSIM of 0.8579, and a PSNR of 22.0774. Compared with baseline models, MSE decreased by 29.05%, while SSIM and PSNR increased by 19.34% and 14.52%, respectively. These results indicate that VMRNN-DMSA significantly improves both prediction accuracy and image quality in long-term forecasting tasks, providing a reliable reference for the growth prediction of other edible fungi.