FFTCA: a Feature Fusion Mechanism Based on Fast Fourier Transform for Rapid Classification of Apple Damage and Real-Time Sorting by Robots
摘要
Apples are susceptible to various types of damage during the production process. Such damage not only affects the appearance and edibility of the apples but also can result in the infection of healthy apples, leading to secondary economic losses. Therefore, it is crucial to properly handle damaged apples and re-sort them to enhance their utilization value and optimize resource use. To quickly and accurately identify apple damage and perform sorting in real time, addressing the resource limitations of mobile devices and the difficulty of extracting deep network image features, this study proposes a lightweight real-time apple damage classification network, Fast Fourier Transform Channel Attention (FFTCA)-YOLOv8n-cls. The FFTCA module focuses on the frequency domain feature information of images in deep networks, enhancing the network’s feature extraction capabilities. Additionally, it integrates Convolutional Block Attention Module (CBAM) and Distribution Shifting Convolution to capture channel and spatial information of images in shallow networks and accelerate network inference. Finally, FFTCA-YOLOv8n-cls is compared with typical lightweight classification networks. Experimental results show that this network has better classification accuracy and faster inference speed. Specifically, the FFTCA-YOLOv8n-cls network is only 0.601 MB in size, achieving a classification accuracy of 96.03%, a recall of 96.08%, and an F1-score of 96.05%, demonstrating its feasibility in real-time apple damage sorting. Moreover, this study applies the network to sorting robots, completing backend inference on servers and real-time inference on embedded devices to adapt to different working environments, achieving real-time sorting of damaged apples and validating the network’s application effectiveness.