Abstract Accurate recognition of strawberry flower and fruit growth stages is a critical measurement technique in smart agriculture, directly influencing cultivation management optimization, food quality control, and intelligent perception in agricultural automation systems. It also supports precise fertilization, harvesting timing decisions, and pest and disease prevention. However, challenges such as complex backgrounds, occlusions from branches and leaves, multi-scale targets, and subtle differences between growth stages significantly constrain detection accuracy. To address these issues, this paper proposes a detection model called Cross-Stage Perception and Multi-Scale Edge Feature Enhancement based Detection Transformer (CSEF-DETR), which is designed to achieve high-precision recognition of strawberry flower and fruit growth stages. The model introduces a Cross-Stage Perception Multi-Scale Edge Feature Enhancement Module (CSP_MS-EFEM) to replace the traditional BasicBlock, thereby improving semantic and edge feature extraction capabilities. An Additive Multi-Scale Attention Integrated Feature Interaction Module (AMS-AIFI) is designed by integrating a Convolutional Additive Self-Attention (CASA) mechanism to enhance multi-scale semantic interactions. Additionally, a lightweight Multi-branch Feature Refinement Block (MFRB) is developed by integrating a Mixed Aggregation Network (MANet) with the FasterBlock architecture, aiming to boost feature aggregation efficiency and overall performance. Experimental results demonstrate that CSEF-DETR achieves outstanding performance in strawberry flower and fruit detection, with an F1 score of 82.8% and mAP@50 of 82.1%, surpassing existing state-of-the-art methods. Compared with RT-DETR-r18, the model reduces FLOPs and parameter count by 9.9% and 23.7%, respectively, and achieves a real-time inference speed of 11.6 FPS on the NVIDIA Jetson Orin NX. Overall, CSEF-DETR significantly improves detection accuracy and efficiency while reducing model complexity, offering robust support for efficient measurement and intelligent monitoring of agricultural product growth stages.