| More and more people are paying attention to fruit selection as their health awareness and economic level improve.Different varieties of fruit are different in taste,quality and price,etc.,but at present,the distinction between fine-grained fruits of the same kind and different species with slight differences still rely on experienced fruit farmers and trademarks,which leads to high labor cost and market injustice during the production to trade of fruits.Deep learning methods have powerful automatic learning feature representation and discrimination capabilities.However,due to the lack of public data,the complexity of realistic scenarios and the similarity of fine-grained fruit features,deep learning techniques are rarely studied in the field of fine-grained fruit localization and variety recognition.Therefore,considering the existing problems,this paper conducts the research and application of fine-grained fruit variety detection algorithm based on deep learning to improve the accuracy and efficiency of fruit detection,promote the intelligent upgrading of fruit industry,enhance the competitiveness of fruit market and protect the interests of consumers.The specific research contents are as follows:(1)Production of fine-grained fruit variety detection datasetIn view of the lack of public datasets for current fine-grained fruit variety-related object detection research,this paper firstly identifies varieties by base professionals,then collects single-class and multi-class mixed fine-grained fruit RGB images covering single,field and complex backgrounds as well as different lighting,placing angles and shading degrees using motorized turntables and ordinary cameras at various agricultural test bases in Baoji,Guangzhou and Shenzhen,etc.,and then constructs a complete fine-grained fruit variety detection dataset ZFruit through manual annotation,dataset partitioning and online data enhancement.Solve the problem that the lack of dataset restricts the research,optimization and application of algorithm in the field of fine-grained fruit variety detection,and provide effective data support for practical applications such as precise management of orchards,intelligent sorting and selling of fruits in supermarkets,daily science popularization and identification of consumers,and intellectual property protection of seed industry.(2)Research on fine-grained fruit variety detection algorithm based on deep learningAiming at the difficulty of existing fruit variety detection algorithms to adapt to the high precision and lightweight detection of fine-grained fruits in different environments,this paper integrates CA attention mechanism based on YOLOv5 to solve the problem that existing networks are difficult to extract discriminant features from similar features of fine-grained fruit.On this basis,by introducing the idea of Ghost lightweight network,a new GC-based feature extraction network is constructed to improve detection accuracy and reduce network parameters.Then a CARAFE-based feature fusion network is constructed by introducing the CARAFE content-aware upsampling operator to solve the problem that upsampling cannot be generated adaptively in the current network and the multiscale spatial features of fine-grained fruit images cannot be fully utilized.Then the model is optimized by introducing the ideas of object confidence scaling and teacher assistant knowledge distillation to solve the problems of unbalanced positive and negative samples due to excessive background candidate regions and low distillation efficiency due to large gap between teachers and students’ networks.Finally,a high-precision and lightweight fine-grained fruit variety detection model DGCC-Fruit is proposed to provide effective technical support for fine-grained fruit variety detection.(3)Research and design of fine-grained fruit variety detection system based on mobile platformIn view of the high complexity and large size of existing network models that make mobile platform deployment difficult,using the lightweight variety detection model of fine-grained fruit proposed in this study,the development of model offline detection system including data acquisition,model inference,result display and other functions on mobile embedded portable devices is realized based on Android.It can be used in offline application scenarios such as precise management of orchards,intelligent sorting and sales in supermarkets.The model online detection system is developed by WXML and WXSS design pages,JavaScript interact data and Flask build backend based on We Chat applet,which can be applied to online application scenarios such as consumers’ daily science popularization,identification and traceability of fine-grained fruits. |