CN102117413B - Method for automatically filtering defective image based on multilayer feature - Google Patents

Method for automatically filtering defective image based on multilayer feature Download PDF

Info

Publication number
CN102117413B
CN102117413B CN2011100482848A CN201110048284A CN102117413B CN 102117413 B CN102117413 B CN 102117413B CN 2011100482848 A CN2011100482848 A CN 2011100482848A CN 201110048284 A CN201110048284 A CN 201110048284A CN 102117413 B CN102117413 B CN 102117413B
Authority
CN
China
Prior art keywords
image
trunk
skin
layer
feature
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
Application number
CN2011100482848A
Other languages
Chinese (zh)
Other versions
CN102117413A (en
Inventor
傅政军
王荣波
周建政
吴海虹
姚金良
明建华
谌志群
周渝清
王小华
严俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tiange Technology (hangzhou) Co Ltd
JINHUA JIUYUEWOBA NETWORK TECHNOLOGY CO LTD
Original Assignee
Tiange Technology (hangzhou) Co Ltd
JINHUA JIUYUEWOBA NETWORK TECHNOLOGY CO LTD
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tiange Technology (hangzhou) Co Ltd, JINHUA JIUYUEWOBA NETWORK TECHNOLOGY CO LTD filed Critical Tiange Technology (hangzhou) Co Ltd
Priority to CN2011100482848A priority Critical patent/CN102117413B/en
Publication of CN102117413A publication Critical patent/CN102117413A/en
Application granted granted Critical
Publication of CN102117413B publication Critical patent/CN102117413B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a method for automatically filtering a defective image based on multilayer feature. The preset filtering method has poor effect. The method comprises the following steps: inputting an image, preprocessing the input image and carrying out complexion detection on the preprocessed image to obtain a complexion mask image; extracting first-layer features of the images, classifying the images by adopting a first-layer binary system classification tree, carrying out trunk positioning on a suspected image and outputting a classification result; carrying out truck positioning on images which are successfully positioned by adopting a human face detection method; if the positioning is succeeded, extracting a third-layer feature and outputting an image by adopting a decision tree classifier; and positioning a truck of a human body by adopting an elliptical fitting method for the images which are not successfully positioned; after the feature is extracted, outputting classification results by adopting a binary system classification tree and finishing. According to the invention, internet industries carrying more multimedia information such as network video, social network sites, and the like can be healthily and sustainably developed.

Description

Bad image automatic fitration method based on multilayer feature
Technical field
The invention belongs to computer image processing technology field, it is related to a kind of bad image automatic fitration method based on multilayer feature.
Background technology
With the development of internet, people cause the various forms of information sharp increases such as word, image, video on internet by Network Capture, issue, propagation information.Because Web information issuance lacks effective supervision mechanism, the flame such as substantial amounts of pornographic, violence, reaction is distributed on internet, have impact on the structure of harmonious network environment.Bad image is used as one kind of flame, the network environment of heavy damage health.A variety of bad image filtering techniques are proposed for this researchers, wherein the most popular with the filter method based on content analysis.However, the bad image filtering techniques based on content still suffer from the shortcomings of skin color modeling is not accurate enough, feature extraction is not complete enough, classifier performance is not good at present.
Content-based filtering method is realized according to the content characteristic of image and classify and filter automatically.In recent years, existing many research institutions have carried out the research work of this respect, it is proposed that certain methods, and achieve certain effect.These methods are broadly divided into two classes:The filter method and feature based that are combined based on human body extract the filter method with machine learning.First method is constrained using human geometry, according to certain rule, first extracts effective limb member, then recognize human body from limb member according to geometrical constraint.The object of the method detection is only limitted to, comprising human body more complete image, block for human body parts or the crowded image detection capabilities of many people are limited, detection is more difficult to when complex or non-normalised in the picture to human posture, shape.The method is too dependent on restriction relation and the geometrical analysis of partes corporis humani's part, still can not the complicated changeable and in the case of of blocking to description human posture for restriction relation.Second method majority is all to train grader by construction feature vector, and using the method for machine learning.This method has an ability for adapting to many numerical examples, and faster, but shortcoming is it is also obvious that the performance of its grader depends on the classification capacity of the feature and grader extracted in itself to detection speed.Therefore, make to must take into consideration more complete feature in this way, and select suitable machine learning method to build grader.
The content of the invention
The purpose of the present invention is not high primarily directed to the accuracy rate of current bad image filtering method, the deficiency such as false drop rate is higher, robustness is poor, it is proposed that with higher robustness and compared with the bad image filtering method of high-accuracy.
The bad image filtering method of the present invention includes more complete feature extracting method, trunk localization method and multiple filtration technology.
Feature extraction carries out Face Detection using the quick complexion model based on RGB color, and then extracts the colour of skin, profile, spatial distribution, textural characteristics.
Trunk localization method mainly has three kinds:One kind is that, based on head and shoulder detection, it is using off-line training model inspection head and shoulder region and then positions trunk;Second is the localization method based on Face datection;The third is the method positioning trunk using ellipse fitting.
The multiple filtration technology of the present invention:First layer filters out most normal pictures using binary class tree;The second layer uses the method detected based on head and shoulder to position trunk, extracts after correlated characteristic, is filtered using the decision tree classifier of third layer;Third layer is extracted after correlated characteristic, filtered using the decision tree classifier of third layer using the method positioning trunk based on Face datection;Method positioning trunk of the 4th layer of use based on ellipse fitting, is extracted after correlated characteristic, is filtered using the 4th layer of binary class tree.
The filter method of the present invention comprises the following steps:
Step S1:Image is pre-processed after input picture, described pretreatment includes scaling processing and the smoothing processing of image;
Step S2:Face Detection is carried out using the complexion model built based on RGB color threshold method, colour of skin mask image is obtained;
Step S3:The colour of skin of image, texture, spatial distribution characteristic are extracted as first layer feature, then image is divided into using first layer binary class tree it is normal and doubtful two kinds, wherein doubtful image need to be filtered further;
Step S4:The image not filtered to step S3 carries out the trunk positioning detected based on head and shoulder, and second layer feature is extracted if positioning successfully, and it is normal and bad two kinds to use second layer decision tree classifier to be divided into image;
Step S5:Trunk is positioned to can't detect the image of head and shoulder using method for detecting human face, to extract after third layer feature and be divided into image using the decision tree classifier of third layer normal and bad two kinds;
Step S6:Image for can't detect face, trunk is positioned using ellipse fitting method, and image is divided into normal and doubtful two kinds by the 4th layer of feature of extraction and then the binary class tree using the 4th layer;
Specifically, image preprocessing includes the scaling processing of image, appropriate smoothing denoising.The scaling processing of image is ensureing that image color is undistorted, in the case that principal character do not lose, to carrying out diminution processing more than a certain size image, to accelerate detection speed.Image typically all can be because a variety of causes be by a certain degree of interference and infringement, so that including noise signal in image.The purpose of picture smooth treatment is exactly, in order to reduce and eliminate the noise in image, to improve picture quality, to be conducive to ensuing feature extraction.
Specifically, the complexion model built based on RGB color threshold method.On the basis of existing complexion model and applicable scene is analyzed, according to distribution characteristics of the colour of skin in RGB color, propose the quick complexion model for being adapted to application background of the present invention, this model has higher skin pixel recall rate, influenceed smaller by illumination and the change of shooting environmental, and it is very fast using the speed of this model inspection colour of skin, it disclosure satisfy that the time complexity requirement in feature extraction.
Specifically, the feature extraction of each layer.The colour of skin of the first layer feature including image, texture, spatial distribution characteristic;Second layer feature includes:Global characteristics based on colour of skin mask image, the image local feature based on trunk information, non-colour of skin global and local feature;Third layer feature also accounts for the ratio of largest block in the size, face and trunk of ratio, face and the trunk of image in addition to the global characteristics based on colour of skin mask image, non-colour of skin global characteristics, local feature including face area;4th layer of feature is in addition to the global characteristics based on colour of skin mask image, non-colour of skin global and local feature, also including oval area sum and image area ratio, the ratio of maximum oval and image area, maximum oval and oval around it area ratio.
Specifically, the global characteristics based on colour of skin mask image include:
Figure 2011100482848100002DEST_PATH_IMAGE001
All skin pixels account for the ratio of entire image area;
Figure 615988DEST_PATH_IMAGE002
Each colour of skin block area obtained after connected domain analysis and the ratio for accounting for entire image area;
Figure 2011100482848100002DEST_PATH_IMAGE003
The area of maximum independent colour of skin block accounts for the ratio of the colour of skin gross area;
Figure 713388DEST_PATH_IMAGE004
The girth of maximum colour of skin block profile and the ratio of area;
Figure 2011100482848100002DEST_PATH_IMAGE005
Maximum colour of skin block area accounts for the ratio of its boundary rectangle;
Specifically, non-colour of skin global and local feature includes:
Figure 893676DEST_PATH_IMAGE001
Image single order color moment, second order color moment, are divided into top half, two kinds of the latter half color moment again;
Figure 859358DEST_PATH_IMAGE002
Canny edges points account for the ratio of colour of skin area in texture feature extraction in colour of skin block, such as block;
The texture feature extraction of entire image;
Specifically, the image local feature based on trunk information includes:
Figure 43663DEST_PATH_IMAGE001
Trunk area accounts for the ratio of image area;
Torso interior skin pixel sum accounts for the ratio of trunk area;
Figure 447279DEST_PATH_IMAGE003
Colour of skin largest block accounts for the ratio of trunk area in trunk;
Position shift ratio of the position of colour of skin largest block relative to trunk center in trunk;
Specifically, trunk positioning be for obtain trunk position, size information important method, by trunk positioning can more accurately extract feature, for improve classification accuracy rate play a very important role.The trunk localization method of the present invention is divided into following three kinds:
The first is the localization method based on head and shoulder detection technique, the method has used for reference the correlation technique of pedestrian detection, by the HOG features for extracting training image, the machine learning method training combined using Adaboost and Linear SVM obtains the cascade classifier of head and shoulder, and carries out head and shoulder detection positioning trunk using it.
Second method is to detect face using the fast face detecting method based on Adaboost cascade devices, and utilizes position and the size of the aspect ratio information estimation trunk of the size, positional information and image of face.
The third method is the trunk localization method based on ellipse fitting, gray level image is converted the image into first, then the edge of Canny operator extraction images is used, ellipse fitting is then carried out, noise is removed finally according to the component relationship that oval size, position and partes corporis humani divide.
Specifically, multiple filtration technology is as follows:
First layer binary class tree root is according to first layer characterizing definition property set, and dependence concentrates set of properties constituent class tree of the selection with optimal classification ability;Second layer decision tree classifier selects attribute using C4.5 decision trees according to the information gain-ratio of attribute, and training obtains a grader being made up of some attributes;The decision tree classifier training method of third layer is as the second layer, and by the feature extracted has larger difference, therefore the grader that training is obtained is very different in structure and property set;The generation method of 4th layer of binary class tree is with the identical of first layer, but property set is different.
The present invention has the advantages that relative to prior art:The realization of the inventive method has important application value, great facilitation will be produced for the vulgar wind in regulation internet, purification internet environment, it is ensured that Internet video, social network sites etc. are loaded with the more Internet industry health of multimedia messages, sustainable development.
Brief description of the drawings
Fig. 1 illustrates bad image filtering method of the invention flow chart to output testing result since being inputted image.
Fig. 2 represents the structure chart of the binary tree grader that second layer grader is used in the present invention.
Fig. 3 represents HOG integrograms.
Fig. 4 represents the cascade classifier detected for head and shoulder.
Fig. 5(a)Represent experiment artwork.
Fig. 5(b)Represent the PRELIMINARY RESULTS figure of ellipse fitting.
Fig. 5(c)Represent according to the fitting result figure obtained after the feature denoising such as oval size, axial ratio.
Embodiment
The present invention is described in detail below in conjunction with accompanying drawing, it is noted that described embodiment is intended merely to facilitate the understanding of the present invention, and does not play any restriction effect to it. 
Embodiments of the invention are discussed in detail below with reference to the accompanying drawings.
Fig. 1 is the flow chart of filter method of the present invention, illustrates image from being input to the whole flow process that finishes of detection.
1. the Face Detection unit in Fig. 1.
Concrete technical scheme is:Face Detection is carried out using the threshold value complexion model based on RGB color and obtains colour of skin mask image.Because the performance of Face Detection depends on the overlapping degree of the colour of skin-non-colour of skin, the conversion of color space simultaneously influences this determinant, and RGB and linear color space have preferable separability and classification performance, are a more satisfactory class color spaces.Therefore, the present invention establishes the complexion model based on RGB color, it is to avoid the conversion of color space, and distribution of the colour of skin in R, G, B three dimensions portrayed by following rule.
Rule one, the constraint of simple componentR>40, G>55, B>66,Three conditions must simultaneously meet;
Magnitude relationship constraint between rule two, componentR>G,G>B-20,Two conditions must simultaneously meet;
Difference constraint between rule three, componentAbs(R-G)+Abs(G-B)>20 
Rule four, must is fulfilled for suppress red color partiallyR<2*G+10
It is otherwise non-skin pixel for skin pixel if some pixel meets the constraint of aforementioned four rule.
2. the first layer grader unit in Fig. 1.
It is rapidly to filter out the image larger with bad image difference using first layer filtering purpose, we select the colour of skin, texture, spatial distribution characteristic as the main feature of first layer filter algorithm, and these features are met:Characteristic value fluctuation is smaller between same category of Different Individual, is differed greatly between different classes of sample characteristics.Realize that first layer is filtered by building a binary class tree using these features.This filter method realizes that simply, speed disclosure satisfy that the requirement of first layer filtering soon.
First layer selection skin pixel points account for the ratio of image total pixel number; effective colour of skin block accounts for the ratio of image size; the colour of skin ratio of key area; textural characteristics; what designed first layer grader to be solved is a two class problems; it is normal or doubtful to differentiate present image, and the work of this layer is to try to remove those normal pictures, and then by the doubtful image feeding by filtering, several layers of graders are filtered below.The larger image of most of and bad image difference can quickly and accurately be filtered out according to binary class tree as shown in Figure 2.
Wherein,
Figure 984888DEST_PATH_IMAGE006
(n=0,1,2,3)The sorted result of n-th is represented respectively.
Figure DEST_PATH_IMAGE007
(n=0,1,2,3)The feature selected by each step is represented respectively, is respectively:The textural characteristics feature that skin pixel points are accounted in the ratio characteristic of image, colour of skin block, the feature of effective colour of skin block etc.,
Figure 185057DEST_PATH_IMAGE008
(n=0,1,2,3)For the threshold value of each feature.
Figure DEST_PATH_IMAGE009
With
Figure 430224DEST_PATH_IMAGE010
Two class results are represented respectively, it is normal and doubtful.
3. the trunk positioning unit detected based on head and shoulder in Fig. 1.
For bad image filtering, want to obtain higher accuracy rate, Face Detection is basis, trunk(Part in addition to face)Positioning is crucial, if piece image can not determine the presence or absence of human body and the position of human body, has very big difficulty for classification.The present invention is after the conventional detection method of research, it is proposed that suitable three kinds of methods:Localization method based on head and shoulder detection, the localization method based on Face datection, the localization method based on ellipse fitting.The trunk localization method wherein detected based on head and shoulder has used for reference the method based on HOG features of pedestrian detection.
The technical scheme of the localization method detected based on head and shoulder is that the method training combined first by Adaboost with Linear SVM obtains the human body cascade classifier based on head and shoulder, and then carrying out sliding window to image using it detects, to realize the positioning of trunk.The speed of HOG feature extractions is improved invention also uses HOG integrograms as shown in Figure 3, accelerates the speed of grader using cascade structure as shown in Figure 4.
The method for training cascade classifier is as follows:
Training sample size is 64 × 64 pixels, using block size is defined as into 16 × 16 pixels during HOG features, and each block is equally divided into 2 × 2 totally 4 units, each pixel of unit 8 × 8, offset step is defined as 8 pixels, and 105 blocks are can obtain altogether, and each block can generate the characteristic vector of 36 dimensions.HOG characteristic vectors are extracted using the block of size variation, the block size that we define in 64 × 64 window changes in the range of 16 × 16 to 64 × 64, separately there is 1:1、1:2、2:1 three kinds of different length-width ratios, sliding step
Figure DEST_PATH_IMAGE011
Unit pixel, so defines more than 2000 block, each block is containing 2 × 2 units, the gradient orientation histogram in each 9 directions of unit correspondence altogether.Each one 36 dimension HOG characteristic vector of block correspondence, corresponding Weak Classifier is obtained using Linear SVM training.
Training algorithm is as follows:
1)Input:
Figure 196186DEST_PATH_IMAGE012
:The false drop rate that the overall situation allows;
         :The maximum false drop rate allowed in cascade device per one-level;
         :The minimum recall rate allowed per one-level;
          Pos:Positive sample collection is the image containing head and shoulder;
          Neg:Negative sample collection is the image without head and shoulder;
