Image identification method based on adaptive matrix iteration extreme learning machine

文档序号:8612 发布日期:2021-09-17 浏览:42次 中文

1. An image identification method based on an adaptive matrix iterative extreme learning machine is characterized by comprising the following steps:

step 1, carrying out data preprocessing on an acquired image data set to obtain a feature vector of an image, and determining a label of the image, wherein elements in the image data set are recorded as: (x, t), where x is a feature vector of the image, and x ═ x1,x2,…,xm]TE is R, m is a characteristic dimension; t is the label vector of the image, t ═ t1,t2,…,tl]TE is R, and l is a label dimension; dividing the image data set into a test set and a training set;

step 2, combining an extreme learning machine and a self-adaptive matrix iteration mode, constructing an image identification model based on the self-adaptive matrix iteration extreme learning machine, wherein a network structure of the image identification model consists of an m-dimensional input layer, a hidden layer containing n nodes and an output layer containing l nodes, and is shown in a formula (1):

wherein, wi=[wi1,wi2,…,wim]TRepresenting an input weight vector, β, connecting the i-th hidden layer node with the input layer nodei=[βi1i2,…,βil]For output weight matrices connecting the i-th hidden layer node with the output layer node, biA bias matrix of the ith hidden layer node, and g (w, x, b) is an activation function; the input weight matrix and the bias matrix are both generated randomly;

step 3, solving an output weight matrix by using the training set generated in the step 1 in a matrix iteration mode to finish the training of the image recognition model;

and 4, in application, inputting the feature vector of the image to be classified into the image recognition model obtained by training in the step 3, so as to obtain the type of the image to be classified.

2. The image recognition method according to claim 1, wherein the step 3 of solving the output weight matrix in a matrix iteration mode to complete the training of the image recognition model comprises the following steps:

step 3.1, selecting a training set containing M samples, and recording as follows: (x)i,ti) I ═ 1,2, … M where xi=[xi1,xi2,…,xim]T∈R,ti=[ti1,ti2,…,til]TE is R; inputting the training set into the image recognition model;

step 3.2, solving an output weight matrix of the image recognition model by using a matrix iteration mode, and converting the formula (1) into a formula (2):

β(k)=(IM-μN-1HTH)β(k-1)+μN-1HTT (2)

wherein β ═ β12,…,βn]T;T=[t1,t2,…,tM]T(ii) a H is the hidden layer output matrix, expressed as:k is the number of iterations, μ is the convergence factor, N is the matrix HTA diagonal matrix of H; i isMAn identity matrix of dimension M;

and determining the value of the convergence factor mu in a self-adaptive mode, as shown in a formula (3):

wherein λ ismax[N-1HTH]Is a matrix N-1HTMaximum value of characteristic values of H, lambdamin[N-1HTH]Is a matrix N-1HTThe minimum of the eigenvalues of H;

the output weight matrix beta can be solved by the formulas (2) and (3);

3.3, testing the image recognition model by using the test set, and finishing the training of the image recognition model if the accuracy of the image recognition model reaches the standard; otherwise, step 3.1 is performed.

3. The image recognition method of claim 1, wherein the feature vectors of the images in the image dataset are normalized.

Background

With the breakthrough development of artificial intelligence, machine learning is continuously innovated and improved as a mainstream method for solving the problem of artificial intelligence. The image recognition technology is an important field of artificial intelligence, and tasks which cannot be completed by a common sensor can be completed by the image recognition technology. The image recognition technology processes image data based on image characteristics, and establishes a model by using an algorithm, wherein the quality of the algorithm determines the image recognition effect.

An Extreme Learning Machine (ELM) is a single hidden layer feedforward neural network algorithm, and due to the characteristics that the structure is simple, input weights and deviations can be randomly generated during training, and output weights are determined by solving the minimum norm solution of a linear equation set, compared with many traditional algorithms, the ELM algorithm can have higher training speed and better generalization capability on the basis of ensuring the Learning accuracy, and is more and more applied to the field of image recognition. Although the traditional ELM algorithm has the advantages of simple network structure, less set parameters and higher training speed relative to a multilayer neural network, the accuracy of a trained learning model has great instability due to the characteristics of single-layer network structure and parameter randomness. Meanwhile, the method for solving the Moore-Penrose generalized inverse adopted for solving the output weight matrix has certain defects, and the method can cause overlong operation time and lower image identification accuracy under partial conditions.

