In response to the problems of low recognition accuracy of tomato plant diseases and pests, high rate of missed and false detections of small targets, and difficulty in balancing model lightweight and real-time performance, this paper proposes an improved YOLOv11 detection model (BSAP-YOLOv11) that integrates BiFPN, Shuffle Attention, and P2 detection head. Firstly, using YOLOv11n as the baseline, a P2 small object detection head was added and redundant scale layers were removed. BiFPN bidirectional feature pyramid was introduced to enhance multi-scale feature fusion, and Shuffle Attention mechanism was embedded to enhance lesion feature expression; Secondly, in the preprocessing of tomato plant disease and pest datasets, a balanced dataset containing 9 types of diseases was constructed using GAN generative enhancement and conventional amplification to enhance feature expression ability. The experiment showed that the mAP0.5 of the BSAP-YOLOv11 model reached 99.13%, mAP0.5:0.95 reached 92.50%, FPS was 132.65 frames per second, and FLOPs were only 5.32G. Compared with the selected baseline algorithm, it has the best comprehensive performance, can achieve low missed detections, low false detections, and significantly improve counting accuracy. Research has shown that BSAP-YOLOv11 achieves a good balance between accuracy, speed, and lightweight, and can accurately identify multiple types of tomato pests and diseases, providing an effective technical solution for intelligent monitoring of tomato pests and diseases.