Fully-autonomous on-line study method based on random fern classifier
Technical Field The invention belongs to the field of pattern recognition, in particular to a whole automatic sorter stochastic fern -based on-line learning method. Background Art On-line learning which belongs to the incremental learning scope of the study, in this kind of method in each sample classifier to learn a time only, and is not repeated learning, such on-line learning algorithm is not needed in the course of running a large amount of storage space to store the training sample, the sorter each receive a sample, in other words to its on-line learning, through the on-line learning in the course of using the classifier according to the still and to improve the self-updating new sample, classifying effect is further improved. Early on-line learning algorithm Winnow algorithm a, uniform linear prediction algorithm, 2001 year acedemic Oza will these algorithms to combine with a boosting algorithm, provides on-line boosting algorithm (the algorithm derived from "Online bagging and boosting" N.Oza and S.Russell, In Proc.Artificial Statistics Intelligence and, 105-112,2001), in the method of in Oza, each feature corresponding to a weak classifier, and strong classifier a certain number of weak classifier is weighted and, wherein the weak classifier from the weak classifier is selected out of the set. When the on-line study, each training sample set of weak classifiers one by one in the updating of each of the weak classifier, including adjusting the classification of positive and negative sample and the weights of this classifier threshold value, the weight of the good weak classifier increasingly high, and increasing the weight of the weak classifier is low, thus each time the online learning a sample can be selected a current weight of the highest join the weak classifier in the strong classifier final training of the classifier has stronger classification ability. However, on-line boosting algorithm each of the set of weak classifiers the weak classifier on-line learning new samples, when a large number of weak classifiers, on-line learning speed inevitably will be slowed. The Grabner improved on-line boosting algorithm, algorithm Adaboost the same as the feature selection can be carried out, and this kind of feature selection and is update the classifier of the on-line, referred to as online Adaboost (the algorithm derived from "On-line boosting and vision" H.Grabner and H.Bischof, In Proc.CVPR, (1): 260-267,2006). Adaboost feature selection for on-line, however, the operator of a classifier synthesis of weak classifiers, feature selection operator and corresponding to the number of feature selection operator the number of weak classifiers are fixed, the corresponding on-line learning classifier structure relatively rigid. When the found classification ability thereof is unable to meet the requirement of detection performance, even if the continuous on-line learning would also not be able to improve the detection precision. Ozuysal no longer use a weak classifier classification sample strong classifier, but from the sample feature set of a plurality of random forms a stochastic fern , stochastic fern statistical training samples through the posterior probability distribution, then a plurality of posterior probability distribution stochastic fern classification sample, in other words stochastic fern classifier algorithm (the algorithm derived from "Fast keypoint recognition using random ferns" In Pattern Analysis Machine Intelligence, IEEE Transaction on 32 (3), 448-461,2010). Content of the invention The technical problem to be solved by the invention is:to provide a sorter stochastic fern -based whole automatic on-line learning method, the self-learning for classifier in order to improve the classification performance. The invention is to solve the above-mentioned technical problem the technical proposal adopted by the: a whole automatic sorter stochastic fern -based on-line learning method, characterized in that it comprises the following steps: 1) sample preparation for the initial training classifiers: In response to the video frame to be detected, the frame selected in the video frame is a target picture, the affine transform the target picture to the picture as a positive sample; in order to not contain the target background Image region as a negative sample; this random obtaining a certain number of sample and negative sample as the initial training the classifier sample set; is, for the negative sample Image blocks of the same size; 2) initial training classifier stochastic fern : Using the prepared initial training of the sample set for the classifier stochastic fern classifier to initial training, statistical positive and negative sample in each stochastic fern of posterior probability distribution on; 3) the initial training of the classifier stochastic fern as the current goal detector traversing the video frame to be detected in target detection, to obtain a target module, and calculate the confidence level of each target module; 4) construction of positive and negative sample template set: The following three samples as a positive sample template is added to the positive sample template set M+, negative type the remaining added to the template set M-: A, step 1) is obtained in the sample; B, the step 3) exceeds the confidence level in the value of the confidence level of the target module, where the optical flow for the tracking video frame to obtain tracking module, if the tracking module with the target module has coinciding area, and exceeds the preset superposition ratesuperposition rate , the tracking module is that the real target, is added to the template as the positive sample M+ in; C, the step 3) exceeds the confidence level in the value of the confidence level of the target module, where the optical flow for the tracking video frame to obtain tracking module, if the tracking module with the target module has coinciding area, and not beyond the preset superposition ratesuperposition rate , similarity through conservative Sc judge whether the tracking module can join positive sample template set: Wherein: If Sc greater than a preset conservative similarity threshold, then the tracking module is used as a positive sample template by adding M+, For samples to be classified with the current are samples of the first half of the degree of similarity of the template matches, S+, S- are respectively to the positive sample to be classified, the degree of similarity of the matches the negative type , The similarity of the two Image frames, p+, p-negative sample to positive sample and respectively, for p sample to be classified, in this step the module for tracking the sample to be classified; Each adding a positive sample template, then take a video frame with four around the Image blocks of the same size can judge whether the negative sample, if it is as negative sample template by adding negative type the template set M-; 5) using the nearest neighbor classifier, to obtain on-line learning of the positive and negative sample: Nearest neighbor classifier is set up as follows: for each sample to be classified p, respectively positive and negative sample matches with the calculated similarity S+ (p, M+) and S- (p, M-): Similarity of the corresponding available Sr: If similarity Sr greater than a threshold value θNN, judge whether the sample to be classified as a true target, as the positive sample on-line study; otherwise it is false alarm, as a negative sample on-line study; This step of the sample to be classified in step 3) the obtained target module and step 4) the obtained positive and negative sample template set; (6) the on-line training classifier stochastic fern : Using the step 5) obtained on-line study of the positive and negative sample, the on-line learning classifier stochastic fern , gradually improve the classification accuracy; The on-line learning classifier stochastic fern can be continuously updated as the detection of the target detection system. According to the above-mentioned scheme, the step 2) the specific method is as follows: 2.1) stochastic fern structure: The initial training a classifier of the sample concentration on a single sample taken at random as a set of the feature point s stochastic fern , each sample taking the same position of the feature point, the pixel value of each of the comparison of feature points, each pair of feature points one characteristic point in the pixel value for the characteristic value 1, and the proper value is 0, s is the feature point obtained after a s a random order in accordance with the characteristic value of a s-bit binary number, that is, for the group of stochastic fernstochastic fern value, in each of samples of the same characteristic value stochastic fern ; 2.2) calculating on this category positive and negative typestochastic fern value at the a posteriori probability: In stochastic fern , a part of the positive samples, the other for negative samples; stochastic fern value has the value of 2s a; Statistical each stochastic fern value of the value of the number of experts, so as to obtain the type of the normal value at the stochastic fern C1 of posterior probability distribution on P (Fl | C1); by the same token to obtain the type of values on the stochastic fernnegative type C0 of posterior probability distribution on P (Fl | C0); stochastic fern all the initial training a classifier to classify the sample set, the sorter stochastic fern ; The steps 3) adopting the above-mentioned stochastic fern classifier in each frame of the video Image in the target detection: Traversing each frame of the video Image to be detected, in each frame of the video Image of the same size in the Image block is extracted as a sample to be measured, the size of the sample to be tested with the step 1) is equal to the size of the positive sample, calculate each stochastic fern value of the sample to be measured, so as to obtain the corresponding posterior probability, the classifier stochastic fern calculating its class; The types of samples of the Image block is, as the target is detected. According to the above-mentioned scheme, the step 4) of each adding a positive sample template, then take a video of the same in the size of the four same Image block when the judge whether the negative sample, introducing Gaussian background modeling, if the Image block for foreground pixels in the pixel is smaller than the threshold value, it is determined it is the negative sample. According to the above-mentioned scheme, the step 4) also comprises a template set whittles mechanism: which matches with the positive and negative sample to be classified is equal to the degree of similarity of the sample to be classified with the positive and negative template single positive and negative sample template on the maximum value of the degree of similarity between; real-time statistical each positive and negative sample template to obtain the number of times the maximum value, if a certain positive and negative sample template to the number of times of the maximum value less than the maximum value, the experts is removed corresponding to the template or negative type the template. According to the above-mentioned scheme, the step 6) on-line learning classifier stochastic fern by updating the posterior probability distribution. According to the above-mentioned scheme, the step 6) specific method is as follows: 6.1) step 5) as the positive and negative sample obtained on-line learning sample; is provided with a on-line learning sample is (fnew, ck), wherein fnew s bit of the binary number stochastic fern , ck as the sample class, calculating the on-line learning stochastic fern value of the sample; 6.2) in step 2.1) represented the sample set ck the total number of samples of 1, represented the ck with the on-line learning stochastic fern value of the sample by the same sample number 1 ; other stochastic fern does not change the value of a sample number; 6.3) according to the updated sample size, re-calculate sample classstochastic fern on the value at the a posteriori probability distribution; 6.4) one each new study sample online, will repeat 6.1) to 6.3) to the posterior probability distribution of a time to update. The beneficial results of this invention are: 1, only selection in the video frame at a time to the target can be carried out on-line learning classifier goal class , in other words: firstly, the target framed using affine transformation to obtain the initial normal the set, non-target region of a video extracting a small amount of negative type the set initial training classifier stochastic fern ; secondly, in the video frame using the classifier for target detection; in the detection process, using the nearest neighbor classifier collection on-line learning new sample, and automatically judging sample categories; finally, online learning new sample will be used for online training the classifier stochastic fern , update stochastic fern a posteriori probability, gradually improve the accuracy of the classifier stochastic fern target detection, the target detection system full autonomous on-line learning. 2, the Patent to introduce template set whittles mechanism, can be avoided on the template, the template may be more positive and negative sample of the system caused the defects of the running speed is lowered. Description of drawings Figure 1 is flow chart of the method of the invention; Figure 2 is an embodiment of the invention in the classifier stochastic fern chart; Figure 3 is the detection result, diagram of an embodiment of the invention on-line learning classifier stochastic ferncontrast chart the rear detection performance, wherein the diagram 3 (a)-3 (d) is on-line learning front 3 (i)-3 (l) after the detection result of the learning; Figure 4 is self-learning process graph of classifier under the illumination condition at night; Figure 5 is the classifier autonomous learning process graph of pedestrian detection; Figure 6 is ROC curve comparison graph of an embodiment of the invention with other classic on-line learning process. Mode of execution The following embodiment and the Figure in connection with the further description of this invention. The invention discloses a target detection system based on the research of independent on-line in the process of learning the nearest neighbor classifier training method, the method, it is only needed to selection in the video frame at a time to the target can be carried out on-line learning classifier goal class. The steps of: firstly, the target framed using affine transformation to obtain the initial normal the set, non-target region of a video extracting a small amount of negative type the set initial training classifier stochastic fern ; secondly, in the video frame using the classifier for target detection. In the process of detecting, using the nearest neighbor classifier collection on-line learning new sample, and automatically judging sample categories; finally, the new sample is used to on-line training the classifier stochastic fern , update stochastic fern a posteriori probability, gradually improve the accuracy of the classifier target detection, the target detection system full autonomous on-line learning. The present invention provides a whole automatic sorter stochastic fern -based on-line learning method as shown in Figure 1, comprises the following steps: 1) sample preparation for the initial training classifiers: In response to the video frame to be detected, the elected in frame frame 1st video Image of a target, the target pictures to the affine transformed picture as a positive sample; in order to not contain the target background Image region as a negative sample; this random obtaining a certain number of sample and negative sample as the initial training a classifier of the sample set. The initial training a classifier of the sample concentration of the sample in this embodiment is the same size of the Image block, the general size of 15 × 15 (pixel), if the Image block to be contained in the detected target is the sample is positive sample, not the sample is negative. 2) initial training classifier stochastic fern : Using the prepared initial training of the sample set for the classifier stochastic fern classifier to initial training, statistical positive and negative sample in each stochastic fern of posterior probability distribution on, as shown in Figure 2. Specific method is as follows: 2.1) stochastic fern structure: Concentration of the sample on a single sample taken at random as a set of the feature point s stochastic fern (this embodiment the example elects 5 to), each of the sample feature points is the same as the position of the, pixel of each pair a comparison of the values of the feature point, each pair of feature points one characteristic point in the pixel value for the characteristic value 1, and the proper value is 0, s is the feature point obtained after a s a random order in accordance with the characteristic value of a s-bit binary number, that is, for the group of stochastic fernstochastic fern value, in each of samples of the same characteristic value stochastic fern ; 2.2) calculating on this category positive and negative typestochastic fern value at the a posteriori probability: In stochastic fern , a part of the positive samples, the other for negative samples; stochastic fern each sample Fl of the characteristic can be combined together to form a decimal number, since the decimal number by obtaining S bit binary code, the type of the value of a value stochastic fern 2s a, in other words the 2s possible (in this embodiment to 25 possible); Statistical each stochastic fern value of the value of the number of experts, so as to obtain the type of the normal value at the stochastic fern C1 of posterior probability distribution on P (Fl | C1); by the same token to obtain the type of values on the stochastic fernnegative type C0 of posterior probability distribution on P (Fl | C0); stochastic fern all the initial training a classifier to classify the sample set, the sorter stochastic fern. 3) the initial training of the classifier stochastic fern as the current goal detector traversing the video frame to be detected in target detection, to obtain a target module, and calculates a level of confidence that each of the target module, in particular to: traversing the video frame to be detected, extracting the video frame of the same size as the Image block in the sample to be measured, the size of the sample to be tested with the step 1) is equal to the size of the positive sample, calculate each stochastic fern value of the sample to be measured, so as to obtain the corresponding posterior probability, the classifier stochastic fern calculating its class; The types of samples of the Image block is, as a target is detected, a target module. 4) construction of positive and negative sample template set: The following three samples as a positive sample template is added to the positive sample template set M+, negative type the remaining added to the template set M-: A, step 1) is obtained in the sample; B, in step 3) by more than a level of confidence in (desirable 0.6) confidence preset value of the target module, where the optical flow for the tracking video frame to obtain tracking module, if the tracking module with the target module has coinciding area, and exceeds the preset superposition ratesuperposition rate (pre-fetching usually superposition rate 60%), that the tracking module is the true target, is added to the template as the positive sample M+ in; C, in step 3) by more than a level of confidence in (desirable 0.6) confidence preset value of the target module, where the optical flow for the tracking video frame to obtain tracking module, if the tracking module with the target module has coinciding area, and not beyond the preset superposition ratesuperposition rate , similarity through conservative Sc judge whether the tracking module can join positive sample template set: Wherein: If Sc similarity threshold is greater than the preset conservative (desirable 0.6), then the tracking module is used as a positive sample template by adding M+, For samples to be classified with the current are samples of the first half of the degree of similarity of the template matches, S+, S- are respectively to the positive sample to be classified, the degree of similarity of the matches the negative type , The similarity of the two Image frames, p+, p-negative sample to positive sample and respectively, for p sample to be classified, in this step the module for tracking the sample to be classified; Each adding a positive sample template, then take a video frame with four around the Image blocks of the same size can judge whether the negative sample, if it is as negative sample template by adding negative type the template set M-. In the judgment, the introduction of Gaussian background modeling, if the Image block for foreground pixels in the pixel is smaller than the threshold (desirable less than 30%), it is determined it is the negative sample. Step 4) also comprises a template set whittles mechanism: which matches with the positive and negative sample to be classified is equal to the degree of similarity of the sample to be classified with the positive and negative template single positive and negative sample template on the maximum value of the degree of similarity between; real-time statistical each positive and negative sample template to obtain the number of times the maximum value, if a certain positive and negative sample template to the number of times of the maximum value less than the maximum value, the experts is removed corresponding to the template or negative type the template. 5) using the nearest neighbor classifier, to obtain on-line learning of the positive and negative sample: Nearest neighbor classifier is set up as follows: for each sample to be classified p, respectively positive and negative sample matches with the calculated similarity S+ (p, M+) and S- (p, M-): Similarity of the corresponding available Sr: If similarity Sr greater than a threshold value θNN, judge whether the sample to be classified as a true target, as the positive sample on-line study; otherwise it is false alarm, as a negative sample on-line study; This step of the sample to be classified in step 3) the obtained target module and step 4) the obtained positive and negative sample template set. (6) the on-line training classifier stochastic fern : Using the step 5) obtained on-line study of the positive and negative sample, the on-line learning classifier stochastic fern , gradually improve the classification accuracy; stochastic fern the online learning classifier as sustainable updated detection system for target detection. On-line learning classifier stochastic fern by updating the posterior probability distribution, specific method is as follows: 6.1) step 5) as the positive and negative sample obtained on-line learning sample; is provided with a on-line learning sample is (fnew, ck), wherein fnewstochastic fern s bit of the binary number (in this embodiment fnew is 00101, the decimal number 5), ck as the sample class, calculating the on-line learning stochastic fern value of the sample; 6.2) as shown in Figure 2, the step 2.1) represented the sample set ck the total number of samples of 1, represented the ck with the on-line learning stochastic fern value of the sample by the same sample number 1 ; other stochastic fern does not change the value of a sample number (in this embodiment, classification is ck sample total M plus 1, stochastic fern Fl the value to 5 sample few N plus 1, other values of the number of sample Nother unchanged); 6.3) according to the updated sample size, re-calculate sample classstochastic fern on the value at the posterior probability distribution of (in this embodiment, stochastic fern Fl to the value of 5 into the posterior probability of Other value of posterior probability value becomes ); 6.4) one each new study sample online, will repeat 6.1) to 6.3) to the posterior probability distribution of a time to update. Through the tests in the field of traffic, as shown in Figure 3 (the actual target in the detecting process, we use several different scale in the video Image for target detection, different scales corresponding Image frame size different, therefore can detect the frame selected Image blocks of different sizes), wherein the diagram 3a-3d is on-line learning pre-detection result (in other words only the detection result of the initial training), chart 3e-3h is the detection of the on-line after learning a result, the map can be found in the initial training classifier to relatively low effect target detection, target detection after the trained high the effect of many. Figure 4 is the classifier autonomous learning process graph, wherein the diagram of illumination at night under the condition 4 (a)-4 (d) to the beginning of the video, undetected more can be seen, this is because the total independent on-line training is less caused by the sample. With the increase of the on-line training samples, the rate of detection, false alurm also increase gradually, as shown in Figure 4 (e)-4 (h) is shown. When the classifier after further on-line learning, each of its a posteriori probability stochastic fern tend to be stable, the detected vehicle target also tends to be accurate, as shown in Figure 4 (i)-4 (l) is shown. Figure 5 is the situation of target detection, from the map of pedestrian detection classifier autonomous learning process graph, wherein the diagram 5 (a)-5 (d) independent on-line learning for the detection of the initial stage, Figure 5 (e)-5 (h) the self-learning for the system 200 frame can be found in the whole automatic on-line learning method can be gradually improved target detection performance. Figure 6 is ROC curve comparison graph, from the diagram of an embodiment of the invention with other classic on-line learning process can be found in the whole automatic on-line learning method has better detection effect. The invention discloses a fully-autonomous on-line study method based on a random fern classifier. With the method, on-line study targeted for a classifier of the target class can be carried out by selecting a target in a video frame for only once. The method comprises the following steps: carrying out affine transformation on the selected target to obtain an initial positive sample set, and extracting a small number of negative sample sets in a non- target area of the video to train an initial random fern classifier; then, carrying out target detection in the video frame by using the classifier; in the detection process, using a nearest neighbor classifier to collect on-line study new samples and automatically judging the class of the samples; and finally, applying the new samples to on-line training of the random fern classifier, updating random fern posterior probability, improving the precision of target detection of the classifier gradually, and realizing fully-autonomous on-line study of a target detection system. 1. A classifier stochastic fern -based whole automatic on-line learning method, characterized in that it comprises the following steps: 1) sample preparation for the initial training classifiers: In response to the video frame to be detected, the frame selected in the video frame is a target picture, the affine transform the target picture to the picture as a positive sample; in order to not contain the target background Image region as a negative sample; this random obtaining a certain number of sample and negative sample as the initial training the classifier sample set; is, for the negative sample Image blocks of the same size; 2) initial training classifier stochastic fern : Using the prepared initial training of the sample set for the classifier stochastic fern classifier to initial training, statistical positive and negative sample in each stochastic fern of posterior probability distribution on; 3) the initial training of the classifier stochastic fern as the current goal detector traversing the video frame to be detected in target detection, to obtain a target module, and calculate the confidence level of each target module; 4) construction of positive and negative sample template set: The following three samples as a positive sample template is added to the positive sample template set M+, negative type the remaining added to the template set M-: A, step 1) is obtained in the sample; B, the step 3) exceeds the confidence level in the value of the confidence level of the target module, where the optical flow for the tracking video frame to obtain tracking module, if the tracking module with the target module has coinciding area, and exceeds the preset superposition ratesuperposition rate , the tracking module is that the real target, is added to the template as the positive sample M+ in; C, in step 3) is in a level of confidence that more than 0.6 of the target module, where the optical flow for the tracking video frame to obtain tracking module, if the tracking module with the target module has coinciding area, and not beyond the preset superposition ratesuperposition rate , similarity through conservative Sc judge whether the tracking module can join positive sample template set: Wherein: If Sc greater than a preset conservative similarity threshold, then the tracking module is used as a positive sample template by adding M+, For samples to be classified with the current are samples of the first half of the degree of similarity of the template matches, S+, S- are respectively to the positive sample to be classified, the degree of similarity of the matches the negative type , The similarity of the two Image frames, p+, p-negative sample to positive sample and respectively, for p sample to be classified, in this step the module for tracking the sample to be classified; Each adding a positive sample template, then take a video frame with four around the Image blocks of the same size can judge whether the negative sample, if it is as negative sample template by adding negative type the template set M-; 5) using the nearest neighbor classifier, to obtain on-line learning of the positive and negative sample: Nearest neighbor classifier is set up as follows: for each sample to be classified p, respectively positive and negative sample matches with the calculated similarity S+ (p, M+) and S- (p, M-): Similarity of the corresponding available Sr: If similarity Sr greater than a threshold value θNN, judge whether the sample to be classified as a true target, as the positive sample on-line study; otherwise it is false alarm, as a negative sample on-line study; This step of the sample to be classified in step 3) the obtained target module and step 4) the obtained positive and negative sample template set; (6) the on-line training classifier stochastic fern : Using the step 5) obtained on-line study of the positive and negative sample, the on-line learning classifier stochastic fern , gradually improve the classification accuracy; The on-line learning classifier stochastic fern can be continuously updated as the detection of the target detection system. 2. Based on the classifier stochastic fern of independent on-line learning method according to Claim 1, characterized in that the step 2) the specific method is as follows: 2.1) stochastic fern structure: The initial training a classifier of the sample concentration on a single sample taken at random as a set of the feature point s stochastic fern , each sample taking the same position of the feature point, the pixel value of each of the comparison of feature points, each pair of feature points one characteristic point in the pixel value for the characteristic value 1, and the proper value is 0, s is the feature point obtained after a s a random order in accordance with the characteristic value of a s-bit binary number, that is, for the group of stochastic fernstochastic fern value, in each of samples of the same characteristic value stochastic fern ; 2.2) calculating on this category positive and negative typestochastic fern value at the a posteriori probability: In stochastic fern , a part of the positive samples, the other for negative samples; stochastic fern value has the value of 2s a; Statistical each stochastic fern value of the value of the number of experts, so as to obtain the type of the normal value at the stochastic fern C1 of posterior probability distribution on P (Fl | C1); by the same token to obtain the type of values on the stochastic fernnegative type C0 of posterior probability distribution on P (Fl | C0); stochastic fern all the initial training a classifier to classify the sample set, the sorter stochastic fern ; The steps 3) adopting the above-mentioned stochastic fern classifier in each frame of the video Image in the target detection: Traversing each frame of the video Image to be detected, in each frame of the video Image of the same size in the Image block is extracted as a sample to be measured, the size of the sample to be tested with the step 1) is equal to the size of the positive sample, calculate each stochastic fern value of the sample to be measured, so as to obtain the corresponding posterior probability, the classifier stochastic fern calculating its class; The types of samples of the Image block is, as the target is detected. 3. Based on the classifier stochastic fern of independent on-line learning method according to Claim 1, characterized in that the step 4) of each adding a positive sample template, then take a video of the same in the size of the four same Image block when the judge whether the negative sample, introducing Gaussian background modeling, if the Image block for foreground pixels in the pixel is smaller than the threshold value, it is determined it is the negative sample. 4. Based on the classifier stochastic fern of independent on-line learning method as in Claim 1 or Claim 3, characterized in that said step 4) further comprises a template set whittles mechanism: which matches with the positive and negative sample to be classified is equal to the degree of similarity of the sample to be classified with the positive and negative template single positive and negative sample template on the maximum value of the degree of similarity between; real-time statistical each positive and negative sample template to obtain the number of times the maximum value, if a certain positive and negative sample template to the number of times of the maximum value less than the maximum value, the experts is removed corresponding to the template or negative type the template. 5. Based on the classifier stochastic fern of independent on-line learning method according to Claim 2, characterized in that the step 6) on-line learning classifier stochastic fern by updating the posterior probability distribution. 6. Based on the classifier stochastic fern of independent on-line learning method according to Claim 5, characterized in that the step 6) specific method is as follows: 6.1) step 5) as the positive and negative sample obtained on-line learning sample; is provided with a on-line learning sample is (fnew, ck), wherein fnew s bit of the binary number stochastic fern , ck as the sample class, calculating the on-line learning stochastic fern value of the sample; 6.2) in step 2.1) represented the sample set ck the total number of samples of 1, represented the ck with the on-line learning stochastic fern value of the sample by the same sample number 1 ; other stochastic fern does not change the value of a sample number; 6.3) according to the updated sample size, re-calculate sample classstochastic fern on the value at the a posteriori probability distribution; 6.4) one each new study sample online, will repeat 6.1) to 6.3) to the posterior probability distribution of a time to update.