Disclosure of Invention

In view of the above, the invention provides an image recognition algorithm based on an adaptive matrix iterative extreme learning machine, which realizes accurate and efficient recognition and classification of images.

The invention provides an image identification method based on an adaptive matrix iteration limit learning machine, which comprises the following steps:

step 1, carrying out data preprocessing on an acquired image data set to obtain a feature vector of an image, and determining a label of the image, wherein elements in the image data set are recorded as: (x, t), where x is a feature vector of the image, and x ═ x1,x2,···,xm]TE is R, m is a characteristic dimension; t is the label vector of the image, t ═ t1,t2,···,tl]TE is R, and l is a label dimension; dividing the image data set into a test set and a training set;

step 2, combining an extreme learning machine and a self-adaptive matrix iteration mode, constructing an image identification model based on the self-adaptive matrix iteration extreme learning machine, wherein a network structure of the image identification model consists of an m-dimensional input layer, a hidden layer containing n nodes and an output layer containing l nodes, and is shown in a formula (1):

wherein, wi=[wi1,wi2,···,wim]TRepresenting an input weight vector, β, connecting the i-th hidden layer node with the input layer nodei=[βi1i2,···,βil]For output weight matrices connecting the i-th hidden layer node with the output layer node, biA bias matrix of the ith hidden layer node, and g (w, x, b) is an activation function; the input weight matrix and the bias matrix are both generated randomly;

step 3, solving an output weight matrix by using the training set generated in the step 1 in a matrix iteration mode to finish the training of the image recognition model;

and 4, in application, inputting the feature vector of the image to be classified into the image recognition model obtained by training in the step 3, so as to obtain the type of the image to be classified.

Further, in the step 3, the output weight matrix is solved in a matrix iteration mode, and the training of the image recognition model is completed, including the following steps:

step 3.1, selecting a training set containing M samples, and recording as follows: (x)i,ti) I-1, 2, · · M, where xi=[xi1,xi2,···,xim]T∈R,ti=[ti1,ti2,···,til]TE is R; inputting the training set into the image recognition model;

step 3.2, solving an output weight matrix of the image recognition model by using a matrix iteration mode, and converting the formula (1) into a formula (2):

β(k)=(IM-μN-1HTH)β(k-1)+μN-1HTT (2)

wherein β ═ β12,···,βn]T;T=[t1,t2,···,tM]T(ii) a H is the hidden layer output matrix, expressed as:k is the number of iterations, μ is the convergence factor, N is the matrix HTA diagonal matrix of H; i isMAn identity matrix of dimension M;

and determining the value of the convergence factor mu in a self-adaptive mode, as shown in a formula (3):

wherein λ ismax[N-1HTH]Is a matrix N-1HTMaximum value of characteristic values of H, lambdamin[N-1HTH]Is a matrix N-1HTThe minimum of the eigenvalues of H;

the output weight matrix beta can be solved by the formulas (2) and (3);

3.3, testing the image recognition model by using the test set, and finishing the training of the image recognition model if the accuracy of the image recognition model reaches the standard; otherwise, step 3.1 is performed.

Further, the feature vectors of the images in the image data set are all subjected to normalization processing.

Has the advantages that:

according to the method, the network structure of the traditional extreme learning machine is combined with the adaptive matrix iteration mode, and the convergence factor adaptive matrix iteration mode is utilized to converge to obtain the output weight matrix when the output weight matrix is solved, so that the characteristics of simple network structure, random parameter generation and the like of the traditional extreme learning machine are kept, the training precision in the aspect of image recognition is better, the occupied computing resources are less, the consumed time is shorter, and a new idea and a new way are provided for the improvement and optimization of a machine learning algorithm and the image recognition.

Detailed Description

The present invention will be described in detail below with reference to examples.

The invention provides an image identification method based on an adaptive matrix iteration extreme learning machine, which has the following basic ideas: the network structure of the traditional extreme learning machine is combined with the self-adaptive matrix iteration mode, an image recognition model based on the self-adaptive matrix iteration extreme learning machine is constructed, the training of the image recognition model based on the self-adaptive matrix iteration extreme learning machine is completed through a training set constructed by image data, and the classification of images is realized through the image recognition model based on the self-adaptive matrix iteration extreme learning machine obtained through training.

