# ASHM-YOLOv9: A Detection Model for Strawberry in Greenhouses at Multiple Stages
## 1 Introduction
The YOLOv7-tiny model can reduce the monitoring time, but the detection performance is slightly reduced. [PERSON] [21] proposed and evaluated the LS-YOLOv8s model for strawberry maturity detection and LW-Swin transform modules. The results indicate that for mAP50, the precision of LS-YOLOv8s increases by 1.6% compared with that of YOLOv5s. The LS-YOLOv8s used only 51.93% of the parameters, and the detection precision reached 94.4%, which provides good technical support for strawberry object detection. Although existing studies have achieved relatively highly accurate strawberry object detection, the datasets used in most of these studies are based on mature strawberry plants in the field, and for the flower stage and growth stage of strawberry plants, the identification content is limited. In recent years, strawberry plants grown in greenhouses have become increasingly widely used. Field surveys have revealed that strawberry plants grown in greenhouses often exhibit inconsistent stages. Therefore, it is increasingly important to perform object detection of strawberry plants grown in greenhouses at different stages. To address the aforementioned issues, our research focuses on the YOLOv9 model, which is a newly released version of the YOLO series with higher precision and faster inference speed, to improve and optimize the algorithm for identifying the different stages of strawberry growth and to research a multistage object detection model for strawberry growth in greenhouses. Among existing crop recognition algorithms, two-stage detection algorithms (such as Faster R-CNN and Mask R-CNN) demonstrate superior accuracy but suffer from high computational overhead due to their complex candidate region generation process, making them unsuitable for real-time detection requirements. In contrast, single-stage detection algorithms achieve a better balance between speed and accuracy. Among the various YOLO series algorithms, YOLOv5 has become the mainstream choice for agricultural applications because of its mature architecture and stable performance; however, it still has limitations in multistage target detection capabilities in complex greenhouse environments. YOLOv7 improves detection accuracy through the introduction of reparameterizable modules, but it increases model complexity and lacks adaptability across different growth stages. YOLOv8 shows overall performance improvements but still lacks targeted optimization for recognizing strawberries at different growth stages in greenhouse environments. The newly released YOLOv9 model achieves higher precision and faster inference speed through more advanced architectural design, providing a better foundation platform for multistage strawberry detection in greenhouses. Based on this analysis, this study selects YOLOv9 as the base model and focuses on algorithm improvement and optimization tailored to the characteristics of different growth stages of greenhouse strawberry, aiming to construct a strawberry detection model capable of accurately identifying multiple stages, such as flowering and growth periods, to meet the practical requirements of strawberry growth monitoring in greenhouse environments. In this study, we used the greenhouse strawberry dataset we constructed to create an ASHM-YOLOv9 model with higher precision and a smaller volume by introducing modules such as adjustable kernel convolution, the SE network, Haar wavelet downsampling, and other modules. The remainder of this article is structured as follows: Section 2 presents the experimental data and methods. An analysis of the comparative experiments and ablation experiments is presented in Section 3. Finally, Section 4 presents the conclusions and analysis. The main accomplishments of this research are as follows:  
1. A strawberry image dataset consisting of 2682 images was established via digital camera photography and data augmentation methods, which included a total of 13,668 strawberry samples across three growth stages. 2.