Pest-YOLO: A model for large-scale multi-class dense and tiny pest detection and counting

Changji Wen, Hongrui Chen, Zhenyu Ma, Tian Zhang, Ce Yang, Hengqiang Su, Hongbing Chen

Research output: Contribution to journalArticlepeer-review


Frequent outbreaks of agricultural pests can reduce crop production severely and restrict agricultural production. Therefore, automatic monitoring and precise recognition of crop pests have a high practical value in the process of agricultural planting. In recent years, pest recognition and detection have been rapidly improved with the development of deep learning-based methods. Although certain progress has been made in the research on pest detection and identification technology based on deep learning, there are still many problems in the production application in a field environment. This work presents a pest detector for multi-category dense and tiny pests named the Pest-YOLO. First, the idea of focal loss is introduced into the loss function using weight distribution to improve the attention of hard samples. In this way, the problems of hard samples arose from the uneven distribution of pest populations in a dataset and low discrimination features of small pests are relieved. Next, a non-Intersection over Union bounding box selection and suppression algorithm, the confluence strategy, is used. The confluence strategy can eliminate the errors and omissions of pest detection caused by occlusion, adhesion and unlabeling among tiny dense pest individuals to the greatest extent. The proposed Pest-YOLO model is verified on a large-scale pest image dataset, the Pest24, which includes more than 20k images with over 190k pests labeled by agricultural experts and categorized into 24 classes. Experimental results show that the Pest-YOLO can obtain 69.59% for mAP and 77.71% for mRecall on the 24-class pest dataset, which is 5.32% and 28.12% higher than the benchmark model YOLOv4. Meanwhile, our proposed model is superior to other several state-of-the-art methods, including the SSD, RetinaNet, Faster RCNN, YOLOv3, YOLOv4, YOLOv5s, YOLOv5m, YOLOX, DETR, TOOD, YOLOv3-W, and AF-RCNN detectors. The code of the proposed algorithm is available at:

Original languageEnglish (US)
Article number973985
JournalFrontiers in Plant Science
StatePublished - Oct 25 2022

Bibliographical note

Funding Information:
The research was funded by the Industrial Technology and Development Project of Development and Reform Commission of Jilin Province (No.2021C044-8), Jilin Provincial Science and Technology Development Plan Project (No.20210203013SF), The research and planning project of Jilin Provincial Department of Education (No.JJKH20220376SK) and the National Natural Science Foundation of China (Key Program) (No.U19A2061).

Publisher Copyright:
Copyright © 2022 Wen, Chen, Ma, Zhang, Yang, Su and Chen.


  • deep learning
  • dense and tiny pest individuals
  • intelligent phytoprotection
  • pest detection and counting
  • Pest-YOLO
  • YOLOv4

PubMed: MeSH publication types

  • Journal Article


Dive into the research topics of 'Pest-YOLO: A model for large-scale multi-class dense and tiny pest detection and counting'. Together they form a unique fingerprint.

Cite this