Impurity rates detection for pepper harvesting based on YOLOv8n-Seg-ASB and random forest
To address the inaccuracies and inefficiencies of pepper impurity rates detection caused by complex material compositions and variable harvesting environments, this paper proposes a detection technique based on deep and machine learning algorithms. First, a machine vision-based image acquisition device for pepper material is designed to reliably capture high-quality real-time images. Then, the YOLOv8n-Seg-ASB model is developed for instance segmentation of pepper material images. This is achieved by integrating adaptive kernel convolution (AKConv) deformable convolutions into the backbone layer, the Slim-Neck lightweight architecture into the neck layer, and the Bottleneck-SEResNeXt (B-SEResNeXt) multi-scale detection head into the head layer of the YOLOv8n-Seg model. Next, segmented principal component analysis (Seg-PCA) is employed to extract the fitting length and width of the segmentation mask contour. Finally, a random forest (RF) model is constructed to predict impurity rates by incorporating features such as mask pixel area, fitting length, fitting width and mask perimeter. Experimental results show that the YOLOv8n-Seg-ASB model achieves enhanced combined segmentation performance, with a 14.3% increase in [email protected], a 17.35% reduction in model parameters, and an inference speed of 82.2 FPS. The mean error in impurity rates between the RF monitoring model and manual count was 6.14%, with an average detection time of 1.43 seconds. This study integrates deep and machine learning techniques with a robust image acquisition system to accurately detect impurity rates during pepper harvesting, offering valuable insights for the development of intelligent agricultural machinery.
Authors
- Xinyan Qin
- Jin Sheng Lei (ORCID: https://orcid.org/0000-0002-0157-6816)
- Shiguo Wang (ORCID: https://orcid.org/0000-0003-2566-6848)
- Chengfu Wang (ORCID: https://orcid.org/0000-0003-2931-7290)
- Lijian Lu
- Chenming Cheng
Institutions
- Shihezi University (CN)
- Xinjiang Academy of Agricultural and Reclamation Science (CN)
Publication Details
- Journal
- Smart Agricultural Technology
- Published
- 2025-07-20
- DOI
- https://doi.org/10.1016/j.atech.2025.101224
- Citations
- 1
- Primary Topic
- Advanced Chemical Sensor Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.67