Summary of the invention
It is an object of the invention to provide the intelligent method for classifying of a kind of electric instrument equipment, it is possible to effectively solve the problem of classification efficiency and accuracy rate.
For solving the problems of the technologies described above, the present invention provides following technical scheme:
An intelligent method for classifying for electric instrument equipment, comprising:
Electric instrument equipment pictures according to known class set up point class model of the feature database of the electric instrument equipment pictures with described known class;
Obtain the electric instrument equipment picture needing classification;
Need the electric instrument equipment picture of classification described in pre-treatment, obtain the characteristic information of the described electric instrument equipment picture needing classification;
The electric instrument equipment picture of classification is needed to classify according to described characteristic information and described point of class model to described;
Export the classification results of the described electric instrument equipment needing classification.
Preferably, a point class model for the feature database that the foundation of the described electric instrument equipment pictures according to known class has the electric instrument equipment pictures of described known class comprises:
Create first point of class model with the long-pending neural network of three-layer coil;
Obtain the characteristic information of the electric instrument equipment pictures of described known class;
The characteristic information of the electric instrument equipment pictures according to described known class, trains described first point of class model, has point class model of the feature database of the electric instrument equipment pictures of known class described in acquisition.
Preferably, described first point of class model is trained to comprise:
Described first point of class model is trained by the corresponding classification information of the characteristic information of the electric instrument equipment pictures according to described known class.
Preferably, needing the electric instrument equipment picture of classification described in described pre-treatment, the characteristic information obtaining the described electric instrument equipment picture needing classification comprises:
The electric instrument equipment picture of classification is needed described in gray processing;
Extract the described HOG feature of electric instrument equipment picture after gray processing needing classification;
Obtain the feature matrix of the corresponding described electric instrument equipment picture needing classification.
Preferably, before needing the electric instrument equipment picture of classification described in described gray processing, also comprise: the electric instrument equipment picture compressing the classification of described needs.
Preferably, before the characteristic information of the electric instrument equipment pictures of the described known class of described acquisition, also comprise:
The electric instrument equipment pictures of known class described in gray processing;
The HOG feature of the electric instrument equipment pictures extracting described known class after gray processing;
Obtain the feature matrix of the electric instrument equipment pictures of corresponding described known class.
Preferably, described in there is point class model of the long-pending neural network of three-layer coil, comprising:
For receiving the input layer of the electric instrument equipment pictures of described known class;
For the treatment of the processing layer of the electric instrument equipment pictures of described known class;
For exporting the full connection output layer of the class categories of the electric instrument equipment pictures of described known class.
Preferably, after point class model of the feature database of the electric instrument equipment pictures described in described acquisition with known class, also comprise:
Judge whether a described point class model meets and preset classification accuracy requirement;
If described point of class model does not meet described default classification accuracy requirement, then the parameter preset of described point of class model is adjusted, continue the described point class model of training;
If described point of class model meets described default classification accuracy requirement, then preserve described point class model.
Preferably, before judging whether a described point class model meets default classification accuracy requirement, also comprise:
Whether the iteration number of times of first point of class model described in training of judgement reaches the default iteration upper limit;
If reaching the iteration upper limit, then preserve described point class model;
If not reaching the iteration upper limit, then judge whether a described point class model meets and preset classification accuracy requirement.
Compared with prior art, technique scheme has the following advantages:
The intelligent method for classifying of a kind of electric instrument equipment provided by the present invention, comprising: point class model setting up the feature database of the electric instrument equipment pictures with described known class according to the electric instrument equipment pictures of known class; Obtain the electric instrument equipment picture needing classification; Need the electric instrument equipment picture of classification described in pre-treatment, obtain the characteristic information of the described electric instrument equipment picture needing classification; The electric instrument equipment picture of classification is needed to classify according to described characteristic information and described point of class model to described; Export the classification results of the described electric instrument equipment needing classification. First a point of class model is set up, this point of class model obtains according to the database training of the electric instrument equipment pictures of a large amount of known class, when the electric instrument equipment needing classification is classified, the electric instrument equipment picture needing classification can be obtained by shooting equipment etc., then by graph and image processing technology, it is carried out pre-treatment, obtain needing the characteristic information of the electric instrument equipment picture of classification, this characteristic information is input in this point of class model, the classification results of electric instrument equipment picture corresponding to this characteristic information can be obtained. Relative to traditional method carrying out classifying with manpower, this intelligent classification system is when classifying to electric instrument equipment, more intelligent, by the electric instrument equipment picture of directly input needs classification in categorizing system, the classification results of corresponding electric instrument equipment can be obtained, it is to increase classification efficiency.
Embodiment
The intelligent method for classifying of a kind of electric instrument equipment provided by the present invention, comprising: point class model setting up the feature database of the electric instrument equipment pictures with known class according to the electric instrument equipment pictures of known class; Obtain the electric instrument equipment picture needing classification; Pre-treatment needs the electric instrument equipment picture of classification, obtains the characteristic information of the electric instrument equipment picture needing classification; According to characteristic information and a point class model, electric instrument equipment picture is classified; The classification results of output power instrumentation. This intelligent classification system when electric instrument equipment is classified, by categorizing system directly input need the electric instrument equipment picture of classification, electric instrument equipment can be classified, it is to increase the classification efficiency of electric instrument equipment and accuracy rate.
In order to enable above-mentioned purpose, the feature and advantage of the present invention more become apparent, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
Set forth detail in the following description so that fully understanding the present invention. But the present invention can be different from alternate manner described here implement with multiple, and those skilled in the art can do similar popularization when not running counter to intension of the present invention. Therefore the present invention is not by the restriction of following public embodiment.
Please refer to Fig. 1, Fig. 2, the intelligent method for classifying schema of a kind of electric instrument equipment that Fig. 1 provides for a kind of embodiment of the present invention; The schematic diagram of the electric instrument equipment picture of the pre-treatment needs classification that Fig. 2 provides for a kind of embodiment of the present invention.
The intelligent method for classifying of a kind of electric instrument equipment that the embodiment of the present invention provides, comprises the following steps:
S1: point class model setting up the feature database of the electric instrument equipment pictures with described known class according to the electric instrument equipment pictures of known class.
Wherein, set up point class model of the feature database of the electric instrument equipment pictures with known class according to the electric instrument equipment pictures of known class, comprising:
Create first point of class model with the long-pending neural network of three-layer coil, use three layers of CNN convolutional neural networks, comprise: for receiving the input layer of the electric instrument equipment pictures of known class, owing to electric instrument equipment pictures have different information, therefore use different convolution nucleus neurons to be processed by electric instrument equipment pictures, finally extract the information that electric instrument equipment picture is concentrated; For the treatment of the processing layer of the electric instrument equipment pictures of known class, in this layer, by reducing the information processing capacity of electric instrument equipment pictures, remain with by information, it is possible to improve the classification efficiency of electric instrument equipment picture; For exporting the full connection output layer of the class categories of the electric instrument equipment pictures of known class.
Wherein, it may also be useful to neurone constructs the CNN convolutional neural networks of three layers. The first layer, as input layer, is mainly used in accepting extraneous input. Consider the different information of electric instrument equipment picture, it may also be useful to instrumentation picture is carried out information processing by different convolution nucleus neurons. The maximum advantage of CNN is exactly that weights are shared, and namely each neurone is that same convolution core deconvolutes image.Each layer has multiple FeatureMap, and each FeatureMap extracts a kind of feature of input by a kind of convolution filter, and then each FeatureMap has multiple neurone. In this layer, input picture size is 25*25, it may also be useful to 32 convolution cores, and each convolution core size is 3*3, creates 23*23 neurone, Connecting quantity is 32* (3*3+1), and each is neuronic, and to experience open country be 3*3. Exporting after the first layer processes and obtain 32 featuremap, extract the various information in power equipment picture, each featuremap size is 23*23, and the linking number of this layer is 32* (23*23).
The second layer can abstract be processing layer, and the information that last layer output is extracted is as the input of the second layer. In this layer, it is contemplated that to size and the complexity of model, it may also be useful to time-sampling and the correlation technique such as spatial sampling and maximum Chi Hua, parameter and the quantity of linking number and the complexity of model are processed, it is achieved fall dimension and optimize. It is made up of 32 Feature Mapping equally, but its each Feature Mapping is made up of 21 × 21 neurones. Each neurone has the impression open country of 3 × 3, can train coefficient for one, can train biased and a tanh activation function for one. Number of parameters is 32*3*3+1, and linking number is 289* (21*21). Another advantage of CNN is maximum pond, and time and space is sampled, it is achieved minimizing data processing amount remains with simultaneously uses information. Using maxpooling in this layer, poolsize is (2,2), and this layer of neuron number is reduced to 11*11. It is not overlapping that the 2*2 of each unit experiences open country, and therefore in this layer, the size of each characteristic pattern is 1/4 (row and column each 1/2) of original characteristic pattern size.
Third layer is a full articulamentum, it is possible to abstract in output layer. First front one layer of two dimensional character figure exported is converted into one-dimensional vector in this layer, sets up hidden layer. Using 128 neurones to set up full connection, finally output is connected a softmax classification function, the result of this function process is exactly class categories. Activation function uses softmax, setting loss function categorical_crossentropy. So far, build model to complete.
Obtain the characteristic information of the electric instrument equipment pictures of known class. in the present embodiment, before the characteristic information of electric instrument equipment pictures obtaining known class, preferably also comprise: the electric instrument equipment pictures of gray processing known class, by the electric instrument equipment pictures of known class are carried out gray processing, the change that the color characteristic of the electric instrument equipment surface caused due to illumination variation occurs can be eliminated, conveniently with fixed step size, the gray scale direction gradient of instrument is sampled, electric instrument equipment picture is divided into the square block of fixed size, every block is represented by weights shared by multiple shade of gray direction and correspondence, different characteristic information data collection can be collected according to different image granularities, the HOG feature of the electric instrument equipment pictures of extraction known class after gray processing, it is contemplated that to process effect, it is possible to arranging each interval and comprise 3 × 3 fritters, each fritter comprises 8 × 8 pixels, 8 histogram passages, obtain the feature matrix of the electric instrument equipment pictures of known class, wherein taking 8 as step-length, gradient direction is carried out the feature matrix that sampling obtains electric instrument equipment pictures, as final proper vector for classification.
It should be noted that, in the method for the present embodiment realizes, mainly electric instrument equipment is divided into 5 types: square instrumentation, round meter equipment, combination instrumentation, switch instrument equipment and indicating meter instrumentation.
The characteristic information of the electric instrument equipment pictures according to known class, trains first point of class model, and obtains point class model of the feature database of the electric instrument equipment with known class.
By the characteristic information of the electric instrument equipment pictures of known class is input in point class model, then a point class model is trained, and finally obtain point class model of the feature database of the electric instrument equipment with known class. Wherein, after point class model of feature database obtaining the electric instrument equipment with known class, by the checking sample of the electric instrument equipment pictures of known class, a point class model can be verified, whether the learning sample of identical type is similar with it to feature database to identify selected checking sample specifically can to set similarity threshold, verifies the accuracy rate that all can obtain point class model each time. When the electric instrument equipment needing classification is classified, only need in point class model of the feature database of the electric instrument equipment with known class, the picture of input electric power instrumentation, can classify to the electric instrument equipment needing classification.
In the present embodiment, first a point of class model is set up, it is preferably CNN (ConvolutionalNeuralNetwork) convolutional neural networks model, the electric instrument equipment pictures of a large amount of known class are divided into learning sample and checking sample, wherein learning sample and checking sample include known different classes of under electric instrument equipment picture, then according to learning sample, it it is point class model of the feature database of the electric instrument equipment pictures that has known class by classification model training, due to learning sample comprise known different classes of under electric instrument equipment picture, therefore can ensure that the feature database of point class model is more complete, when the kind of electric instrument equipment increases, only the electric instrument equipment sample of increase need to be joined sample storehouse.
S2: obtain the electric instrument equipment picture needing classification.
S3: pre-treatment needs the electric instrument equipment picture of classification, obtains the characteristic information of the electric instrument equipment picture needing classification.
In the present embodiment, by graph and image processing technology, the electric instrument equipment picture needing classification is carried out pre-treatment, obtaining can by the characteristic information of above-mentioned classification Model Identification, and wherein characteristic information is the proper vector obtained after the electric instrument equipment picture that pre-treatment needs classification.
The intelligent method for classifying of a kind of electric instrument equipment that the present embodiment provides, pre-treatment needs the electric instrument equipment picture of classification, and the characteristic information obtaining the electric instrument equipment picture needing classification comprises the following steps:
S31: gray processing needs the electric instrument equipment picture of classification.
S32: extract HOG (histograms of oriented gradients) feature needing the electric instrument equipment picture of classification after gray processing.
S33: the feature matrix obtaining the electric instrument equipment picture needing classification; Obtain the characteristic information of the electric instrument equipment picture needing classification. The present embodiment is that the electric instrument equipment picture and the electric instrument equipment pictures of known class that need classification are carried out identical pre-treatment is that example is described.
The intelligent method for classifying of a kind of electric instrument equipment that the present embodiment provides, need the electric instrument equipment picture of classification at gray processing before, also comprises: the electric instrument equipment picture of compression needs classification.
In the present embodiment, by the electric instrument equipment picture needing classification is compressed, it is possible to improve the transmission speed of picture, thus improve classification efficiency.
The intelligent method for classifying of a kind of electric instrument equipment that the present embodiment provides, trains first point of class model to comprise: first point of class model is trained by the classification information corresponding according to the characteristic information of the electric instrument equipment pictures of known class.
In the present embodiment, the classification information corresponding with the characteristic information of the electric instrument equipment pictures of known class is input to a point class model. When obtaining point class model of feature database of the electric instrument equipment with known class, it is possible to make the characteristic information of the electric instrument equipment picture of the known class in feature database mutually corresponding with classification information.
The intelligent method for classifying of a kind of electric instrument equipment that the present embodiment provides, after point class model of feature database obtaining the electric instrument equipment with known class, also comprises:
Judge whether a point class model meets and preset classification accuracy requirement; If a point class model does not meet presets accuracy requirement of classifying, then being adjusted by the parameter preset of point class model, wherein, the parameter preset comprises and connects weights and be biased, and continues train classification models; If a point class model meets presets classification accuracy requirement, then preserve a point class model.
In the present embodiment, by the checking sample of default classification accuracy requirement and the electric instrument equipment picture of known class, a point class model is judged, if a point class model does not meet presets classification accuracy requirement, then continue through the learning sample train classification models of the electric instrument equipment picture of known class; If a point class model meets presets classification accuracy requirement, then preserve a point class model. Therefore the classification precision of point class model can be improved so that the classification of electric instrument equipment is more accurate.
The intelligent method for classifying of a kind of electric instrument equipment that the present embodiment provides, before judging whether a point class model meets default classification accuracy requirement, also comprises: whether the iteration number of times of training of judgement first point of class model reaches the default iteration upper limit; If reaching the iteration upper limit, then preserve a point class model; If not reaching the iteration upper limit, then judge whether a point class model meets and preset classification accuracy requirement.
In the present embodiment, by, before judging whether a point class model meets default classification accuracy requirement, setting the iteration upper limit of train classification models, by arranging the iteration upper limit, can, after ensureing that a point class model reaches accuracy requirement, avoid continuing train classification models, it is to increase modeling efficiency.
S4: the electric instrument equipment picture needing classification is classified according to characteristic information and point class model.
In the present embodiment, can be input in point class model by the characteristic information of the electric instrument equipment picture by needing classification, point class model according to have known class electric instrument equipment pictures feature database in characteristic information and need the characteristic information of the electric instrument equipment picture classified to compare, if meeting in feature database a wherein class, the electric instrument equipment picture needing classification can be classified.
S5: the classification results exporting the electric instrument equipment needing classification.
In the present embodiment, by exporting the classification results of the electric instrument equipment needing classification, classification results comprises the tag along sort of the electric instrument equipment of needs classification, and user can be facilitated like this to know the classification results knowing the electric instrument equipment needing classification.
In sum, the intelligent method for classifying of a kind of electric instrument equipment provided by the present invention, first a point of class model is set up, then according to the electric instrument equipment pictures of a large amount of known class, it it is point class model of the feature database of the electric instrument equipment pictures that has known class by classification model training, when the electric instrument equipment needing classification is classified, the electric instrument equipment picture needing classification can be obtained by shooting equipment, then by figure chip technology, it is carried out pre-treatment, obtain needing the characteristic information of the electric instrument equipment picture of classification, the characteristic information of the last electric instrument equipment picture classified as required carries out automated intelligent classification with a point class model for the feature database of the electric instrument equipment pictures with known class and exports classification results. relative to traditional main sorting technique based on manpower, this intelligent classification system is when classifying to electric instrument equipment, by the electric instrument equipment picture of directly input needs classification in categorizing system, electric instrument equipment can be classified, thus improve the classification efficiency of electric instrument equipment.
Above the intelligent method for classifying of a kind of electric instrument equipment provided by the present invention is described in detail. Applying specific case herein the principle of the present invention and enforcement mode to have been set forth, the explanation of above embodiment just understands the present invention and core concept thereof for helping. , it is also possible to the present invention carries out some improvement and modification, it is noted that for those skilled in the art, under the premise without departing from the principles of the invention these improve and modify in the protection domain also falling into the claims in the present invention.