2)Initialization:i=0,
Figure DEST_PATH_IMAGE015
=1.0,
Figure 346950DEST_PATH_IMAGE016
=1.0。
       Loop 
Figure DEST_PATH_IMAGE017
       i=i+1;
      
Figure 395808DEST_PATH_IMAGE018
=1.0;
      Loop 
1) some Linear SVM Weak Classifiers are trained according to positive negative sample;
          2)" optimal " SVM classifier of selection is added in strong classifier, and updates weight;
          3)The recall rate of positive sample and the false drop rate of negative sample are calculated according to newest strong classifier;
          4)Adjustment threshold value is reachedIt is required that;
          5)Calculate under this threshold value
Figure 249812DEST_PATH_IMAGE018
       Loop end
      
Figure 345944DEST_PATH_IMAGE020
;
      
Figure DEST_PATH_IMAGE021
;
       Empty set Neg;
      If 
Figure 808280DEST_PATH_IMAGE017
Then assesses the false drop rate of current cascade device, and mistake point sample is added into negative sample collection;
Loop end
3)Output:Common i grades cascade device;The strong classifier being all made up of per one-level multiple SVM Weak Classifiers;
After training obtains disaggregated model, image can be detected using this model, for quickening detection speed, our detection algorithm is as follows:
Step1. size normalization is carried out to image, length-width ratio keeps constant, and our detection object is generally the higher image of resolution ratio, and not of uniform size.Therefore to accelerate detection speed, and the measurement of detection speed can be easy to by the way that image normalization is suitably sized to one, is defined as by image length and width, length-width ratio
Figure 611151DEST_PATH_IMAGE022
, image scaling ratio is defined as:Scale, definition
Figure DEST_PATH_IMAGE023
If,
Figure 687692DEST_PATH_IMAGE024
Then
Figure DEST_PATH_IMAGE025
If,
Figure 84169DEST_PATH_IMAGE026
Then
Figure DEST_PATH_IMAGE027
, new image size is
Figure 265708DEST_PATH_IMAGE028
Step2. the image level of pyramid structure is built, that is λ downscaled images by a certain percentage, as max=660, definition allows minimum human body to be 80 × 80 pixels, so the scaled down upper limit can be obtained for 64/80=0.8, human body is allowed to be 450 × 450 pixels to the maximum, it is that 0.14 diminution ratio is to reduce ratio lower limit
Figure DEST_PATH_IMAGE029
.Similarly, as max=340, diminution ratio is
Figure 126348DEST_PATH_IMAGE030
Step3. sliding window detection is carried out to the image of each level, according to the length-width ratio of imagek, image down ratio
Figure DEST_PATH_IMAGE031
Detection zone can be defined
Figure 373790DEST_PATH_IMAGE032
, such as
Figure DEST_PATH_IMAGE033
, during k=1.2, definable
Figure 319880DEST_PATH_IMAGE034
, the sliding step of sliding window can be according to different in additionk,
Figure 310970DEST_PATH_IMAGE031
It is adjusted to reduce slip number of times.
Step4. the weight that disappears of testing result, that is, return to the trunk window uniquely determined, and same head and shoulder may be detected many times, it is necessary to carry out the weight that disappears to the head and shoulder region detected.Assuming that there are some intersecting testing results, their 4 summits are averaged respectively as new summit, synthesize a testing result.But correct positioning originally can be made to produce skew in the case that this method is compact to multiple human bodies, we use the center of gravity that center of gravity analytic approach analyzes two head and shoulder regions
Figure DEST_PATH_IMAGE035
If, apart from the half of less than the two wide sums in head and shoulder region, i.e.,
Figure 88433DEST_PATH_IMAGE036
, then it is assumed that belong to same head and shoulder and merged, so until each head and shoulder only corresponds to a head and shoulder region detected.
4. Face datection localization method and ellipse fitting localization method shown in Fig. 1.
The trunk localization method of the present invention is separated progress ground, i.e., first using the method detection human body detected based on head and shoulder and position trunk, Face datection localization method and ellipse fitting localization method are used for can't detect the image containing head and shoulder.
Image for that can detect face, is directly positioned by face to trunk, passes through the position of face and the position of the aspect ratio information simple method of estimation trunk of image.Trunk size is determined according to the size of face first();Then according to its position of image length and width compared estimate.
It is not that upright human body image can find trunk using the method for ellipse fitting for can't detect face or posture, such as to Fig. 5(a)Canny rim detections are carried out first, are found profile, and fitted ellipse simultaneously using foregoing contour extraction method on edge detection results figure, are obtained Fig. 5(b)The PRELIMINARY RESULTS of ellipse fitting, according to obtaining Fig. 5 after the denoisings such as oval size, axial ratio(c)Fitting result, the precision of feature extraction can be effectively improved according to this result combination skin distribution information.Method speed based on Face datection is slightly slow but obtain is accurate location information, method speed based on ellipse fitting is quickly, it is more accurate for the positioning obtained by the image that can divide containing human body and with background, it can be described by many trunks are not oval, in this approach equally can the complicated human body of missing inspection posture, in addition, fitting it is oval some and be not belonging to human body but the false drop rate of human body can be suitably reduced by skin distribution information.
5. the second layer grader unit in Fig. 1.
Trunk is being detected using the trunk localization method detected based on head and shoulder, is detecting after human body according to the accurate careful feature of trunk information extraction and utilizes grader progress categorical filtering of the second layer based on decision tree.
1)Feature selecting:
In the case where obtaining trunk information, progress connected domain and edge analysis after colour of skin mask image are obtained, and then extracts the various features based on colour of skin mask image, the global characteristics based on colour of skin mask image of second layer feature have:
Figure 382142DEST_PATH_IMAGE001
All skin pixels account for the ratio of entire image area;
Figure 674583DEST_PATH_IMAGE002
Each colour of skin block area obtained after connected domain analysis and the ratio for accounting for entire image area;
The area of maximum independent colour of skin block accounts for the ratio of the colour of skin gross area;
Figure 101334DEST_PATH_IMAGE004
The girth of maximum colour of skin block profile and the ratio of area;
Figure 752895DEST_PATH_IMAGE005
Maximum colour of skin block area accounts for the ratio of its boundary rectangle;
According to the trunk information of acquisition, the extractible image local feature based on human body has:
Figure 735895DEST_PATH_IMAGE001
Trunk area accounts for the ratio of image area;
Figure 68787DEST_PATH_IMAGE002
Torso interior skin pixel sum accounts for the ratio of trunk area;
Colour of skin largest block accounts for the ratio of trunk area in trunk;
Figure 705622DEST_PATH_IMAGE004
Position shift ratio of the position of colour of skin largest block relative to trunk center in trunk;
The other non-features of skin colors extracted include:
Figure 910338DEST_PATH_IMAGE001
Single order color moment in trunk, is divided into top half, two kinds of the latter half color moment again;
Figure 41062DEST_PATH_IMAGE002
Canny edges points account for the ratio of colour of skin area in texture feature extraction in trunk in colour of skin block, such as block;
The above common feature majority is the feature extracted on the colour of skin mask image after skin cluster, and the filtration to bad image is more obvious, is also extracted color in trunk, textural characteristics for original image in addition.
2)Decision tree classifier:
The present invention constructs the decision tree classifier of bad image using decision tree.C4.5 is using the top-down, generalization procedure divided and rule, by calculating the information gain-ratio of each attribute, selection it is maximum as nodal community, recurrence Construction is into a decision tree.
The maximum attribute of selection information gain-ratio is used as node in the attribute selection method of decision tree first, C4.5 algorithms.Comentropy in information theory is the concept of metric amount, and a system is chaotic, and comentropy is higher, otherwise more orderly, lower, so comentropy can be measured as one of system order degree.In decision tree, information is by class tag identifier, and the equally distributed comentropy of subclass is high in data set, and subclass is more more single than being distributed, and comentropy is then relatively low.Comentropy may be defined as:
Figure 444361DEST_PATH_IMAGE038
Wherein, k is the subclass number in data set S,To belong to classification i number and the ratio of sum in data set S.Information gain is for some attribute, i.e., original data set can be divided into multiple subsets by each attribute, then information gain be exactly the difference of the comentropy of the data set before dividing and the comentropy weighted sum of data oneself after division i.e.:
Figure 578671DEST_PATH_IMAGE040
Wherein, A is certain attribute, and n is the separate index number produced by the attribute,
Figure DEST_PATH_IMAGE041
The sample number for being i for attribute A values,
Figure 270683DEST_PATH_IMAGE042
For sample sum.C4.5 employs information gain-ratio to select attribute, and ratio of profit increase introduces the node branch information, the excessive situation of punishment branch in information gain.
Figure DEST_PATH_IMAGE043
The fractionation information carried out by attribute A is represented, i.e., S is divided into n parts, distribution is intended to take larger value when n changes are big, so that ratio of profit increase diminishes.Information gain-ratio illustrates the ratio of the useful information produced by branch, illustrates that this value is bigger, and branch includes more useful informations.
3)The construction of bad image decision tree classifier:
Because the filtering of the second layer is to be directed to the bad image containing human body, therefore we have prepared 1000 bad images containing human body, the normal picture containing human body 2000 and the normal picture 2000 without human body.Because the generation target of decision tree is the maximization of overall classification accuracy, if normal picture is comprising more, decision tree can sacrifice the nicety of grading of bad image to ensure that overall nicety of grading reaches highest, in view of the bad class of our training sample of practical experience is 1 with normal class image scaled:5, normal picture containing human body is with the normal picture ratio without human body:1:1.Experiment proves that the decision tree of the training sample place generation under this ratio has stronger adaptive faculty to new samples storehouse.
If property set isFI.e. selected feature set, training sample set isS。It is using C4.5 algorithms and as follows with reference to the specific training step of Sample Storehouse:
Step1:The information gain-ratio of each attribute is calculated, information gain-ratio highest attribute is selected as root node
Figure DEST_PATH_IMAGE045
Step2:Judge whether current node needs to continue to divide according to termination rules, it is no longer necessary to which the is formationed leaf node of division forms leaf node, it is necessary to continue going in the case of Step3, three kinds for division:All samples of the first current node belong to same class, and second of property set need not continue to divide again for empty or all sample numbers of current node less than some threshold value set in advance, and the third reaches depth set in advance;
Step3:The information gain-ratio of each attribute is calculated, therefrom selects information gain-ratio highest attribute as testing attribute, if property value is continuous type, finds the segmentation threshold of the attribute;
Step4:According to the attribute of selection, current sample is divided according to each value of attribute, several subsample collection are obtained, then Step2 is performed to each subsample collection iteration;
Step5:The classification error rate of each node is calculated, beta pruning is carried out to decision tree.
Third layer grader unit in Fig. 1.Human body is positioned using the simple positioning mode based on Face datection, position and successfully then classified using the similar decision tree classifier of same second layer grader, classification results are bad and normal two kinds, the coarse positioning of human body is carried out using the positioning mode based on ellipse fitting to the image that can't detect face, is then divided into image using simple rule grader doubtful and normal two kinds.
6. the decision tree classifier of third layer
Because the face of acquisition there may be flase drop, so first having to verify it according to Face Detection, it is verified, carries out feature extraction, coarse positioning is otherwise carried out again.The feature of third layer feature selecting also has following feature in addition to the global characteristics based on colour of skin mask image that second layer grader is used:
According to the face information of acquisition, can spatial distribution characteristic position trunk.The image local feature based on human body extracted has:
Figure 344130DEST_PATH_IMAGE001
Face area accounts for the ratio of image;
Figure 773974DEST_PATH_IMAGE002
The size of face and trunk;
The ratio of largest block in face and trunk;
Trunk area accounts for the ratio of image area;
Figure 809560DEST_PATH_IMAGE005
Torso interior skin pixel sum accounts for the ratio of trunk area;
Figure 144726DEST_PATH_IMAGE046
Colour of skin largest block accounts for the ratio of trunk area in trunk;
Figure DEST_PATH_IMAGE047
Position shift ratio of the position of colour of skin largest block relative to trunk center in trunk;
The other non-features of skin colors extracted include:
Figure 811331DEST_PATH_IMAGE001
Single order color moment in trunk, is divided into top half, two kinds of the latter half color moment again;
Figure 827829DEST_PATH_IMAGE002
Canny edges points account for the ratio of colour of skin area in texture feature extraction in trunk in colour of skin block, such as block;
Using these features, and use the decision tree classifier for the decision tree training method acquisition third layer told about in upper one section.
7. the 4th layer of binary class tree
Image to can't detect head and shoulder and face, coarse positioning can only be carried out to trunk by the method for ellipse fitting, the position of human body can be determined to a certain extent with reference to the ellipse fitting method of the colour of skin, but be not excluded for the situation of flase drop, thus this layer classification results will only have it is doubtful and normal two kinds.According to the result of ellipse fitting, the 4th layer of feature also can extract following feature in addition to the extractable global characteristics based on colour of skin mask image:
Figure 325806DEST_PATH_IMAGE001
Oval area sum and image area ratio;
Figure 769557DEST_PATH_IMAGE002
The maximum oval ratio with image area;
Figure 985775DEST_PATH_IMAGE003
Maximum oval and area ratio oval around it;
Using the binary classifier of these one similar first layers of feature construction, simply the classification results of the grader of this layer are doubtful and normal two kinds.
Embodiment of the present invention has above had been described in detail, it should be understood that, there is the people of the common skill of the art for one, in the case of without departing substantially from the scope of the present invention, the purpose of the present invention can equally be reached by being changed and adjusting in above-mentioned and especially set out in the accompanying claims the scope of the present invention.

