CN111860567B - Construction method of blade image recognition model - Google Patents
Construction method of blade image recognition model Download PDFInfo
- Publication number
- CN111860567B CN111860567B CN202010388794.9A CN202010388794A CN111860567B CN 111860567 B CN111860567 B CN 111860567B CN 202010388794 A CN202010388794 A CN 202010388794A CN 111860567 B CN111860567 B CN 111860567B
- Authority
- CN
- China
- Prior art keywords
- leaf
- blade
- neural network
- mathematical model
- index
- 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
Links
- 238000010276 construction Methods 0.000 title claims abstract description 8
- 238000013178 mathematical model Methods 0.000 claims abstract description 22
- 238000013139 quantization Methods 0.000 claims abstract description 14
- 238000012545 processing Methods 0.000 claims abstract description 11
- 238000005457 optimization Methods 0.000 claims abstract description 9
- 238000013528 artificial neural network Methods 0.000 claims description 61
- 239000013598 vector Substances 0.000 claims description 24
- 238000000034 method Methods 0.000 claims description 21
- 238000000605 extraction Methods 0.000 claims description 15
- 230000006870 function Effects 0.000 claims description 11
- 230000009467 reduction Effects 0.000 claims description 7
- 238000013507 mapping Methods 0.000 claims description 4
- 238000012360 testing method Methods 0.000 claims description 3
- 230000007547 defect Effects 0.000 abstract description 2
- 241000196324 Embryophyta Species 0.000 description 18
- 238000012549 training Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 241000931526 Acer campestre Species 0.000 description 3
- 241000694364 Acer capillipes Species 0.000 description 3
- 230000007797 corrosion Effects 0.000 description 2
- 238000005260 corrosion Methods 0.000 description 2
- 230000003628 erosive effect Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000002068 genetic effect Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003062 neural network model Methods 0.000 description 2
- 210000002569 neuron Anatomy 0.000 description 2
- 239000002245 particle Substances 0.000 description 2
- 241000894007 species Species 0.000 description 2
- 240000007187 Acer circinatum Species 0.000 description 1
- 235000006794 Acer circinatum Nutrition 0.000 description 1
- 241001106462 Ulmus Species 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000010339 dilation Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Mathematical Physics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Evolutionary Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Geometry (AREA)
- Computer Hardware Design (AREA)
- Medical Informatics (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a construction method of a blade image recognition model, which is characterized by comprising the following steps: a. carrying out contour quantization processing on the batched leaf pictures to extract characteristic information and explaining a quantization index system of the extracted characteristic information; b. establishing a mathematical model for judging the leaf type according to the extracted characteristic information, identifying a core index based on a quantitative index system, and evaluating the performance of the mathematical model and the influence of the core index on the judging performance of the mathematical model; c. and improving the established mathematical model by using an optimization algorithm according to leaf texture information and core indexes in the leaf pictures. The invention aims at overcoming the defects of the prior art, and provides a construction method of a leaf image recognition model, which is used for constructing a mathematical model for classifying plants by means of leaf image information by extracting effective information in plant leaf images.
Description
Technical Field
The invention relates to the technical field of modern botanics, in particular to a construction method of a blade image recognition model.
Background
The variety of plants is great, and how to perform scientific classification is extremely important to people. For plants, although the local characteristics of roots, stems, flowers, fruits, seeds and the like of the plants have a certain value for plant classification, the collection and processing processes are relatively troublesome, and the leaves of the plants are relatively convenient to classify by the leaves of the plants due to the diversity in morphology, and the classification basis is relatively various, but only a few obvious morphologies of the plants are often considered, and the relationship among the plants and the position in phylogenetic development are ignored. Therefore, the plants are accurately and reasonably classified, and understanding the interrelationship among the plants becomes important content in the classification of botanics. However, there is a lack of tools in the prior art for rapid classification based on plant leaf images.
Disclosure of Invention
The invention aims at overcoming the defects of the prior art, and provides a construction method of a leaf image recognition model, which is used for constructing a mathematical model for classifying plants by means of leaf image information by extracting effective information in plant leaf images.
The invention provides a construction method of a blade image recognition model, which is characterized by comprising the following steps:
a. Carrying out quantization processing on the leaf pictures in batches to extract leaf profile characteristic information and explaining a quantization index system of the extracted characteristic information;
b. establishing a mathematical model for judging the leaf type according to the extracted characteristic information, identifying a core index based on a quantitative index system, and evaluating the performance of the mathematical model and the influence of the core index on the judging performance of the mathematical model;
c. and optimizing the established mathematical model according to leaf texture information and core indexes in the leaf pictures.
In the above technical solution, in the step a, the edge information, the texture information and the geometric feature information in the leaf picture are extracted by combining the relevant standard quantity of plant taxonomy after binarizing the leaf picture.
In the above technical solution, in the step b, after the mathematical model is built, the performance of the model and the performance influence of each index on the model are evaluated by analyzing the speed and the accuracy of the mathematical model algorithm; and analyzing the correctness of each index for leaf classification identification through a quantitative index system to identify the core index.
In the above technical scheme, in the step c, on the basis of the established mathematical model, dimension reduction processing is performed on the extracted data by combining with texture information of the leaf picture; and solving the parameter optimal value of the mathematical model through an optimization algorithm by combining with the core index.
In the above technical solution, the step a specifically includes the following steps: extracting pixel point coordinates of leaf contours by adopting a bwperim command in MATLAB, and performing binarization processing on leaf images by using an im2bw command to generate a quantization index system; ordering the pixel point coordinate coordinates of the leaf outline in a clockwise direction, and forming a target boundary function of the leaf outline according to the ordered pixel point coordinates; and solving the elliptic Fourier descriptor to generate a blade edge characteristic information extraction result.
In the above technical solution, in the step a, 7 geometric feature quantities of classification of traditional plant leaves, namely, perimeter, area, minimum circumscribed rectangle, elongation, circularity and compactness of the leaves are calculated according to the extracted leaf edge profile.
In the above technical solution, the step b specifically includes the following steps:
establishing a multi-hidden-layer multi-node BP neural network by utilizing an MATLAB BP neural network toolbox, wherein three hidden layers are provided; wherein the first layer has 100 nodes, the second layer has 2 nodes, and the third layer has one node;
Randomly extracting leaf data, wherein the leaf data comprises geometric feature quantities of 7 traditional botanical leaf classifications and 10-dimensional elliptic Fourier descriptors; the BP neural network learns by using the blade data and the corresponding type thereof as a learning sample, trains the BP neural network, and realizes the mapping of the internal relation of the sample set;
Inputting single geometric feature quantity and corresponding blade types of the blades into a BP bible network for retraining, and performing a test by using the trained BP neural network to determine the perimeter of the blades, 10-dimensional elliptic Fourier descriptors and comprehensive geometric features as core indexes for describing the geometric features of the blades; wherein comprehensive geometric features refer to comprehensive descriptions of minimum bounding rectangle, elongation, blade area, rectangle, circle, and density.
In the above technical solution, the step c specifically includes the following steps:
performing dimension reduction treatment on the blade information by utilizing skeleton extraction, and optimizing a quantization index system;
Optimizing the weight and the threshold of the BP neural network by using a bat algorithm, and corresponding the weight and the threshold of the BP neural network to the position vector of the bat in the algorithm, namely, each position vector of the bat corresponds to a network structure, each component of the position vector represents a weight or a threshold, and the dimension of the position vector is equal to the combination of the weight and the threshold in the network;
And (3) obtaining the optimal weight and threshold of the BP neural network by using a bat algorithm, and retraining the BP neural network by using an optimized quantization index system to obtain a final improved blade image classification and identification model.
The invention adopts BP neural network model to construct blade image recognition model, which ensures the speed and accuracy of model recognition. The invention uses the bat algorithm with most advantages of cluster intelligent algorithms such as genetic algorithm, particle swarm algorithm and the like to optimally solve the weight and the threshold of the BP neural network, thereby further improving the speed and the accuracy of model identification. The invention uses the elliptic Fourier descriptor to extract useful information on the picture as much as possible, reasonably reduces the dimension of the data of the quantization index system formed by the core indexes, and solves the problem of difficult convergence caused by overhigh data dimension under the condition of ensuring minimum information loss.
Drawings
FIG. 1 is a schematic flow chart of the present invention
FIG. 2 is a leaf profile extraction view
FIG. 3 is a comparison of contour convex hulls
FIG. 4 is a schematic diagram of the Clockwise algorithm flow
Fig. 5 is a topology structure diagram of a BP network
FIG. 6 is a graph of BP neural network accuracy versus training time
FIG. 7 is a BP neural network toolbox result diagram
FIG. 8 is a SOM neuron Euclidean distance map
FIG. 9 is a SOM cluster map
FIG. 10 is a chaos matrix
FIG. 11 is an error curve
FIG. 12 is a schematic diagram of Ulmus Bergma skeleton extraction
FIG. 13 is an algorithm flow chart of BA-optimized BP
FIG. 14 is a chart showing BP accuracy and training time before improvement
FIG. 15 is a chart of BP accuracy and training time trend after BA optimization
FIG. 16 is a diagram of model operation prior to modification
FIG. 17 is a diagram of the model run after modification.
Detailed Description
The invention will now be described in further detail with reference to the drawings and specific examples, which are given for clarity of understanding and are not to be construed as limiting the invention.
As shown in FIG. 1, the invention provides a method for constructing a blade image recognition model, which specifically comprises the following steps:
Firstly, establishing a leaf characteristic data quantization index system based on a plant leaf classification standard and a leaf edge characteristic extraction model of an elliptic Fourier descriptor; extracting edge contours of leaf pictures by using bwperim commands in MATLAB, and performing binarization processing on leaf images by using im2bw commands;
Feature extraction of leaf contours by elliptic fourier descriptors based on gaussian multiscale analysis is then chosen: the method comprises the steps of extracting a target boundary function (solving a blade convex hull) and calculating an elliptic Fourier descriptor (in order to meet the requirement that coordinates of edge contour points in the process of solving the elliptic Fourier descriptor are arranged in a clockwise order, a Clockwise coordinate sorting algorithm is written in the specific embodiment). And calculating geometric feature quantities of 7 traditional plant leaf classifications, namely the perimeter, the leaf area, the minimum circumscribed rectangle, the rectangle degree, the elongation, the circularity and the compactness of the leaf according to the extracted leaf edge contour. The geometric feature quantity of the leaf blade and the elliptic Fourier descriptor of the blade form a quantitative index system for identifying the leaf type.
The fourier descriptor can relate the binarized picture information as much as possible, but the obtained feature vector may not be conceptually illustrated from the plant taxonomy perspective, and the present embodiment extracts the following feature indexes in consideration of the geometric features of the leaf itself.
(1) Zhou Chang, the perimeter here refers to the perimeter of the enclosed foliage outline.
(2) Blade area a 0 refers to the area of the white area in the picture.
(3) Minimum circumscribed rectangle A m
(4) Rectangle degree R
R=A0/Am
(5) Elongation E
Where l Long length denotes the length of the smallest bounding rectangle, and l Short length denotes the width of the smallest bounding rectangle.
(6) Degree of circularity D R
DR=4πA0/ρ2
(7) Density C 0
C0=ρ2/A0
In summary, the feature vector composed of fourier descriptors is selected herein, and the 7 geometric feature indexes form a quantization index system extracted from the data information.
Secondly, establishing a BP neural network with multiple hidden layers and multiple nodes by utilizing a BP neural network tool box in MATLAB, wherein the BP neural network has three hidden layers in total, the first layer has 100 nodes, the second layer has 2 nodes, and the third layer has one node;
The BP neural network learns by using randomly extracted blade data (including geometric feature quantities of 7 traditional botany blade classifications and 10 elliptic Fourier descriptors) and blade corresponding types as learning samples, trains the BP neural network, realizes the mapping of the internal relation of a sample set, and successfully establishes a BP neural network blade identification model preliminarily.
The basic steps of the BP algorithm are as follows:
step1: and initializing a structure, and giving initial values to the number of network nodes, the connection weight among layers and the network learning rate.
Step2: the BP neural network is provided with the input value x p of the sample and the ideal output value d p.
Step3: and sequentially calculating the output of the hidden layer and the output of the output layer according to the related mathematical formula of the basic principle of the BP neural network.
Step4 calculates the weight correction value of W ij and W ij, and updates according to the related mathematical formula of the basic principle of the BP neural network.
Step5 calculates the accumulated error E of the learning sample by using the updated weight.
Step6, judging whether the network error E meets the precision requirement, if so, ending, otherwise, continuing.
Step7, updating the iteration times, if the iteration times are smaller than the maximum iteration times, turning to Step2, otherwise, continuing. Step8 ends.
By inputting single characteristic index data of the blade and the corresponding blade types into a network for test, the circumference of the blade, a 10-dimensional elliptic Fourier descriptor and comprehensive geometric characteristics (the minimum circumscribed rectangle, the elongation, the blade area, the rectangle degree, the circularity and the compactness) are determined to be core indexes for describing the geometric characteristics of the blade.
Thirdly, optimizing the weight and the threshold of the BP neural network by adopting a bat algorithm integrating the advantages of a genetic algorithm, a particle swarm algorithm and the like.
If the obtained core index is taken as the characteristic quantity of the blade and all the core index is input into the BP neural network, the accuracy of classification and identification can be improved theoretically, but the network is difficult to converge due to the excessively high dimension of an input sample, so that the blade information is subjected to dimension reduction processing by utilizing skeleton extraction.
The weight and the threshold value of the BP neural network are optimized by using a bat algorithm, the weight and the threshold value of the BP neural network are corresponding to the position vector of the bat, namely, each position vector of the bat corresponds to a network structure, each component of the position vector represents a weight or a threshold value, and the dimension of the position vector is equal to the combination of the weight and the threshold value in the network.
And after the weight and the threshold of the optimal BP neural network are obtained by using a bat algorithm, reestablishing an improved BP neural network by using the blade information after the dimension reduction, and carrying out blade image classification and identification.
In a specific embodiment, it is assumed that the contour edge extraction process of the picture will not damage the original picture, and the information loss is small. It is assumed that the processing of the blade data does not have a major impact on the amount of original information. The following table illustrates the symbols in this particular embodiment:
Sign symbol | Description of the invention |
Ω | Contour profile |
ρ | Perimeter length |
A0 | Blade area |
FDk | Fourier descriptor |
C0 | Density of the product |
wii | Connection weight |
Am | Minimum circumscribed rectangle |
DR | Degree of circularity |
η | Learning rate |
f | Frequency of |
θj、θk | Threshold value |
p | Number of learning samples |
n,q,m | Number of nodes in each layer |
In a specific embodiment, most of the leaf stalks of the given 1600 pictures have been removed or only a short portion has been retained, so that the leaf stalks have negligible interference with the feature extraction of the leaf. Leaf contours are extracted using the bwperim commands in MATLAB. The extraction results are shown in FIG. 2.
From 1600 binarized pictures of 100 leaves provided in the specific embodiment, the outline map of the leaves is a closed shape, the specific embodiment selects to extract the characteristics of the outline shape of the leaves based on an elliptic Fourier descriptor under Gaussian multi-scale analysis, and the similarity of the leaf images on the whole and detail can be compared from multi-angle analysis by means of Gaussian multi-scale analysis, so that the purpose of analyzing the leaf shapes at multiple angles is finally realized.
In the first step, the search performance of the Fourier descriptor derived by adopting the complex coordinate function as the boundary function is better, so that the complex coordinate function of the point on the one-dimensional boundary is selected as the target boundary function. The boundary line is tracked in a clockwise direction with a point on the boundary line as a starting point, and each point on the boundary is represented by a complex representation of u+jv. Considering the leaf as a closed boundary consisting of N points, a complex sequence as shown in formula (1) can be obtained from any point around the boundary clockwise:
s(n)=u(n)+jv(n),n=0,1,…,N-1 (1);
And (3) carrying out linear convolution on the complex coordinate function s (n) and the Gaussian kernel function g (n, sigma) with the scale sigma to obtain an evolution curve s (n, sigma) based on different scales sigma.
Wherein:
The convolution process itself has some noise filtering because of its good distribution and low-pass filtering characteristics.
Fig. 3 is a comparison of the blade profile and convex hull.
The closed leaf contour starting positions are set to be the same, and the closed leaf contour starting positions are considered as one period of a periodic function, and the embodiment is developed by Fourier series of infinite sine waves and cosine waves.
The parameter equation for the profile Ω on the complex plane is set as:
c(t)=x(t)+jy(t),
Wherein:
x(t)∈{x1,x2,…,xm},
y(t)∈{y1,y2,…,ym},
t∈(0,2π]
the fourier series of curve c (t) in the (x, y) direction:
Wherein:
Wherein m is the number of edge points contained in the contour omega; t is a period, t=2pi/m; ω is frequency, ω=1.
The combination of the kth coefficients a xk,bxk,ayk,byk of curve c (t) constitutes an elliptic fourier descriptor with translational, rotational and scale invariance:
considering that the high-frequency coefficients are easy to interfere, the outline shape of the leaf is described by using N low-frequency Fourier descriptors, and the feature vector of the leaf shape is obtained:
FDk=[FD1,FD2,...,FDk]
n=10 is finally determined by performing different assignments to N a plurality of times.
In order to meet the requirement that coordinates of edge contour points in the process of solving the elliptic Fourier description are required to be arranged in a clockwise order, a Clockwise coordinate ordering algorithm is compiled. The basic process is as follows:
step1 solves the average coordinates of all points on the edge contour and marks the point as C.
Step2 is centered on point C and is a directrix parallel to the y-axis.
Step3 finds the angle i between the line connecting any point on the contour with point C and the guideline in Step 2.
Step4 orders the included angle values in order from small to large.
In this embodiment, image information feature extraction is performed on 1600 pictures of 100 leaves by MATLAB R2018a, and in view of space limitation, only information extraction results of various indexes of the first picture in ACER CAMPESTRE are shown here, as shown in the following table:
Characteristic index | Feature data |
Perimeter length | 67926.1012081795 |
Blade area | 197657 |
Minimum circumscribed rectangle | 384335 |
Rectangle degree | 0.514283112 |
Degree of circularity | 538.3301301 |
Density of the product | 23.3432422092 |
FD1 | 1.771719413 |
FD2 | 1.039062873 |
FD3 | 1.013947963 |
FD4 | 1.110916822 |
FD5 | 1.02360539 |
FD6 | 1.033783607 |
FD7 | 1.031314686 |
FD8 | 1.047610439 |
FD9 | 1.022866683 |
FD10 | 1.022448654 |
Note that: FD i represents the eigenvector of the Fourier descriptor
In the second step, the present embodiment selects a multi-hidden-layer multi-node BP neural network, which is three hidden layers in total, the first layer is 100 nodes, the second layer is 2 nodes, and the third layer is 1 node. After the structure is determined, the network learns by using the learning sample, and updates and corrects the connection weight and the threshold value of the network to realize the mapping of the internal relation of the sample set. The learning process of the BP network is divided into two stages:
and in the mode forward propagation stage, learning samples are provided for the network, and then the outputs of neurons of each layer are calculated layer by layer from the first layer by utilizing the designed network structure.
And in the error counter propagation stage, calculating gradient vectors of the network error pair weight or threshold value layer by layer from the output layer of the network, and correcting the weight and the threshold value according to the negative gradient direction.
The two phases are repeatedly and alternately executed until the algorithm converges. This learning process of error back propagation of the BP network improves the ability of the network to process information.
According to the invention, 1500 training sample data are input through the BP neural network tool box in MATLAB, the running time is 538s, and the recognition accuracy is 90%. The BP neural network result classification comparison table is as follows:
actual species | BP neural network classification |
3 | 2 |
20 | 20 |
21 | 21 |
22 | 22 |
23 | 23 |
24 | 24 |
25 | 25 |
35 | 35 |
36 | 36 |
37 | 37 |
3 | 2 |
20 | 20 |
21 | 21 |
Note that: for example, table 2 shows leaf types ACER CAPILLIPES
The model achieves the required precision after 800 times of running training, and the algorithm running time is 298s, so that the model performance is good in general.
Three types of leaves are selected in the specific embodiment: ACER CAMPESTRE, ACER CAPILLIPES and Acer_ Circinatum are used as training samples, and the SOM neural network classification result is adopted to classify 7 classes, so that the classification result is obviously inaccurate, the accuracy is low, and the classification accuracy is 43%. The method has the advantages of extremely low precision and obvious comparison with BP neural network results.
In this embodiment, taking the first two types of leaves as an example, 50 training samples are taken in total, the identifying precision of leaf classification is calculated through a LVQ neural network, and the comparison table of the LVQ neural network classification results is as follows (2 types of leaves):
actual species | LVQ neural network classification |
2 | 1 |
2 | 1 |
2 | 1 |
2 | 2 |
2 | 2 |
2 | 2 |
2 | 2 |
2 | 2 |
2 | 2 |
2 | 1 |
2 | 2 |
2 | 2 |
2 | 2 |
2 | 2 |
2 | 2 |
Note that: 2 represents ACER CAPILLIPES,1 represents ACER CAMPESTRE
As can be seen from FIG. 11, the LVQ neural network has high error in classifying the leaves, and the accuracy of the identification is 73%, so that the model is not adopted because the accuracy of the method does not meet the requirement. Although the BP neural network has longer time for identifying relative to the LVQ and SOM neural networks, the correct identification rate of the classification result of the BP neural network is up to 92%, and the correct rate of the LVQ and SOM neural networks is gradually reduced along with the increase of training sample data, while the BP neural network has better stability.
Sample data corresponding to each single index is used as a training set, whether the sample data is a core index of the system is judged through information contribution rate, the perimeter and a 10-dimensional Fourier descriptor are both core indexes, and although the independent contribution rate of the other indexes is smaller, the comprehensive information contribution rate of the minimum circumscribed rectangle, the elongation, the blade area, the rectangle degree, the circularity and the compactness reaches 70%. Therefore, in this embodiment, the perimeter and elliptic fourier descriptors are selected, and the comprehensive geometric characteristic index is used as the core index.
Contribution rate of each index information
In the third step, the selected core index data adopted in the embodiment is a 64-dimensional vector, and total 100 leaves and 1600 pictures are included, and the problem that the dimension of an input sample is too high can occur when all the data are input into the BP neural network, so that the neural network is difficult to converge, and therefore the problem is simulated by the thought of an elliptic Fourier descriptor, and the data are preprocessed, so that the purpose of dimension reduction is realized.
The Matlab skeleton extraction algorithm uses two basic methods of 'erosion' and 'expansion' based on gray level image morphology to operate on images, and the essence of the two methods is to use one operator to carry out convolution operation on a graph matrix. This operator is classified into two types altogether, the Flat type and the Nonflat type. Both erosion and dilation operations can be performed using one of two operators. The core formula is as follows:
flat type corrosion:
(f-B)(x,y)=min{f(x+i,y+j)},(i,j)∈B
nonflat type corrosion:
(f-G)(x,y)=min{f(x+i,y+i)-G(i,j)},(i,j)∈G
flat type expansion:
Type Nonflat expansion:
(Sk (x) is the result, the original binary image)
The bat conversion of the weight and the threshold of the BP neural network refers to that the weight and the threshold of the BP neural network are corresponding to the position vector of the bat, namely, each position vector of the bat corresponds to a network structure, each component of the position vector represents a weight or a threshold, and the dimension of the position vector is equal to the combination of the weight and the threshold number in the network. Let the node numbers of each layer of 3-layer BP network be n, q, m respectively, then the network represented by the position vector of the ith bat is:
x=(xi1,xi2,…,xid)
=(w11,…,w1q,wn1,…,w11,…w1m,wq1,…,wqm,θ1,…,θq,θ′1,…,θ′1)′.
Where d=nq+qm+q+m, w ij (i=1, 2, …, n; j=1, 2, …, q) represents the connection weight between the input layer and the hidden layer, θ j、θk represents the threshold between layers; after weight and threshold bat are realized, the target function formula of BA is as follows:
Wherein x i represents a position vector of the bat i, the number of n-type learning samples, and O ih, Tih represents a network output and an ideal output of the h-th learning sample under a network structure determined by the bat i, respectively.
At this time, the updating iteration of the bat position vector corresponds to the updating of the weight and the threshold value, and the optimal weight and the threshold value of the BP neural network are obtained by utilizing the process of searching the optimal solution by the bat individual in the algorithm.
FIG. 15 is a graph of training times versus accuracy for the improved model using the second query. From fig. 15, it is known that under the condition that the optimal weight and the threshold of the BP neural network are obtained through bat algorithm optimization, when the iteration number of the improved BP neural network model is 972 times, the accuracy reaches to the set 5.4793 × -9, and the recognition accuracy is 95%. The method is higher than the numerical value of 90% before the optimization, and the two program operation result graphs show that the convergence speed of the BP neural network is improved by using an optimization algorithm, the time required by the BP neural network for identifying the blade type is shortened by about 120s, and the performance of the model after the optimization is further improved.
What is not described in detail in this specification is prior art known to those skilled in the art.
Claims (6)
1. The construction method of the blade image recognition model is characterized by comprising the following steps of:
a. Carrying out quantization processing on the leaf pictures in batches to extract leaf profile characteristic information, and establishing a quantization index system of the extracted characteristic information;
b. establishing a mathematical model for judging the leaf type according to the extracted characteristic information, identifying a core index based on a quantitative index system, and evaluating the performance of the mathematical model and the influence of the core index on the judging performance of the mathematical model;
c. The established mathematical model is improved by using an optimization algorithm according to leaf texture information and core indexes in the leaf pictures;
In the step a, calculating geometrical characteristic quantities of 7 traditional plant leaf classifications, namely perimeter, area, minimum circumscribed rectangle, rectangle degree, elongation, circularity and compactness of the leaf according to the extracted leaf edge contour; the geometric feature quantity of the leaf blade and the elliptic Fourier descriptor of the blade form a quantitative index system for identifying the leaf type;
The step b specifically comprises the following steps:
establishing a BP neural network with multiple hidden layers and multiple nodes by utilizing a BP neural network toolbox in MATLAB, wherein three hidden layers are all arranged; wherein the first layer has 100 nodes, the second layer has 2 nodes, and the third layer has one node;
randomly extracting leaf data, wherein the leaf data comprises geometric feature quantities of 7 traditional botanical leaf classifications and 10-dimensional elliptic Fourier descriptors; the BP neural network learns by using the blade data and the corresponding type thereof as learning samples, trains the BP neural network, realizes the mapping of the internal relation of a sample set, and initially establishes a BP neural network blade identification model;
Inputting single geometric feature quantity and corresponding blade types of the blades into a BP neural network for retraining, and performing a test by using the trained BP neural network to determine a blade perimeter, a 10-dimensional elliptic Fourier descriptor and a comprehensive geometric feature index as core indexes for blade feature depiction; wherein the comprehensive geometric characteristic index refers to the comprehensive description of minimum circumscribed rectangle, elongation, blade area, rectangle degree, circularity and compactness.
2. The method for constructing a leaf image recognition model according to claim 1, wherein in the step a, the edge information, texture information and geometric feature information in the leaf image are extracted by combining the binarized leaf image with the relevant standard quantity of plant taxonomy.
3. The method for constructing a blade image recognition model according to claim 2, wherein in the step b, the performance of the model and the performance influence of each index on the model are evaluated by analyzing the speed and the accuracy of the mathematical model algorithm after the mathematical model is constructed; the core index is identified by analyzing the accuracy of each index in the quantitative index system to the leaf classification identification.
4. The method for constructing a leaf image recognition model according to claim 3, wherein in the step c, on the basis of the established mathematical model, the extracted core index data is subjected to dimension reduction processing in combination with texture information of leaf pictures; and solving the parameter optimal value of the mathematical model through an optimization algorithm.
5. The method for constructing a blade image recognition model according to claim 2, wherein the step a specifically comprises the steps of: extracting pixel point coordinates of leaf contours by adopting a bwperim command in MATLAB, and performing binarization processing on leaf images by using an im2bw command; ordering the pixel point coordinate coordinates of the leaf outline in a clockwise direction, and forming a target boundary function of the leaf outline according to the ordered pixel point coordinates; and solving the elliptic Fourier descriptor to generate a blade edge characteristic information extraction result.
6. The method for constructing a blade image recognition model according to claim 4, wherein the step c specifically comprises the following steps:
Performing dimension reduction treatment on the blade information by utilizing skeleton extraction, and optimizing an original quantization index system;
Optimizing the weight and the threshold of the BP neural network by using a bat algorithm, and corresponding the weight and the threshold of the BP neural network to the position vector of the bat in the algorithm, namely, each position vector of the bat corresponds to a network structure, each component of the position vector represents a weight or a threshold, and the dimension of the position vector is equal to the combination of the weight and the threshold in the network;
and (3) obtaining the optimal weight and threshold of the BP neural network by using a bat algorithm, and then retraining the improved BP neural network by using an optimized quantization index system to obtain a final improved blade image classification and identification model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010388794.9A CN111860567B (en) | 2020-05-09 | 2020-05-09 | Construction method of blade image recognition model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010388794.9A CN111860567B (en) | 2020-05-09 | 2020-05-09 | Construction method of blade image recognition model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111860567A CN111860567A (en) | 2020-10-30 |
CN111860567B true CN111860567B (en) | 2024-04-16 |
Family
ID=72985259
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010388794.9A Active CN111860567B (en) | 2020-05-09 | 2020-05-09 | Construction method of blade image recognition model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111860567B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106022343A (en) * | 2016-05-19 | 2016-10-12 | 东华大学 | Fourier descriptor and BP neural network-based garment style identification method |
CN109543572A (en) * | 2018-11-07 | 2019-03-29 | 北京交通大学 | A kind of traveling pavement condition evaluation method |
CN110287882A (en) * | 2019-06-26 | 2019-09-27 | 北京林业大学 | A kind of big chrysanthemum kind image-recognizing method based on deep learning |
-
2020
- 2020-05-09 CN CN202010388794.9A patent/CN111860567B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106022343A (en) * | 2016-05-19 | 2016-10-12 | 东华大学 | Fourier descriptor and BP neural network-based garment style identification method |
CN109543572A (en) * | 2018-11-07 | 2019-03-29 | 北京交通大学 | A kind of traveling pavement condition evaluation method |
CN110287882A (en) * | 2019-06-26 | 2019-09-27 | 北京林业大学 | A kind of big chrysanthemum kind image-recognizing method based on deep learning |
Also Published As
Publication number | Publication date |
---|---|
CN111860567A (en) | 2020-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111178432B (en) | Weak supervision fine granularity image classification method of multi-branch neural network model | |
Singh et al. | Svm-bdt pnn and fourier moment technique for classification of leaf shape | |
WO2020177432A1 (en) | Multi-tag object detection method and system based on target detection network, and apparatuses | |
Faisal et al. | Deep learning and computer vision for estimating date fruits type, maturity level, and weight | |
CN106960214A (en) | Object identification method based on image | |
CN108875933B (en) | Over-limit learning machine classification method and system for unsupervised sparse parameter learning | |
CN101526994B (en) | Fingerprint image segmentation method irrelevant to collecting device | |
CN110321830A (en) | A kind of Chinese character string picture OCR recognition methods neural network based | |
CN111274958B (en) | Pedestrian re-identification method and system with network parameter self-correction function | |
CN104038792B (en) | For the video content analysis method and apparatus of IPTV supervision | |
CN112507896B (en) | Method for detecting cherry fruits by adopting improved YOLO-V4 model | |
CN110942091A (en) | Semi-supervised few-sample image classification method for searching reliable abnormal data center | |
Shen et al. | Image recognition method based on an improved convolutional neural network to detect impurities in wheat | |
CN113076920B (en) | Intelligent fault diagnosis method based on asymmetric domain confrontation self-adaptive model | |
CN116071560A (en) | Fruit identification method based on convolutional neural network | |
CN114782761A (en) | Intelligent storage material identification method and system based on deep learning | |
CN115393631A (en) | Hyperspectral image classification method based on Bayesian layer graph convolution neural network | |
Albkosh et al. | Optimization of discrete wavelet transform features using artificial bee colony algorithm for texture image classification. | |
CN113191361B (en) | Shape recognition method | |
CN111860567B (en) | Construction method of blade image recognition model | |
CN115661123B (en) | Industrial product surface defect position detection method based on weak supervision target detection | |
CN112465062A (en) | Clustering method based on manifold learning and rank constraint | |
CN117079272A (en) | Bullet bottom socket mark feature identification method combining manual features and learning features | |
CN111144464B (en) | Fruit automatic identification method based on CNN-Kmeans algorithm | |
CN114663791A (en) | Branch recognition method for pruning robot in unstructured environment |
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 |