The content of the invention
The present invention is directed to above-mentioned technical problem, proposes the image point that a kind of ELM and DE based on multi-channel feature are combinedClass method.The inventive method improves nicety of grading by extracting the characteristics of image of high resolution, and by using time-consuming fewGrader realize rapid image categorization.
The image classification method that the ELM based on multi-channel feature and DE of the present invention is combined, including:Training process and pre-Survey process.The training process includes:
Step a1:Obtain positive negative sample;
Step a2:Above-mentioned size is uniformly transformed into given size, and carries out gaussian filtering process;
Step a3:The integrating channel feature of above-mentioned sample image is extracted, including:Greyscale color channel characteristics, gradient directionHistogram channel characteristics and gradient magnitude channel characteristics;
Step a4:Using the integrating channel feature extracted in step 3 is as ELM input and carries out image classification training, togetherWhen, optimization is improved to ELM using DE differential evolution algorithms, is optimal ELM classifying quality, so as to be trainedGrader.
The prediction process includes:
Step b1:The size of image to be predicted is reduced to given size, and carries out gaussian filtering process;
Step b2:Extract the integrating channel feature of above-mentioned image to be predicted, including greyscale color passage, gradient direction NogataFigure passage and gradient magnitude passage;
Step b3:Using the integrating channel feature of said extracted as the above-mentioned grader trained input, by describedGrader is classified, and classification results are exported.
The technical solution adopted in the present invention is the image classification side that a kind of ELM based on multi-channel feature and DE is combinedMethod, it is possible to achieve quick, high accuracy, the image classification with very high practical value.
Embodiment
Below by embodiment, the invention will be further described, and its purpose is only that the research for more fully understanding the present inventionThe protection domain that content is not intended to limit the present invention.
As shown in figure 1, the image classification method that a kind of ELM and DE based on multi-channel feature of the present invention are combined, bagTraining process and prediction process are included, the training process comprises the following steps:
Step a1:Obtain in positive negative sample, the present embodiment using facial image as training sample, take under different illumination scenes,The faces such as all ages and classes, different sexes remove other body part fritters outside face as negative sample, such as positive sampleShown in Fig. 2 (a) and Fig. 3 (a).Any image without face can serve as negative sample, in order to reduce flase drop, and the present invention, which is used, to be coveredThe image that lid falls face is used as negative sample collection.In the present invention, positive sample quantity is 50,000, negative sample quantity 100,000.
Step a2:Above-mentioned size is uniformly scaled or be cut to given size, and carries out gaussian filtering process.ThisIn, given size can be 20*20 (resolution ratio), as shown in Fig. 2 (b) and Fig. 3 (b).Can certainly be according to the actual requirementsIt is other sizes.Used here as gaussian filtering process, weaken noise, strengthen contrast.
Step a3:The integrating channel feature of above-mentioned sample image is extracted, including:Greyscale color channel characteristics, gradient directionHistogram channel characteristics and gradient magnitude channel characteristics.Here, greyscale color channel characteristics be 1, gradient orientation histogram lead toRoad is characterized as 6, and gradient magnitude channel characteristics are 1.Certainly, according to actual demand, different characteristics can also be extractedAmount.
Step a4:Using the integrating channel feature extracted in step a3 is as ELM input and carries out image classification training, togetherWhen, optimization is improved to ELM using DE differential evolution algorithms, is optimal ELM classifying quality, so as to be trainedGrader.
Further, optimization is improved to ELM using DE differential evolution algorithms in step a4 to further comprise:
Step a41:The input weight w i that ELM is randomly generated and hidden layer weights biAs DE initial population θ and inputDE;
In above-mentioned formula (1), k represents node numbers of hidden layers, and n represents to input neuron number.To each individual in population, meterCalculate corresponding generalized inverse matrix, calculate the result of generalized inverse matrix root-mean-square error on checking collection, and using the error asThe fitness of each individual, the calculation formula of the root-mean-square error is as follows:
In above-mentioned formula (2), E represents root-mean-square error, (xj,tj) be ELM training data, N be input sample number, i tablesShow i-th of hidden layer node, j represents j-th of input data, and m represents input data x dimension (i.e. characteristic), rule of thumb setIt is 50 to put the maximum evolutionary generations of DE, chooses θ during minimal error, is used as input weights optimal ELM and hidden layer weights;
Step a42:Using ELM classification error rate as threshold value, the error rate is the image and total picture number of misclassification classThe ratio of amount, the input weights of the ELM to being obtained in step a41 are carried out preferably with hidden layer weights.Specifically, an ELM is setMaximum receptible error rate δ, if in DE maximum evolutionary generation, obtained ELM error rates are less than δ, then now DEIt is output as ELM best initial weights;If DE reaches maximum evolutionary generation, and ELM error rate remains unchanged more than the threshold value set, then selectsDE when selecting ELM minimal error rates in maximum algebraically is output as best initial weights.
By above-mentioned steps, the optimal grader trained can be obtained.
Prediction process is described below, the prediction process comprises the following steps:
Step b1:By the scaled of image to be predicted to given size, and carry out gaussian filtering process;
Step b2:Extract the integrating channel feature of above-mentioned image to be predicted, including greyscale color passage, gradient direction NogataFigure passage and gradient magnitude passage;
Step b3:Using the integrating channel feature of said extracted as the above-mentioned grader trained input, by describedGrader is classified, and classification results are exported.
The step of can also including statistics false drop rate after above-mentioned steps b3.
The image classification method being combined by the ELM based on multi-channel feature and DE of the present invention, it is possible to achieve quick,High accuracy, the image classification with very high practical value.
Obviously, those of ordinary skill in the art is it should be appreciated that the embodiment of the above is intended merely to explanation originallyInvention, and be not used as limitation of the invention, as long as in the spirit of the present invention, to embodiment described aboveChange, modification will all fall in claims of the present invention model.