Claims (1)

1. the bad image automatic fitration method based on multilayer feature, it is characterised in that this method comprises the following steps:
Step S1:Image is pre-processed after input picture, described pretreatment includes scaling processing and the smoothing processing of image;
Step S2:Face Detection is carried out using the complexion model built based on RGB color threshold method, colour of skin mask image is obtained;
Described includes following rule based on the complexion model that RGB color threshold method is built:
Rule one, the constraint of simple component:Meet R>40 and G>55 and B>66;Wherein R represents red component, and G represents green component, and B represents blue component;
Magnitude relationship constraint between rule two, component:Meet R>G and G>B-20;
Difference constraint between rule three, component: Abs(R-G)+Abs(G-B)>20, wherein Abs represents the computing that takes absolute value;
Rule four, to suppress red color partially, meets R<2×G+10;
It is otherwise non-skin pixel for skin pixel if some pixel meets the constraint of aforementioned four rule;
Step S3:Features of skin colors, textural characteristics and the spatial distribution characteristic of image are extracted as first layer feature, is then divided into image using first layer binary class tree normal and doubtful two kinds, for normal picture, then direct output category result and is terminated;Then continued executing with for doubtful image;  
Step S4:The trunk positioning detected based on head and shoulder is carried out to the doubtful image, if positioned successfully, second layer feature is extracted, and it is normal and bad two kinds to use second layer decision tree classifier to be divided into image, output category result simultaneously terminates;If positioning is unsuccessful, step S5 is performed;
The described trunk based on head and shoulder detection positions detailed process and is:By extracting the gradient orientation histogram feature of training image, the machine learning method training combined using Adaboost algorithm and Linear SVM algorithm obtains the cascade classifier of head and shoulder, and carries out head and shoulder detection positioning trunk using cascade classifier;
Described second layer feature includes the global characteristics based on colour of skin mask image, the first kind image local feature and other non-features of skin colors based on human body, and described image local feature of the first kind based on human body accounts for that the ratio of image area, torso interior skin pixel sum account for the ratio of trunk area, colour of skin largest block accounts for position shift ratio of the position relative to trunk center of colour of skin largest block in the ratio and trunk of trunk area in trunk for trunk area;Described other non-features of skin colors are the textural characteristics in colour of skin block in single order color moment in trunk and trunk;
Step S5:Trunk is positioned to positioning unsuccessful image using method for detecting human face, if position successfully, then extraction third layer feature uses the decision tree classifier of third layer to be divided into image normal and bad two kinds, output category result simultaneously terminates;If positioning is unsuccessful, step S6 is performed;
Described third layer feature includes the global characteristics based on colour of skin mask image, image local feature and other non-features of skin colors of the Equations of The Second Kind based on human body, image local feature behaviour face product of the described Equations of The Second Kind based on human body accounts for the ratio of image, the size of face and trunk, the ratio of largest block in face and trunk, trunk area accounts for the ratio of image area, torso interior skin pixel sum accounts for the ratio of trunk area, colour of skin largest block accounts for position shift ratio of the position relative to trunk center of colour of skin largest block in the ratio and trunk of trunk area in trunk;
The decision tree classifier of described third layer, its training method is identical with second layer decision tree classifier training method;
Step S6:To positioning unsuccessful image, trunk is positioned using ellipse fitting method, the 4th layer of feature is extracted and then is divided into image using the 4th layer of binary class tree normal and doubtful two kinds, output category result simultaneously terminates;
The 4th layer of described feature includes the global characteristics based on colour of skin mask image and the feature based on ellipse fitting result;
The 4th layer of described binary class tree, its training method is identical with the training method of first layer binary class tree.
CN2011100482848A 2011-03-01 2011-03-01 Method for automatically filtering defective image based on multilayer feature Active CN102117413B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100482848A CN102117413B (en) 2011-03-01 2011-03-01 Method for automatically filtering defective image based on multilayer feature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100482848A CN102117413B (en) 2011-03-01 2011-03-01 Method for automatically filtering defective image based on multilayer feature

