Faster and accurate green pepper detection using NSGA-II-based pruned YOLOv5l in the field environment

Yulong Nan, Huichun Zhang, Yong Zeng, Jiaqiang Zheng, Yufeng Ge

Research output: Contribution to journalArticlepeer-review

10 Scopus citations


Rapid and accurate detection of green peppers are essential for their growth monitoring, yield estimation, phenotypic monitoring, and robotic harvesting. In order to simplify the detection model and improve the detection efficiency, the NSGA-II-based (Non-dominated Sorting Genetic Algorithm-II-based) pruning algorithm was proposed to obtain an optimal pruning that balanced the detection accuracy and speed of the pruned model. A green pepper detection model was trained using YOLOv5l, and the NSGA-II-based pruning algorithm was implemented to obtain a YOLOv5l pepper detection model. The number of model parameters, model size, and GFlops of the pruned model were reduced by 73.9 %, 73.5 %, and 62.7 %, respectively. The mAP0.5 of the pruned model was 81.4 %, only slightly lower (by 0.973 %) than that of the original model.The detection speed of the pruned model was 70.9f/s, which was 59.0 % higher than that of the model before pruning. The NSGA-II-based pruning also significantly outperformed other two algorithms, namely, Slim pruning and EagleEye pruning, in terms of number of parameters, model size, GFlops, and detection speed, with a slight reduction in mAP0.5 0.973 % compared to EagleEye pruning. Finally, the NSGA-II-based pruned YOLOv5l pepper detection model was compared with other 11 deep learning models. Except that the mAP0.5 was only 0.367 % lower than that of YOLOv4, our method again showed had obvious advantages in terms of parameter quantity, model size, GFlops, mAP0.5, and detection speed. This research provided a new method and insights for the pruning of deep learning models, which is a necessary step to deploy them in compact mobile devices for real-time applications.

Original languageEnglish (US)
Article number107563
JournalComputers and Electronics in Agriculture
StatePublished - Feb 2023


  • Detection
  • Field environment
  • Green pepper
  • NSGA-II-based pruning algorithm
  • YOLOv5l

ASJC Scopus subject areas

  • Forestry
  • Agronomy and Crop Science
  • Computer Science Applications
  • Horticulture


Dive into the research topics of 'Faster and accurate green pepper detection using NSGA-II-based pruned YOLOv5l in the field environment'. Together they form a unique fingerprint.

Cite this