CN111582401B - Sunflower seed sorting method based on double-branch convolutional neural network - Google Patents

Sunflower seed sorting method based on double-branch convolutional neural network Download PDF

Info

Publication number
CN111582401B
CN111582401B CN202010412484.6A CN202010412484A CN111582401B CN 111582401 B CN111582401 B CN 111582401B CN 202010412484 A CN202010412484 A CN 202010412484A CN 111582401 B CN111582401 B CN 111582401B
Authority
CN
China
Prior art keywords
double
branch
layer
neural network
convolutional neural
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010412484.6A
Other languages
Chinese (zh)
Other versions
CN111582401A (en
Inventor
李春雷
刘洲峰
栾争光
赵亚茹
朱永胜
董燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongyuan University of Technology
Original Assignee
Zhongyuan University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongyuan University of Technology filed Critical Zhongyuan University of Technology
Priority to CN202010412484.6A priority Critical patent/CN111582401B/en
Publication of CN111582401A publication Critical patent/CN111582401A/en
Application granted granted Critical
Publication of CN111582401B publication Critical patent/CN111582401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention provides a sunflower seed sorting method based on a double-branch convolutional neural network, which comprises the following steps of: firstly, labeling class labels on an original image of a sunflower seed, randomly dividing the label into a training set and a test set, and then performing data amplification on the training set and the test set to form an amplified training set and an amplified test set; secondly, constructing a network structure which is a double-branch convolutional neural network of an input layer, a feature extraction layer and an output layer; inputting the amplification training set into a double-branch convolutional neural network for training to obtain a sunflower seed sorting model based on the double-branch convolutional neural network; and finally, verifying the sunflower seed sorting model by using the amplification test set, and testing the identification capability of the sunflower seed sorting model. The invention improves the utilization rate of the model to the lower-level features of the front layer, reduces the storage space of the network model on the hardware equipment, and has the characteristics of stronger robustness and high identification precision.

Description

Sunflower seed sorting method based on double-branch convolutional neural network
Technical Field
The invention relates to the technical field of image processing, in particular to a sunflower seed sorting method based on a double-branch convolutional neural network.
Background
The automatic sorting technology has very wide development and application prospects in industry, agriculture and commerce. Particularly in the task of sorting agricultural seeds, due to the continuous strictness and refinement of the agricultural market on the quality requirements of the seeds, the improvement of the quality of the crop seeds in the market has become an important task in agricultural production.
During the harvest and storage of sunflower seeds, a large number of abnormal seeds are mixed in, resulting in a poor market competitiveness of the seed product. How to efficiently and accurately identify and sort abnormal seeds in sunflower seeds is still a relatively troublesome problem in the agricultural field. The variety of abnormal sunflower seeds (defects, deterioration and the like) is similar to that of normal sunflower seeds, and the efficiency is very low in actual production by adopting a traditional manual detection method. The traditional image recognition algorithm based on the low-level features extracted manually has the problem of poor adaptability in sorting of sunflower seeds because the distinguishing features cannot be effectively extracted. Therefore, a method capable of replacing the traditional seed sorting is found, and the method has important significance and application value for the identification and classification research of different crop seeds. In recent years, convolutional neural networks have made a great breakthrough in the task of image recognition because they can automatically learn and extract abundant low-level features and high-level features through a large amount of image data. However, these convolutional neural networks are complex and have low real-time performance. Furthermore, higher accuracy is achieved only on some data sets with very large data volumes. Therefore, in the identification of sunflower seeds, a robust and lightweight algorithm is urgently needed.
Disclosure of Invention
Aiming at the defects in the background technology, the invention provides a sunflower seed sorting method based on a double-branch convolutional neural network, and solves the technical problems of complexity and low real-time performance of the conventional convolutional neural network.
The technical scheme of the invention is realized as follows:
a sunflower seed sorting method based on a double-branch convolutional neural network comprises the following steps:
s1, acquiring an original image of the sunflower seed by using image acquisition equipment, labeling the original image of the sunflower seed, and dividing the labeled original image of the sunflower seed into a training set and a test set;
s2, respectively carrying out data amplification on the training set and the test set in an image rotation mode to form an amplification training set and an amplification test set;
s3, constructing a network structure which is a double-branch convolutional neural network of an input layer, a feature extraction layer and an output layer;
s4, inputting the amplification training set into the double-branch convolutional neural network in the step S3 for training to obtain a sunflower seed sorting model based on the double-branch convolutional neural network;
and S5, verifying the sunflower seed sorting model obtained in the step S4 by using an amplification test set, and testing the identification capability of the sunflower seed sorting model.
The image acquisition device in the step S1 is a linear array digital camera set, and the class labels of the original image of the sunflower seed are normal and abnormal.
The structure of the feature extraction layer is a stem module, a double-branch dense connection module I, a double-branch dense connection module II, a down-sampling module I, a double-branch dense connection module III, a double-branch dense connection module IV, a down-sampling module II, a double-branch dense connection module V, a double-branch dense connection module VI and a down-sampling module III; the structure of the output layer is a global average pooling layer-full connection layer-Softmax classifier.
The stem module comprises a convolution layer I, a convolution layer II, a convolution layer III, a convolution layer IV, a maximum pooling layer I and a characteristic splicing layer I, wherein the convolution layer I is respectively connected with the input layer, the maximum pooling layer I and the convolution layer II, the convolution layer II is connected with the convolution layer III, the maximum pooling layer I and the convolution layer III are both connected with the characteristic splicing layer I, the characteristic splicing layer I is connected with the convolution layer IV, and the convolution layer IV is connected with a double-branch intensive connection module I.
Two intensive connection module I of branch, two intensive connection module II of branch, two intensive connection module III of branch, two intensive connection module IV of branch, two intensive connection module V of branch and two intensive connection module VI of branch all include convolution layer V, convolution layer VI, convolution layer VII, convolution layer VIII, convolution layer IX and characteristic concatenation layer II, convolution layer V is connected with convolution layer VI, convolution layer VII is connected with convolution layer VIII, convolution layer VIII is connected with convolution layer IX, convolution layer VI and convolution layer IX are all connected with characteristic concatenation layer II.
The convolutional layers I, II, III, IV, V, VI, VII, VIII and IX all adopt a sequential composite structure of convolutional layer-batch standardization-ReLU activation function; the convolution kernel sizes of the convolution layers I, III, VI, VIII and IX are all 3 x 3, and the convolution kernel sizes of the convolution layers II, IV, V and VII are all 1 x 1.
The method for inputting the amplification training set into the double-branch convolutional neural network for training to obtain the sunflower seed sorting model based on the double-branch convolutional neural network comprises the following steps:
s41, setting learning rate epsilon of the double-branch convolutional neural network, and initializing network parameter theta0Setting the resolution of an input image as M multiplied by 3 pixels, the number of categories as 2, the initial iteration number k as 0 and the maximum iteration number as T;
s42, randomly selecting bs sample images from the amplification training set;
s43, inputting the bs sample images and the class labels corresponding to the bs sample images into a double-branch convolutional neural network for training, and measuring the error between a predicted value and a true value by using a cross entropy loss function;
s44, updating the network parameter theta of the double-branch convolutional neural network by using a stochastic gradient descent algorithm according to the error between the predicted value and the true valuekReturning to step S43;
s45, circulating the steps S42 to S44 until all samples in the amplification training set are traversed;
and S46, the iteration number k +1 is returned to the step S42, and the training is completed until the maximum iteration number T is reached.
The cross entropy loss function is:
Figure BDA0002493745140000031
where x is the output of a neuron in the neural network, xjAnd N is the number of the amplification training sets.
In the step S44, the network parameter θ of the two-branch convolutional neural network is updated by using a stochastic gradient descent algorithmkThe method comprises the following steps:
Figure BDA0002493745140000032
wherein the content of the first and second substances,
Figure BDA0002493745140000033
for the loss function over parameter theta for k iterationskPartial derivative of (a), x(i)For the ith sample image, i 1,2(i)And outputting a predicted value of the output of the double-branch convolutional neural network.
The beneficial effect that this technical scheme can produce: the invention constructs the double-branch convolutional neural network, extracts the features of different scales of sunflower seed images by adopting two branches, adopts a dense shortcut connection mode between convolutional layers, combines the features extracted from the front layer on the channel dimension as the input of the subsequent layer, improves the utilization rate of the model to the lower-level features of the front layer, reduces the storage space of the network model on hardware equipment, provides support for the real-time detection of the convolutional neural network, and has the characteristics of strong robustness and high identification precision.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a diagram of the structure of a dual-branch convolutional neural network of the present invention;
FIG. 3 is a block diagram of a stalk module of the present invention;
fig. 4 is a structural diagram of the dual branch dense connection module group of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a sunflower seed sorting method based on a double-branch convolutional neural network, which includes the following specific steps:
s1, acquiring an original image of the sunflower seed by using image acquisition equipment, labeling the original image of the sunflower seed, and dividing the labeled original image of the sunflower seed into a training set and a test set, wherein the number of the training set is 4 times that of the test set. The original image of the sunflower crop seeds is that firstly, a linear array digital camera set is utilized to complete the collection of the sunflower seed images on a material conveying belt of a seed sorting device, and then the collected sunflower seed images are uniformly cut into the images with the pixel size of 224 multiplied by 224. The method comprises the steps of manually marking an original image of a sunflower seed with class labels of normal and abnormal, respectively placing an abnormal sunflower seed image and a normal sunflower seed image into two folders, and coding the folder where the abnormal sunflower seed image is located into 0 and the folder where the normal sunflower seed image is located into 1 by adopting a one-hot coding mode without marking each sunflower seed image in a pair of data sets one by one in a naming mode.
S2, respectively carrying out data amplification on the training set and the test set in an image rotation mode to form an amplification training set and an amplification test set; and respectively randomly rotating the images in the training set and the test set by 15 degrees, 45 degrees or 90 degrees to complete the expansion of the images in the training set.
S3, constructing a network structure which is a double-branch convolutional neural network of an input layer, a feature extraction layer and an output layer; as shown in fig. 2, the structure of the feature extraction layer is stem module-two-branch dense connection module I-two-branch dense connection module II-down sampling module I-two-branch dense connection module III-two-branch dense connection module IV-down sampling module II-two-branch dense connection module V-two-branch dense connection module VI-down sampling module III; the structure of the output layer is a global average pooling layer-full connection layer-Softmax classifier.
As shown in fig. 3, the stem module includes a convolutional layer I, a convolutional layer II, a convolutional layer III, a convolutional layer IV, a maximum pooling layer I, and a feature splicing layer I, the input layer is connected to the convolutional layer I, the convolutional layer I is connected to the maximum pooling layer I and the convolutional layer II, respectively, the convolutional layer II is connected to the convolutional layer III, both the maximum pooling layer I and the convolutional layer III are connected to the feature splicing layer I, the feature splicing layer I is connected to the convolutional layer IV, and the convolutional layer IV is connected to the dual-branch dense connection module I. The convolution layers I, II, III and IV all adopt a sequential composite structure of convolution layer-batch standardization-ReLU activation function; the sizes of convolution kernels of the convolution layers I and III are both 3 multiplied by 3, and the sizes of convolution kernels of the convolution layers II and IV are both 1 multiplied by 1; processing an original image of a sunflower seed with the dimension of 112 multiplied by 32 by using a convolution layer I with the step length of 2 and the convolution kernel size of 3 multiplied by 3; one branch adopts a sliding step length of 2, a sliding window of 2 multiplied by 2 and the largest pooling layer I performs down-sampling on the feature map with the dimension of 112 multiplied by 32 to obtain the feature map with the dimension of 56 multiplied by 16; the other branch firstly adopts a convolution layer II with the convolution kernel size of 1 multiplied by 1 to process the characteristic diagram with the dimension of 112 multiplied by 32 to obtain the characteristic diagram with the dimension of 112 multiplied by 16, and the characteristic diagram is reduced by half on the channel dimension to reduce the calculation; then processing the characteristic diagram with the dimension of 112 multiplied by 16 by adopting the convolution layer III with the step length of 2 and the convolution kernel size of 3 multiplied by 3 to obtain the characteristic diagram with the dimension of 56 multiplied by 16; the feature maps of the two branches are spliced in the channel dimension and input into the convolution layer IV for fusion, and the obtained feature map with the dimension of 56 multiplied by 32 is used as the input of the double-branch dense connection module I.
As shown in fig. 4, the dual-branch convolutional network commonly uses 6 dual-branch dense connection modules, which are a dual-branch dense connection module I, a dual-branch dense connection module II, a dual-branch dense connection module III, a dual-branch dense connection module IV, a dual-branch dense connection module V, and a dual-branch dense connection module VI, and each two dual-branch dense connection modules are used as a group and mainly used for extracting and fusing feature maps of different scales. Two intensive connection module I of branch, two intensive connection module II of branch, two intensive connection module III of branch, two intensive connection module IV of branch, two intensive connection module V of branch and two intensive connection module VI of branch all include convolution layer V, convolution layer VI, convolution layer VII, convolution layer VIII, convolution layer IX and characteristic concatenation layer II, convolution layer V is connected with convolution layer VI, convolution layer VII is connected with convolution layer VIII, convolution layer VIII is connected with convolution layer IX, convolution layer VI and convolution layer IX are all connected with characteristic concatenation layer II. The convolutional layers V, VI, VII, VIII and IX all adopt a sequential composite structure of convolutional layer-batch standardization-ReLU activation function; the convolution kernel sizes of convolutional layers VI, VIII, and IX were all 3 × 3, and the convolution kernel sizes of convolutional layers V and VII were all 1 × 1. When the dimension of an input feature map of a first double-branch dense connection module in a group of double-branch dense connection modules is H multiplied by W multiplied by C, one branch comprises a 1 multiplied by 1 convolutional layer V and a 3 multiplied by 3 convolutional layer VI, the feature map with the input dimension of H multiplied by W multiplied by C and the feature map with the output dimension of H multiplied by W multiplied by C/2; the other branch comprises a 1 × 1 convolutional layer VII, two 3 × 3 convolutional layers VIII and a convolutional layer IX, a characteristic diagram with dimension H × W × C is input, and a characteristic diagram with dimension H × W × C/2 is output; the characteristic graphs extracted from the two branches have different receptive fields, the characteristic graphs of the two branches and the input characteristic graph are spliced on a channel dimension in a shortcut connection mode, and the characteristic graph with an output dimension of H multiplied by W multiplied by 2C is obtained. The shortcut connection mode is that the input feature map with dimension H multiplied by W multiplied by C is directly connected to the feature splicing layer II, so that the input feature map can skip one or more layers at a time and act on a deeper part of the network. Taking a characteristic diagram with dimension H multiplied by W multiplied by 2C as an input characteristic diagram of a second double-branch dense connection module, wherein one branch comprises a 1 multiplied by 1 convolutional layer V and a 3 multiplied by 3 convolutional layer VI, inputting the characteristic diagram with dimension H multiplied by W multiplied by 2C, and outputting the characteristic diagram with dimension H multiplied by W multiplied by C; the other branch comprises a 1 × 1 convolutional layer VII, two 3 × 3 convolutional layers VIII and a convolutional layer IX, a characteristic diagram with dimension H × W × 2C is input, and a characteristic diagram with dimension H × W × C is output; and splicing the feature maps with dimensions H multiplied by W multiplied by C and the feature maps with dimensions H multiplied by W multiplied by 2C in the two branches in the channel dimension by adopting a shortcut connection mode, outputting the feature maps with dimensions H multiplied by W multiplied by 4C, and then splicing the feature maps with dimensions H multiplied by W multiplied by 4C and the input feature maps with dimensions H multiplied by W multiplied by C in the dimension again, and outputting the feature maps with dimensions H multiplied by W multiplied by 5C. Thus, the dimension of the feature map of the output of a set of two-branch densely connected modules is H × W × 5C. The convolution step size used in the two-branch dense connection module is 1, and the size of the characteristic diagram is not changed.
The down-sampling module I, the down-sampling module II and the down-sampling module III are all connected behind the double-branch dense connection module, and each of the down-sampling module I, the down-sampling module II and the down-sampling module III comprises a convolution layer with the step length of 1, the convolution kernel size of 1 multiplied by 1 and a maximum pooling layer with the step length of 2 and the window size of 2 multiplied by 2. Stitching the signatures in the channel dimension can make training difficult because the input signatures at subsequent layers in the network are too large in the channel dimension, e.g., the output in a two-branch dense connection group is 5 times the input. Therefore, a 1 × 1 convolution is used in the network to fuse the spliced feature maps and control the number of channels outputting the feature maps. The number of convolution kernels convolved by 1 x 1 in the down-sampling module I, the down-sampling module II and the down-sampling module III is 128, 128 and 256 respectively, so that the dimensionality of the spliced feature map is reduced.
In the double-branch convolutional neural network, in order to reduce the overfitting phenomenon and improve the generalization capability of the model, a dropout algorithm is used in the full-connection layer, and connection nodes in the full-connection layer are randomly discarded with the probability of 0.5. And using a softmax classifier as an output layer, normalizing the prediction result of the sunflower seed image to be identified into the probability of a normal sunflower seed image and the probability of an abnormal sunflower seed image, and selecting the prediction result with high probability as the prediction result.
S4, inputting the amplification training set into the double-branch convolutional neural network in the step S3 for training to obtain a sunflower seed sorting model based on the double-branch convolutional neural network; the training of the convolutional neural network is divided into a forward propagation process and a backward propagation process, each hidden layer receives input data in the forward propagation process, the input data are processed and transmitted to subsequent layers, and finally an output result y is obtained. Since some random values are usually used to initialize the weights when training the neural network, the initial weights are not necessarily correct, which results in a large difference between the model prediction output and the training samples, i.e. a large error value. This requires that the model be interpreted in some way to change the parameters (weights). The back propagation algorithm is used as the core of supervised learning of the neural network, the weight of the neural network can be finely adjusted according to the error rate obtained in the previous iteration, and the lower error rate can be ensured by properly adjusting the weight so as to increase the generalization of the model and ensure the reliability of the model. The invention adopts a cross entropy loss function to measure the error between the predicted value and the actual value. And updating the parameters of each iteration by adopting a random gradient descent algorithm with momentum, and solving the partial derivative of the loss function of each sample by utilizing the random gradient descent algorithm to obtain and update the corresponding gradient. The method for training the double-branch convolutional neural network by using the amplification training set comprises the following steps:
s41, setting the learning rate epsilon of the double-branch convolution neural network to be 0.1, and initializing a network parameter theta0Setting the resolution of an input image as M × 3 pixels, setting the number of categories as 2 (including two types of images, namely an abnormal sunflower seed image and a normal sunflower seed image), setting the initial iteration number k as 0, and setting the maximum iteration number as T as 60, wherein M is 224, and the learning rate epsilon is reduced by 0.1 time per 15 iterations;
s42, randomly selecting bs to 32 sample images from the amplification training set;
s43, inputting the bs sample images and the class labels corresponding to the bs sample images into a double-branch convolutional neural network for training, and measuring the error between a predicted value and a true value by using a cross entropy loss function;
the cross entropy loss function is:
Figure BDA0002493745140000061
where x is the output of a neuron in the neural network, xjAnd N is the number of the amplification training sets.
S44, updating the network parameter theta of the double-branch convolutional neural network by using a stochastic gradient descent algorithm according to the error between the predicted value and the true valuekReturning to step S43; network parameter thetakThe updating method comprises the following steps:
Figure BDA0002493745140000071
wherein the content of the first and second substances,
Figure BDA0002493745140000072
for the loss function over parameter theta for k iterationskPartial derivative of (a), x(i)For the ith sample image, i 1,2(i)And outputting a predicted value of the output of the double-branch convolutional neural network.
S45, circulating the steps S42 to S44 until all samples in the amplification training set are traversed;
and S46, the iteration number k +1 is returned to the step S42, and the training is completed until the maximum iteration number T is reached.
And S5, verifying the sunflower seed sorting model obtained in the step S4 by using an amplification test set, and testing the identification capability of the sunflower seed sorting model. Table 1 shows the performance of the different methods in the test set, where TP represents the number of correctly recognized normal sunflower seed images, FP represents the number of incorrectly recognized normal sunflower seed images, FN represents the number of correctly recognized abnormal sunflower seed images, and TN represents the number of incorrectly recognized abnormal sunflower seed images. The test set in this example contained 1800 normal sunflower seed sub-images and 1980 abnormal sunflower seed sub-images. Of these, 12 normal sunflower crop seeds and 8 abnormal sunflower seed images were incorrectly identified. The recognition accuracy for sunflower seed images in the entire test set was 99.47%.
TABLE 1 comparison of Performance of different methods on sunflower seed dataset
Figure BDA0002493745140000073
In the deep convolutional neural network constructed by the invention, the structure of the double-branch convolutional neural network integrates image characteristics with different scales, and the utilization rate of the convolutional network to the characteristics of the front layer is improved by adopting characteristic splicing on the channel dimension between the convolutional layers.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A sunflower seed sorting method based on a double-branch convolutional neural network is characterized by comprising the following steps:
s1, acquiring an original image of the sunflower seed by using image acquisition equipment, labeling the original image of the sunflower seed, and dividing the labeled original image of the sunflower seed into a training set and a test set;
s2, respectively carrying out data amplification on the training set and the test set in an image rotation mode to form an amplification training set and an amplification test set;
s3, constructing a network structure which is a double-branch convolutional neural network of an input layer, a feature extraction layer and an output layer; the structure of the feature extraction layer is a stem module, a double-branch dense connection module I, a double-branch dense connection module II, a down-sampling module I, a double-branch dense connection module III, a double-branch dense connection module IV, a down-sampling module II, a double-branch dense connection module V, a double-branch dense connection module VI and a down-sampling module III; the stem module comprises a convolution layer I, a convolution layer II, a convolution layer III, a convolution layer IV, a maximum pooling layer I and a characteristic splicing layer I, wherein the convolution layer I is respectively connected with the input layer, the maximum pooling layer I and the convolution layer II; the double-branch dense connection module I, the double-branch dense connection module II, the double-branch dense connection module III, the double-branch dense connection module IV, the double-branch dense connection module V and the double-branch dense connection module VI respectively comprise a convolution layer V, a convolution layer VI, a convolution layer VII, a convolution layer VIII, a convolution layer IX and a characteristic splicing layer II, the convolution layer V is connected with the convolution layer VI, the convolution layer VII is connected with the convolution layer VIII, the convolution layer VIII is connected with the convolution layer IX, and the convolution layer VI and the convolution layer IX are connected with the characteristic splicing layer II; the structure of the output layer is a global average pooling layer-full connection layer-Softmax classifier;
s4, inputting the amplification training set into the double-branch convolutional neural network in the step S3 for training to obtain a sunflower seed sorting model based on the double-branch convolutional neural network;
and S5, verifying the sunflower seed sorting model obtained in the step S4 by using an amplification test set, and testing the identification capability of the sunflower seed sorting model.
2. The sunflower seed sorting method based on the double-branch convolutional neural network of claim 1, wherein the image capturing device in step S1 is a linear array digital camera set, and the class labels of the original image of the sunflower seeds are normal and abnormal.
3. The sunflower seed sorting method based on the double-branch convolutional neural network of claim 1, wherein the convolutional layers I, II, III, IV, V, VI, VII, VIII and IX adopt a sequential composite structure of convolutional layer-batch normalization-ReLU activation function; the convolution kernel sizes of the convolution layers I, III, VI, VIII and IX are all 3 x 3, and the convolution kernel sizes of the convolution layers II, IV, V and VII are all 1 x 1.
4. The sunflower seed sorting method based on the double-branch convolutional neural network as claimed in claim 1, wherein the method of inputting the amplification training set into the double-branch convolutional neural network in step S3 to obtain the sunflower seed sorting model based on the double-branch convolutional neural network comprises:
s41, setting learning rate epsilon of the double-branch convolutional neural network, and initializing network parameter theta0Setting the resolution of an input image as M multiplied by 3 pixels, the number of categories as 2, the initial iteration number k as 0 and the maximum iteration number as T;
s42, randomly selecting bs sample images from the amplification training set;
s43, inputting the bs sample images and the class labels corresponding to the bs sample images into a double-branch convolutional neural network for training, and measuring the error between a predicted value and a true value by using a cross entropy loss function;
s44, updating the network parameter theta of the double-branch convolutional neural network by using a stochastic gradient descent algorithm according to the error between the predicted value and the true valuekReturning to step S43;
s45, circulating the steps S42 to S44 until all samples in the amplification training set are traversed;
and S46, the iteration number k +1 is returned to the step S42, and the training is completed until the maximum iteration number T is reached.
5. The sunflower seed sorting method based on a double-branch convolutional neural network of claim 4, wherein the cross entropy loss function is:
Figure FDA0003110824860000021
where x is the output of a neuron in the neural network, xjAnd N is the number of the amplification training sets.
6. The sunflower seed sorting method based on the double-branch convolutional neural network of claim 4, wherein in the step S44, the network parameter θ of the double-branch convolutional neural network is updated by using a stochastic gradient descent algorithmkThe method comprises the following steps:
Figure FDA0003110824860000022
wherein the content of the first and second substances,
Figure FDA0003110824860000023
for the loss function over parameter theta for k iterationskPartial derivative of (a), x(i)For the ith sample image, i 1,2(i)And outputting a predicted value of the output of the double-branch convolutional neural network.
CN202010412484.6A 2020-05-15 2020-05-15 Sunflower seed sorting method based on double-branch convolutional neural network Active CN111582401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010412484.6A CN111582401B (en) 2020-05-15 2020-05-15 Sunflower seed sorting method based on double-branch convolutional neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010412484.6A CN111582401B (en) 2020-05-15 2020-05-15 Sunflower seed sorting method based on double-branch convolutional neural network

Publications (2)

Publication Number Publication Date
CN111582401A CN111582401A (en) 2020-08-25
CN111582401B true CN111582401B (en) 2021-07-23

Family

ID=72117516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010412484.6A Active CN111582401B (en) 2020-05-15 2020-05-15 Sunflower seed sorting method based on double-branch convolutional neural network

Country Status (1)

Country Link
CN (1) CN111582401B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112365426B (en) * 2020-11-25 2022-06-07 兰州理工大学 Infrared image edge enhancement method based on double-branch convolution neural network
CN112862187A (en) * 2021-02-05 2021-05-28 北京百度网讯科技有限公司 Bus passenger flow prediction method and device, electronic equipment and storage medium
CN113128578B (en) * 2021-04-08 2022-07-19 青岛农业大学 Screening method for good peanut seeds
CN115830451B (en) * 2022-12-02 2023-11-03 上海理工大学 Smart city construction level identification method based on convolutional neural network
CN117054396B (en) * 2023-10-11 2024-01-05 天津大学 Raman spectrum detection method and device based on double-path multiplicative neural network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242864A (en) * 2018-09-18 2019-01-18 电子科技大学 Image segmentation result quality evaluating method based on multiple-limb network
CN109740656A (en) * 2018-12-26 2019-05-10 华侨大学 A kind of ore method for separating based on convolutional neural networks
US20190205643A1 (en) * 2017-12-29 2019-07-04 RetailNext, Inc. Simultaneous Object Localization And Attribute Classification Using Multitask Deep Neural Networks
CN110663971A (en) * 2018-07-02 2020-01-10 天津工业大学 Red date quality classification method based on double-branch deep fusion convolutional neural network
CN110991511A (en) * 2019-11-26 2020-04-10 中原工学院 Sunflower crop seed sorting method based on deep convolutional neural network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190205643A1 (en) * 2017-12-29 2019-07-04 RetailNext, Inc. Simultaneous Object Localization And Attribute Classification Using Multitask Deep Neural Networks
CN110663971A (en) * 2018-07-02 2020-01-10 天津工业大学 Red date quality classification method based on double-branch deep fusion convolutional neural network
CN109242864A (en) * 2018-09-18 2019-01-18 电子科技大学 Image segmentation result quality evaluating method based on multiple-limb network
CN109740656A (en) * 2018-12-26 2019-05-10 华侨大学 A kind of ore method for separating based on convolutional neural networks
CN110991511A (en) * 2019-11-26 2020-04-10 中原工学院 Sunflower crop seed sorting method based on deep convolutional neural network

Also Published As

Publication number Publication date
CN111582401A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111582401B (en) Sunflower seed sorting method based on double-branch convolutional neural network
CN110232394B (en) Multi-scale image semantic segmentation method
CN109214452B (en) HRRP target identification method based on attention depth bidirectional cyclic neural network
CN106874688B (en) Intelligent lead compound based on convolutional neural networks finds method
CN112380921A (en) Road detection method based on Internet of vehicles
CN111626355A (en) Unet + + convolutional neural network-based seismic data first arrival pickup method
CN111178120B (en) Pest image detection method based on crop identification cascading technology
CN110991511A (en) Sunflower crop seed sorting method based on deep convolutional neural network
CN112561910A (en) Industrial surface defect detection method based on multi-scale feature fusion
CN102385592B (en) Image concept detection method and device
Bahtiar et al. Deep learning detected nutrient deficiency in chili plant
CN112381763A (en) Surface defect detection method
CN111612051B (en) Weak supervision target detection method based on graph convolution neural network
CN112364721A (en) Road surface foreign matter detection method
CN110569814A (en) Video category identification method and device, computer equipment and computer storage medium
CN115359353A (en) Flower identification and classification method and device
CN110348503A (en) A kind of apple quality detection method based on convolutional neural networks
CN111291818B (en) Non-uniform class sample equalization method for cloud mask
CN113435254A (en) Sentinel second image-based farmland deep learning extraction method
CN111783688B (en) Remote sensing image scene classification method based on convolutional neural network
CN110991219B (en) Behavior identification method based on two-way 3D convolution network
CN112560668A (en) Human behavior identification method based on scene prior knowledge
CN112418229A (en) Unmanned ship marine scene image real-time segmentation method based on deep learning
CN111523503A (en) Apple target detection method based on improved SSD algorithm
CN112541916B (en) Waste plastic image segmentation method based on dense connection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant