Applied Sciences (Sep 2023)
<i>Camellia oleifera</i> Fruit Detection Algorithm in Natural Environment Based on Lightweight Convolutional Neural Network
Abstract
At present, Camellia oleifera fruit harvesting relies on manual labor with low efficiency, while mechanized harvesting could result in bud damage because flowering and fruiting are synchronized. As a prerequisite, rapid detection and identification are urgently needed for high accuracy and efficiency with simple models to realize selective and intelligent harvesting. In this paper, a lightweight detection algorithm YOLOv5s-Camellia based on YOLOv5s is proposed. First, the network unit of the lightweight network ShuffleNetv2 was used to reconstruct the backbone network, and thereby the number of computations and parameters of the model was reduced to increase the running speed for saving computational costs. Second, to mitigate the impact of the lightweight improvement on model detection accuracy, three efficient channel attention (ECA) modules were introduced into the backbone network to enhance the network’s attention to fruit features, and the Concat operation in the neck network was replaced by the Add operation with fewer parameters, which could increase the amount of information under features while maintaining the same number of channels. Third, the Gaussian Error Linear Units (GELU) activation function was introduced to improve the nonlinear characterization ability of the network. In addition, to improve the ability of the network to locate objects in the natural environment, the penalty index was redefined to optimize the bounding box loss function, which can improve the convergence speed and regression accuracy. Furthermore, the final experimental results showed that this model possesses 98.8% accuracy, 5.5 G FLOPs computation, and 6.3 MB size, and the detection speed reached 60.98 frame/s. Compared with the original algorithm, the calculation amount, size, and parameters were reduced by 65.18%, 56.55%, and 57.59%, respectively. The results can provide a technical reference for the development of a Camellia oleifera fruit-harvesting robot.
Keywords