The invention provides an image identification method of an extreme learning machine based on adaptive matrix iteration, which comprises the following specific steps of:

step 1, acquiring an image data set, performing data preprocessing on the image data to obtain a feature vector of an image, and determining a label of the image, wherein elements in the image data set are recorded as: (x, t), where x is a feature vector of the image, and x ═ x1,x2,···,xm]TE is R, m is a characteristic dimension; t is the label vector of the image, t ═ t1,t2,···,tl]Te.R, l is the label dimension. The image data set is divided into a test set and a training set according to a certain proportion, and the characteristic vector of the image is subjected to normalization and standardization processing.

Step 2, combining an extreme learning machine and a self-adaptive matrix iteration mode, constructing an image recognition model based on the self-adaptive matrix iteration extreme learning machine, wherein a network structure of the extreme learning machine consists of an m-dimensional input layer, a hidden layer containing n nodes and an output layer containing l nodes, and is shown as the following formula:

wherein, wi=[wi1,wi2,···,wim]TRepresenting an input weight vector, β, connecting the i-th hidden layer node with the input layer nodei=[βi1i2,···,βil]For output weight matrices connecting the i-th hidden layer node with the output layer node, biG (w, x, b) is the activation function for the bias matrix of the ith hidden layer node. The input weight matrix and the bias matrix are both generated randomly.

And 3, finishing training of the image recognition model based on the adaptive matrix iterative extreme learning machine by adopting the training set generated in the step 1.

For a training set (x) containing M samplesi,ti) I-1, 2, · · M, where xi=[xi1,xi2,···,xim]T∈R,ti=[ti1,ti2,···,til]TE.r, to facilitate the solution of the model, equation (1) is transformed into equation (2):

Hβ=T (2)

wherein β ═ β12,···,βn]T;T=[t1,t2,···,tM]T(ii) a H is the hidden layer output matrix, expressed as:

thus, a least squares solution of the output weights can be obtained by solving the linear matrix equation (2). In the invention, a matrix iteration mode is utilized to solve an output weight matrix, which is shown in formula (3):

β(k)=β(k-1)+μN-1HT[T-Hβ(k-1)] (3)

where k is the number of iterations, μ is the convergence factor, and N is the matrix HTThe diagonal matrix of H. The method can be further simplified to obtain:

β(k)=(IM-μN-1HTH)β(k-1)+μN-1HTT (4)

wherein, IMIs an M-dimensional identity matrix. If the matrix HTH is represented by the following formula:

then the matrix N is diag { H }11,H22,H33}. In particular, if the matrix H is column-full rank, a unique solution may be converged.

In the prior art, specific values of mu are not given in many such iterative methods, and the invention adopts a self-adaptive method to determine the value of the convergence factor mu, as shown in formula (5):

wherein λ ismax[N-1HTH]Is a matrix N-1HTMaximum value of characteristic values of H, lambdamin[N-1HTH]Is a matrix N-1HTThe minimum of the eigenvalues of H.

According to the formulas (4) and (5), the output weight matrix β can be solved. Then, testing the model by using a test set, obtaining the accuracy rate of the model by comparing the obtained predicted value with the true value, and finishing the training of the image recognition model based on the adaptive matrix iteration extreme learning machine if the accuracy rate reaches the standard; otherwise, the training set is determined again for the next round of training.

And 4, in application, inputting the feature vector of the image to be classified into the image recognition model which is trained in the step 3 and is based on the adaptive matrix iteration limit learning machine, so that the type of the image to be classified can be obtained.

The method has been performed with a number of classical image datasets as well as a MedMNIST image dataset for identification testing. The experimental result shows that compared with the traditional extreme learning machine, the regularization extreme learning machine, the support vector machine and the like, the algorithm has higher identification accuracy and better generalization capability, and meanwhile, in the experiment of a large-scale image data set, the resource occupied by the algorithm and the consumed time are less. Meanwhile, experiments also find that the accuracy is even better than that of a plurality of multilayer convolution neural network structure algorithms when some image data sets with specific characteristics are learned.

In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种基于延迟机制的多层图像分类方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!