*Article* **Detection of Famous Tea Buds Based on Improved YOLOv7 Network**

**Yongwei Wang, Maohua Xiao, Shu Wang, Qing Jiang, Xiaochan Wang and Yongnian Zhang \***

Engineering College, Nanjing Agricultural University, Nanjing 210031, China; 9203010615@stu.njau.edu.cn (Y.W.) **\*** Correspondence: hczyn@njau.edu.cn

**Abstract:** Aiming at the problems of dense distribution, similar color and easy occlusion of famous and excellent tea tender leaves, an improved YOLOv7 (you only look once v7) model based on attention mechanism was proposed in this paper. The attention mechanism modules were added to the front and back positions of the enhanced feature extraction network (FPN), and the detection effects of YOLOv7+SE network, YOLOv7+ECA network, YOLOv7+CBAM network and YOLOv7+CA network were compared. It was found that the YOLOv7+CBAM Block model had the highest recognition accuracy with an accuracy of 93.71% and a recall rate of 89.23%. It was found that the model had the advantages of high accuracy and missing rate in small target detection, multi-target detection, occluded target detection and densely distributed target detection. Moreover, the model had good real-time performance and had a good application prospect in intelligent management and automatic harvesting of famous and excellent tea.

**Keywords:** famous and excellent green tea; bud detection; improved YOLOv7 algorithm; attention mechanics
