In this study, an advanced method for apricot tree disease detection is proposed that integrates deep learning technologies with various data augmentation strategies to significantly enhance the accuracy and efficiency of disease detection. A comprehensive framework based on the adaptive sampling latent variable network (ASLVN) and the spatial state attention mechanism was developed with the aim of enhancing the model’s capability to capture characteristics of apricot tree diseases while ensuring its applicability on edge devices through model lightweighting techniques. Experimental results demonstrated significant improvements in precision, recall, accuracy, and mean average precision (mAP). Specifically, precision was 0.92, recall was 0.89, accuracy was 0.90, and mAP was 0.91, surpassing traditional models such as YOLOv5, YOLOv8, RetinaNet, EfficientDet, and DEtection TRansformer (DETR). Furthermore, through ablation studies, the critical roles of ASLVN and the spatial state attention mechanism in enhancing detection performance were validated. These experiments not only showcased the contributions of each component for improving model performance but also highlighted the method’s capability to address the challenges of apricot tree disease detection in complex environments. Eight types of apricot tree diseases were detected, including Powdery Mildew and Brown Rot, representing a technological breakthrough. The findings provide robust technical support for disease management in actual agricultural production and offer broad application prospects.