Improving Detection of Mature Citrus Fruit Based on Target Detection Algorithm YOLOv5s
In order to improve the efficiency and quality for inspection of citrus orchard,it is very important for inspection robot to accurately detect ripe citrus fruits.Considering the unique color space of ripe citrus fruits,small targets caused by fruit occlusion,and limited hardware resources of inspection robot,this paper proposes a simple and effective citrus ripe fruit detection method based on improving YOLOv5s.In this work,to im-prove YOLOv5s,a pyramid structure feature extraction layer composed of three-layer Context Aggregation blocks(CABlock)was designed and inserted into the head part of YOLOv5s network.The improved YOLOv5s model has the following advantages:(1)The integrated underlying CABlock module can better and faster learn the color and texture features of small target of local ripe fruits and the edge features of overlapped fruits through the feature channel attention mechanism and spatial attention mechanism.(2)The feature pyra-mid constructed by multi-layer CABlock module can effectively avoid the disappearance of small targets with the increase of network depth,thus reducing the missing rate of small target fruits.The results of citrus ripe fruit recognition validation test show that the accuracy and average accuracy of the improved YOLOv5s net-work model were 98.21%and 98.07%,respectively,which were improved by 0.31%and 0.17%compared with the original YOLOv5s,and improved by 8.41%and 8.31%compared with faster R-CNN,respectively.The average accuracy of identifying occluded fruits,overlapping fruits and small target fruits was 99.4%,97.2%and 98.0%,respectively.Meanwhile,the average detection time of a single mature citrus fruit image was 32.5 ms.Model occupies 15.8 MB of memory.The results show that the improved YOLOv5s model can realize rapid and accurate detection and identification of mature citrus fruit,and prediction of yield under natural environment of orchard,and can provide technical support for inspection of yield with citrus orchard inspection robot.