Abstract:
To address the issues of missed detection, false detection, and insufficient real-time performance in the eggplant picking process by agricultural robots, a lightweight deep learning-based improvement method was proposed to meet the real-time picking requirements of small agricultural machinery for eggplants in natural environments and to achieve accurate detection of target eggplants and precise localization of picking regions. Given the computational resource constraints of small agricultural machinery, the proposed method was based on YOLOv7-tiny, which has fewer parameters and lower computational complexity. Two parallel improvements were made to its neck network: the original spatial pyramid pooling cross stage partial channel (SPPCSPC) module was replaced with an SPPCSPC module incorporating a grouped convolution strategy to reduce feature map sizes and channel numbers, thereby decreasing computational load; and the original efficient layer attention network (ELAN) structure was replaced with a reparameterized RCS-OSA (reparameterized convolution shuffling-based one-shot aggregation) module to obtain richer feature information and reduce time consumption. On this basis, the layer-adaptive magnitude pruning (LAMP) strategy was employed for model pruning to further compress the model size and improve its deployability on small agricultural machinery platforms. Meanwhile, a dataset was constructed using depth camera-collected eggplant samples of different varieties, maturities, and under different shooting conditions, and the proposed model was tested on this dataset. The results show that the average detection accuracy of the improved model reaches 96.7%, which is 1.9% higher than that of the original YOLOv7-tiny, with a parameter reduction of 68.3% and a detection speed of 75 frames per second. Therefore, it is demonstrated that the proposed improved model significantly enhances detection accuracy while maintaining lightweight characteristics, and an effective solution is provided for automatic eggplant detection and localization in picking robots.