Abstract:
Safflower is one of the most important cash crops in China. Its production area is concentrated in Xinjiang, Gansu and Ningxia. However, the harvesting of safflower relies mainly on manual labour at present. Particularly, the operating environment is easily affected by weather factors. Fortunately, intelligent harvesting can be expected to improve the efficiency of safflower harvesting with labour cost savings. Previous research often focused on pneumatic, pulling, combing, and cutting harvesting. However, it is still required for manual work during harvesting. The autonomous operation can be realized by combining target detection and navigation in the harvesting robots. However, the complex working environment in the field has limited the accurate recognition and localization in the harvesting process. This study aims to promote the performance of safflower recognition under the complex environment in the field during intelligent harvesting. A lightweight safflower recognition was also proposed using an improved YOLOv8n. The computational resources of the device were then deployed to the model on the mobile for detection. A dataset of 2309 images was created to categorize into two classes: picked and no picked. The safflower blooming was categorized into four stages, namely the bud, first flowering, prime bloom, and septum stage. The prime bloom stage was the best picking time in the most economically beneficial period of safflower. Therefore, the safflower only in the prime bloom stage was picked rather than the bud, first flowering, and septum stage. The improvement procedures were as follows. Firstly, the Vanillanet lightweight network structure was applied to substitute for the Backbone of YOLOv8n, in order to reduce the complex structure of the model. Secondly, the large separable kernel attention (LSKA) module was introduced into the Neck, in order to reduce the amount of storage and computational resource consumption. Thirdly, The YOLOv8n's loss function was revised from the center intersection of union (CIoU) to the wise intersection of union (WIoU), in order to improve the overall performance of the detector. Finally, the stochastic gradient descent (SGD) was chosen to train the model for robustness. The experimental results showed that the frames per second (FPS) of the improved lightweight model increased by 7.41%, while the weight file was only 50.17% of the original one. The precision (
P) and the mean average precision (mAP) values reached 93.10% and 96.40%, respectively. Furthermore, the FPS was improved by 25.93% and 19.76%, the weight file was reduced by 21.90% and 25.86%, respectively, compared with the YOLOv5s and YOLOv7-tiny models. Meanwhile, better robustness was achieved in the improved model. The Jetson Orin NX flatform was then selected to deploy for testing. The single-image detection time of YOLOv8n and YOLOv8n-VLWS was 0.38s and 0.27s, which was 28.95% shorter than the original model. The high precision and lightweight of real-time detection was realized for the safflower in the field. The findings can provide the technical support to develop intelligent harvesting equipment for safflower.