Fungal diseases are the main factors affecting the quality and production of vegetables. Rapid and accurate detection of pathogenic spores is of great practical significance for early prediction and prevention of diseases. However, there are some problems with microscopic images collected in the natural environment, such as complex backgrounds, more disturbing materials, small size of spores, and various forms. Therefore, this study proposed an improved detection method of GCS-YOLOv8 (Global context and CARFAE and Small detector-optimized YOLOv8), effectively improving the detection accuracy of small-target pathogen spores in natural scenes. Firstly, by adding a small target detection layer in the network, the network’s sensitivity to small targets is enhanced, and the problem of low detection accuracy of the small target is effectively improved. Secondly, Global Context attention is introduced in Backbone to optimize the CSPDarknet53 to 2-Stage FPN (C2F) module and model global context information. At the same time, the feature up-sampling module Content-Aware Reassembly of Features (CARAFE) was introduced into Neck to enhance the ability of the network to extract spore features in natural scenes further. Finally, we used an Explainable Artificial Intelligence (XAI) approach to interpret the model’s predictions. The experimental results showed that the improved GCS-YOLOv8 model could detect the spores of the three fungi with an accuracy of 0.926 and a model size of 22.8 MB, which was significantly superior to the existing model and showed good robustness under different brightness conditions. The test on the microscopic images of the infection structure of cucumber down mildew also proved that the model had good generalization. Therefore, this study realized the accurate detection of pathogen spores in natural scenes and provided feasible technical support for early predicting and preventing fungal diseases.
Read full abstract