| China is a major importer and exporter of fruits and vegetables.Due to the different geographical locations and climates of the countries in the world,the differences in the types of fruits and vegetables between the countries are very obvious.The differences in fruits and vegetables will affect the import and export transactions of fruits and vegetables in China.In addition,the retail process of fruits and vegetables in supermarkets is still in the manual weighing method,which wastes manpower and is inefficient.This way seriously affects the customer’s shopping experience.In view of these circumstances,this paper proposes a fruit and vegetable detection and recognition algorithm based on Mask Scoring R-CNN,which can realize the tasks of fruit and vegetable detection,recognition and segmentation.In the future,the algorithm can be used not only for mobile fruits and vegetables detection and popular science,but also for intelligent weighing of fruits and vegetables.The research contents and contributions of this article are as follows:(1)This paper constructs a fruit and vegetable image data set that contains a variety of daily fruits and vegetables,and is named Veg F,which is suitable for tasks such as fruit and vegetable recognition,fruit and vegetable detection,fruit and vegetable segmentation,and so on.Veg F contains a total of 36,000 fruit and vegetable images,a total of 36 kinds of fruit and vegetable categories,including 24 types of fruits and 12 types of vegetables,not only contains a single target image of each category,but also multi-target images of the same category and mixed images of multiple categories.Veg F considers fully the situations that may occur in target detection and recognition.At present,there is generally no fruit and vegetable image data set suitable for fruit and vegetable detection and recognition.The emergence of Veg F data set is helpful for the research of daily fruit detection and recognition algorithms.(2)In view of the problems in the feature pyramid network,this paper uses the Aug FPN structure to narrow the semantic difference between features,to make the features more suitable for subsequent feature summation.And this paper uses residual enhancement to reduce the features in the highest channel of the pyramid loss of information.Experimental results show that in the COCO 2017 data set,Aug FPN can increase Mask Scoring R-CNN’s APbbox by 1.6 percentage points and APmask by 1.3 percentage points;in the fruit and vegetable data set,APbbox increased by 1.4 percentage points and APmask by 0.7 percentage points.(3)On the basis of Mask Scoring R-CNN,this paper proposes the MS-Io U R-CNN structure,which introduces the box Io U branch to predict Io U between the prediction box and the corresponding real box;secondly,the training samples generated by RPN The number is insufficient and the Io U distribution is unbalanced.In this paper,controllable dithering is added to each bounding box to obtain enough training samples with balanced Io U distribution.In addition,the product of the predicted Io U and the classification confidence is used as the non-maximum value.Suppression algorithm based on the ranking of the bounding box,so as to retain the more accurate bounding box and achieve more accurate target positioning.Experiments show that in the COCO 2017 data set,compared with the MS R-CNN model,the MS-Io U R-CNN model increased APbbox by 1.2 percentage points and APmask by 0.8percentage points;in the fruit and vegetable data set,APbboxincreased by 1.9 percentage points,APmask increased by 1.5 percentage points.(4)This article adopts the idea of the lightweight convolutional neural network,and proposes two compression models:DSC-MS R-CNN and SGS-MS R-CNN.Compared with the MS-Io U R-CNN+Aug FPN model proposed in this paper,the running time of the DSC-MS R-CNN model is reduced by 78ms and the occupied memory is reduced by 417MB.The run time of the SGS-MS R-CNN model is reduced by 92ms and the occupied memory is reduced545MB.The compression model in this paper saves at least 54.0%of memory space compared with the original model,which makes the fruit and vegetable detection and recognition algorithm of this paper have higher practical value. |