Publications (2)

Publication Number Publication Date
CN102117413A CN102117413A (en) 2011-07-06
CN102117413B true CN102117413B (en) 2012-11-14

Family

ID=44216174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100482848A Active CN102117413B (en) 2011-03-01 2011-03-01 Method for automatically filtering defective image based on multilayer feature

Country Status (1)

Country Link
CN (1) CN102117413B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318198B (en) * 2014-02-28 2018-03-27 郑州金惠计算机系统工程有限公司 Recognition methods and device suitable for transformer substation robot inspection
CN103986910A (en) * 2014-05-20 2014-08-13 中国科学院自动化研究所 Method and system for passenger flow statistics based on cameras with intelligent analysis function
CN105404631B (en) * 2014-09-15 2021-01-29 腾讯科技(深圳)有限公司 Picture identification method and device
CN105184244B (en) * 2015-08-28 2018-10-19 深圳英飞拓科技股份有限公司 Video human face detection method and device
CN105243356B (en) * 2015-09-10 2019-02-12 北京大学 A kind of method and device that establishing pedestrian detection model and pedestrian detection method
CN105893930A (en) * 2015-12-29 2016-08-24 乐视云计算有限公司 Video feature identification method and device
CN106446932A (en) * 2016-08-30 2017-02-22 上海交通大学 Machine learning and picture identification-based evolvable prohibited picture batch processing method
CN106874855A (en) * 2017-01-19 2017-06-20 博康智能信息技术有限公司北京海淀分公司 Head and shoulder area positioning method and device
CN107895140A (en) * 2017-10-20 2018-04-10 九次方大数据信息集团有限公司 Porny identification method based on face complexion
CN108764374B (en) * 2018-06-11 2022-07-19 杭州网易智企科技有限公司 Image classification method, system, medium, and electronic device
CN109359551A (en) * 2018-09-21 2019-02-19 深圳市璇玑实验室有限公司 A kind of nude picture detection method and system based on machine learning
CN109410184B (en) * 2018-10-09 2020-08-18 天格科技(杭州)有限公司 Live broadcast pornographic image detection method based on dense confrontation network semi-supervised learning
CN110020634B (en) * 2019-04-15 2020-05-19 刘政操 Data show board for business administration
CN110119788B (en) * 2019-05-27 2021-06-01 航美传媒集团有限公司 Intelligent identification system for electronic media advertisement playing content
CN111263066B (en) * 2020-02-18 2021-07-20 Oppo广东移动通信有限公司 Composition guiding method, composition guiding device, electronic equipment and storage medium
CN113554554A (en) * 2020-04-24 2021-10-26 京东方科技集团股份有限公司 Image color filtering method and device, electronic equipment and storage medium
CN111714105A (en) * 2020-07-24 2020-09-29 长春理工大学 Human vital sign perception system based on IPPG
CN112001334B (en) * 2020-08-27 2024-01-19 闽江学院 Portrait recognition device
CN111985425B (en) * 2020-08-27 2024-01-19 闽江学院 Image verification device under multi-person scene

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704966A (en) * 2004-05-28 2005-12-07 中国科学院计算技术研究所 Method for detecting pornographic images
CN101441717A (en) * 2007-11-21 2009-05-27 中国科学院计算技术研究所 Method and system for detecting eroticism video
CN101853377A (en) * 2010-05-13 2010-10-06 复旦大学 Method for identifying content of digital video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033654A (en) * 2006-07-28 2008-02-14 Noritsu Koki Co Ltd Photographic image discrimination method, photographic image discrimination program, and photographic image processing apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704966A (en) * 2004-05-28 2005-12-07 中国科学院计算技术研究所 Method for detecting pornographic images
CN101441717A (en) * 2007-11-21 2009-05-27 中国科学院计算技术研究所 Method and system for detecting eroticism video
CN101853377A (en) * 2010-05-13 2010-10-06 复旦大学 Method for identifying content of digital video

