Search

CN-122024225-A - Waxberry fruit identification method

CN122024225ACN 122024225 ACN122024225 ACN 122024225ACN-122024225-A

Abstract

The invention provides a waxberry fruit identification method, belongs to the field of image identification, and provides a YOLOv s model based on CDC-SPP, wherein a feature C3 in a backbone network is introduced into Concat of a feature fusion layer on the basis of YOLOv s, SPP is improved to CDC-SPP, and meanwhile, the stability of the model is ensured by adding a GC network. The invention can realize high-precision waxberry identification and has better identification efficiency.

Inventors

  • QIN LIMING
  • FANG CHUN
  • ZHANG HEBING
  • LI JUN
  • Gong Daikang
  • XU ZHENG
  • YUAN MEILING
  • HUANG HANPEI
  • ZHANG HAISONG

Assignees

  • 台州学院

Dates

Publication Date
20260512
Application Date
20251231

Claims (6)

  1. 1. The waxberry identification method is characterized by comprising the following steps of: Step 1, collecting waxberry pictures, manufacturing a Red_ bayberry data set, and labeling the Red_ bayberry data set with a large target, a medium target and a small target; Step 2, improving YOLOv s to YOLOv5 s_and YOLOv s_to a main algorithm for waxberry fruit target detection, wherein the improvement process is to replace an SPP module in a YOLOv s main network with a CDC-SPP module, and the CDC-SPP module comprises a Conv Block convolution group, a pyramid pooling layer and a Conv Block convolution group which are sequentially arranged; step 3, adjusting parameters in YOLOv s related files, wherein the input size of the image is 640 pixels multiplied by 640 pixels; Step 4, running a train file training Red_ bayberry data set, stopping training after training is completed, and acquiring the weight of the network training; And 5, finishing the identification of picked fruits by adopting an improved YOLOv s network model after training.
  2. 2. The method according to claim 1, wherein in the step 2, the improvement further comprises adding a GC network to the detection portion of the output layer, the GC network including two Conv Block convolution sets.
  3. 3. The method according to claim 1, wherein in the step 2, the improvement further comprises introducing the feature C3 in the backbone network into Concat of the feature fusion layer to form a new connection layer.
  4. 4. A method of identifying waxberry fruits according to any one of claims 1 or 2 or 3, wherein the pyramid pooling layers comprise a first convolution set of k=3, p=1, d=1, a second convolution set of k=5, p=2, d=1, a third convolution set of k= 7,p =3, d=1, a first pooling layer of k=5, p=2, d=1, a second pooling layer of k=9, p=4, d=1, a third pooling layer of k=13, p=6, d=1, a fourth convolution set of k=3, p=2, d=4, a fifth convolution set of k=3, p=3, d=4, a sixth convolution set of k=3, p=4, d=4.
  5. 5. A method of identifying waxberry fruits according to claim 1, 2 or 3, wherein said Conv Block convolution set consists of one Conv2d, one BatchNorm d and one SiLU.
  6. 6. The method for identifying the waxberry fruits according to claim 1, wherein the Red bayberry dataset comprises 763 training sets, 85 verification sets and 100 test sets, wherein 662 in the training sets and 101 in the backlight pictures are in the forward illumination, 59 in the verification sets and 26 in the backlight pictures are in the backward illumination, and the dataset is labeled by labelimg.

Description

Waxberry fruit identification method Technical Field The invention belongs to the technical field of fruit identification, and particularly relates to a waxberry fruit identification method. Background The waxberry has high nutritive value and economic value. However, as the myrica rubra is mostly planted in hilly areas and planted in a scattered manner, the fruit tree planting and management consume a great amount of manpower and material resources, and as the population ages and the agricultural labor force is reduced, the manual picking cost is gradually increased, and the market competitiveness of the myrica rubra fruits is reduced, so that the intelligent picking is a necessary trend. Meanwhile, the red bayberry is dark red, is easy to be confused with the surrounding environment, has branch interference, has higher recognition difficulty, and therefore has higher requirements on a recognition algorithm. At present, fruit identification algorithms can be classified into two main categories, namely a fruit identification algorithm based on artificial characteristics, wherein the main idea is to deeply dig the differences between the fruits and other objects, and the fruits are identified from a plurality of objects by using a classification algorithm. The other category is a fruit recognition algorithm based on Deep Convolutional Neural Network (DCNN), which is also a current mainstream recognition algorithm, deep semantic features of images can be extracted through a plurality of convolution layers, more abundant feature information is obtained, and the accuracy of a model is improved along with the continuous increase of data quantity. Girshick on the basis of DCNN, a target detection framework of Region-based convolutional neural network (RCNN) is proposed, and an improved version of RCNN is proposed later, but the overall operation speed of the algorithm is slower, mainly because the identification of fruits is required to be completed through the two-stage detection framework. Redmon et al propose a You Only Look Once (YOLO) target detection algorithm based on the regression idea, which is to convert the target detection problem into a regression problem, and can obtain the position and class of the target at one time. The detection frame has higher efficiency compared with a two-stage detection frame. The different versions of the YOLO algorithm and their corresponding modified versions have been widely used in the identification and detection of fruits. However, some problems in practical agricultural applications are not thoroughly solved, and the main reasons are that the complexity of agricultural environments is caused by that some fruits are relatively close to surrounding objects in color, the complexity of illumination can cause loss of partial image information, the existence of shielding of leaves and the like can influence correct identification of the fruits, and the growth state of the fruits can also increase the difficulty of identification. Disclosure of Invention The invention aims to overcome the defects of the prior art and provides a waxberry identification method. In order to achieve the aim of the invention, the invention provides a waxberry identification method which is characterized by comprising the following steps of: Step 1, collecting waxberry pictures, manufacturing a Red_ bayberry data set, and labeling the Red_ bayberry data set with a large target, a medium target and a small target; Step 2, improving YOLOv s to YOLOv5 s_and YOLOv s_to a main algorithm for waxberry fruit target detection, wherein the improvement process is to replace an SPP module in a YOLOv s main network with a CDC-SPP module, and the CDC-SPP module comprises a Conv Block convolution group, a pyramid pooling layer and a Conv Block convolution group which are sequentially arranged; step 3, adjusting parameters in YOLOv s related files, wherein the input size of the image is 640 pixels multiplied by 640 pixels; Step 4, running a train file training Red_ bayberry data set, stopping training after training is completed, and acquiring the weight of the network training; And 5, finishing the identification of picked fruits by adopting YOLOv s_change model after training. Preferably, in the step 2, the improvement further includes adding a GC network in the detection portion of the output layer, where the GC network includes two Conv Block convolution sets. Preferably, the Conv Block convolution group is composed of one Conv2d, one BatchNorm d, and one SiLU. Preferably, the pyramid pooling layer comprises a first convolution group of K=3, p=1 and d=1, a second convolution group of K=5, p=2 and d=1, a third convolution group of K= 7,p =3 and d=1, a first pooling layer of K=5, p=2 and d=1, a second pooling layer of K=9, p=4 and d=1, a third pooling layer of K=13, p=6 and d=1, a fourth convolution group of K=3, p=2 and d=4, a fifth convolution group of K=3, p=3 and d=4, and a sixth convolution group of K=3