Maturity detection method of nectarine in natural environment based on improved YOLOv5s
Maturity is a key factor affecting fruit yield and quality.In order to realize the efficient detection of nectarine maturity in natural environment,an improved detection method of YOLOv5s model is proposed.Firstly,the feature pyramid structure of the original model neck is replaced by the BiS feature pyramid structure,so as to improve the fusion and extraction ability of maturity feature of the model.Then,the QFocal Loss loss function is used to integrate the target bounding box estimation and classification score together,so as to solve the problem of imbalance in the proportion of positive and negative samples in the training samples.Finally,CIoU-NMS is used as the non-maximum suppression method of the model to improve the detection effect of the model on occlusion and overlapping fruits.The experimental results on the self-made nectarine fruit data set show that the mAP value of the improved YOLOv5s-BQC model reaches 91.7%,which is 2.3%higher than the original model,and the precision value and recall value are also increased by 0.9%and 0.7%,respectively.Compared with other mainstream models,it has better detection performance,can accurately locate nectarine fruits in complex backgrounds,and perform maturity classification,which can meet the requirements for real-time detection of nectarine maturity,and provide technical support for agricultural monitoring and intelligent picking.