Research on Target Detection Algorithm of Safflower Balls Based on Improved YOLOv5
In order to realize accurate recognition of safflower by picking robot in agricultural unstructured environment,a safflower target detection algorithm based on improved YOLOv5 was proposed.By embedding CBAM attention mechanism into YOLOv5 network,the expressiveness of small size objects in high-level features is improved.An Alpha-IoU target position loss function is established to improve the gradient disappearance problem existing in the original loss function GIOU,and the prediction rate of blocked red safflower is improved.By adding segmentation detection module into the tar-get detection network.The detection accuracy of small objects with width and height less than the lowest pixel was im-proved,and the improved YOLOv5 algorithm was trained by using the image amplification data set.Then,the YOLOv5 network and Faster R-CNN network before and after the improvement were compared under different safflower varieties,different natural lighting conditions,different weather conditions and different occlusion conditions.The experimental re-sults show that the P value and R value of the improved YOLOv5 algorithm are 90.45%and 0.90 respectively,and the mAP value of the unpicked safflower in the non-structural environment in blooming stage reaches 94.48%.Under differ-ent influencing factors,the algorithm can accurately identify safflower with high confidence,which can provide technical support for the automatic safflower picking robot recognition.