Also Published As

Publication number Publication date
CN102117413A (en) 2011-07-06

Similar Documents

Publication Publication Date Title
CN102117413B (en) Method for automatically filtering defective image based on multilayer feature
CN106650806B (en) A kind of cooperating type depth net model methodology for pedestrian detection
CN105512684B (en) Logo automatic identifying method based on principal component analysis convolutional neural networks
CN106778788B (en) The multiple features fusion method of aesthetic evaluation is carried out to image
CN109670528B (en) Data expansion method facing pedestrian re-identification task and based on paired sample random occlusion strategy
CN103942577B (en) Based on the personal identification method for establishing sample database and composite character certainly in video monitoring
CN105138970B (en) Classification of Polarimetric SAR Image method based on spatial information
CN107292339A (en) The unmanned plane low altitude remote sensing image high score Geomorphological Classification method of feature based fusion
CN108009509A (en) Vehicle target detection method
CN105718866B (en) A kind of detection of sensation target and recognition methods
CN104598885B (en) The detection of word label and localization method in street view image
CN104992142A (en) Pedestrian recognition method based on combination of depth learning and property learning
CN107392968B (en) The image significance detection method of Fusion of Color comparison diagram and Color-spatial distribution figure
CN104504362A (en) Face detection method based on convolutional neural network
CN103853724B (en) multimedia data classification method and device
CN108960404B (en) Image-based crowd counting method and device
CN106023257A (en) Target tracking method based on rotor UAV platform
CN103218831A (en) Video moving target classification and identification method based on outline constraint
CN105809205B (en) A kind of classification method and its system of high spectrum image
CN109543602A (en) A kind of recognition methods again of the pedestrian based on multi-view image feature decomposition
CN105427309A (en) Multiscale hierarchical processing method for extracting object-oriented high-spatial resolution remote sensing information
CN104036284A (en) Adaboost algorithm based multi-scale pedestrian detection method
CN102842032A (en) Method for recognizing pornography images on mobile Internet based on multi-mode combinational strategy
CN107180241A (en) A kind of animal classification method of the profound neutral net based on Gabor characteristic with fractal structure
CN103745197B (en) A kind of detection method of license plate and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant