WO2010037332A1 - 分类器的训练方法及装置、识别图片的方法及装置 - Google Patents

分类器的训练方法及装置、识别图片的方法及装置 Download PDF

Info

Publication number
WO2010037332A1
WO2010037332A1 PCT/CN2009/074110 CN2009074110W WO2010037332A1 WO 2010037332 A1 WO2010037332 A1 WO 2010037332A1 CN 2009074110 W CN2009074110 W CN 2009074110W WO 2010037332 A1 WO2010037332 A1 WO 2010037332A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
skin color
picture
classifier
sample set
Prior art date
Application number
PCT/CN2009/074110
Other languages
English (en)
French (fr)
Inventor
付立波
王建宇
陈波
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2010037332A1 publication Critical patent/WO2010037332A1/zh
Priority to US12/856,856 priority Critical patent/US8611644B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • G06F18/24155Bayesian classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects

Definitions

  • the present invention relates to the field of image recognition, and in particular, to a training method and device for a classifier, and a method and device for identifying a picture. Background of the invention
  • Sensitive images such as erotic images in bad information pollute the social atmosphere, endangering the physical and mental health of young people, and identifying and intercepting such sensitive images is a key task in purifying Internet content.
  • the existing skin color detection technology is mainly based on the statistical probability distribution of human skin color.
  • the widely used skin color detection method is Bayes decision method. The method counts the distribution of skin color and non-skin color on a large sample set. For a given color, the Bayes formula is used to calculate the posterior probability of the skin color based on the two distributions, depending on the probability. Whether it is a skin color area or a non-skin color area.
  • the shape characteristics of the human body area commonly used in the prior art mainly include the area ratio of the skin area to the image (the skin area refers to the area composed of all the skin pixels, and does not require continuous), and the ratio of the area of the largest skin blob to the image (the skin blob refers to the skin pixel)
  • the connected area the number of skin blobs, the area ratio of the skin blob to the circumscribed rectangle (or convex hull), the half-axis length of the equivalent ellipse of the skin blob, the eccentricity, the direction, etc., the moment invariance of the skin area, and the person The area of the face area, etc.
  • the training picture set consists of a positive sample set (composed of sensitive pictures) and a counter sample set (normal picture).
  • the features extracted on each sample set are labeled with their respective tags and then used to train the classifier.
  • the classifiers used for this problem mainly include support vector machines (SVMs), perceptron networks (MLPs), decision trees, and the like.
  • the embodiment of the invention provides a training method and device for a picture classifier, which can reduce the missed detection rate and the false detection rate of the classifier obtained by training;
  • a training method for a picture classifier comprising the steps of:
  • A dividing the training picture set used for classifier training into a positive example sample set and two or more counterexample sample sets;
  • B determining, for each counter sample set, a feature set used to distinguish the positive sample set from the counter sample set;
  • the second classifier is obtained by the determined feature set training.
  • the invention also discloses a training device for a picture classifier, comprising:
  • Training a picture set where the training picture set includes a positive sample set and two or more negative examples;
  • a feature determining module for each counter sample set, determining a feature set for distinguishing the positive sample set from the counter sample set;
  • a feature training module is configured to obtain a classifier by performing classifier training through features of the feature set.
  • the present invention classifies the counter sample set, and performs separability experiments on a large number of regional shape features for each type of counterexample sample set, and separately finds feature sets for distinguishing different counter images and sensitive images, using different
  • the feature group trains multiple classifiers, so that the missed detection rate and false detection rate of the trained classifier are greatly reduced.
  • the embodiment of the invention further provides a method and a device for recognizing a picture, which can improve the accuracy of identifying a picture.
  • a method for identifying a picture by using the above picture classifier comprising the steps of:
  • the region shape feature included in the feature group is extracted in the skin color or similar skin color region, and the image to be reviewed is identified based on the region shape feature and a classifier trained by the feature group including the region shape feature.
  • the invention also discloses a picture recognition device, comprising:
  • a skin color area mapping module configured to obtain a skin color or a similar skin color area of the picture to be reviewed
  • the shape feature identifies the picture to be reviewed according to the shape feature of the area.
  • the region shape feature in the classifier used to identify the image to be audited is a distinguishing region shape feature that is found after the separability experiment for each type of counterexample sample set, and thus various types are
  • the counter-example image can achieve better discrimination accuracy, which can improve the accuracy of sensitive image recognition.
  • FIG. 1b is a basic flowchart of training of a picture classifier according to an embodiment of the present invention
  • FIG. 1b is a detailed flowchart of training of a picture classifier according to an embodiment of the present invention
  • FIG. 2a is a diagram for identifying an image according to an embodiment of the present invention
  • FIG. 2b is a detailed flowchart of a method for identifying a picture according to an embodiment of the present invention
  • FIG. 3 is a view showing an example of a skin color test result
  • FIG. 4a is a basic structural diagram of a training device for a picture classifier according to an embodiment of the present invention
  • FIG. 4b is a detailed structural diagram of a training device for a picture classifier according to an embodiment of the present invention
  • FIG. 1 is a basic flowchart of training of a picture classifier according to an embodiment of the present invention. As shown in Figure la, the process can include the following steps:
  • step 101a the training picture set for classifier training is divided into a positive example sample set and two or more counterexample sample sets.
  • the embodiment of the present invention further subdivides the counter sample in the prior art, for example, according to the actual situation.
  • the inverse example image is subdivided into the first counterexample sample set, the second counterexample sample set, etc. according to the degree of overlap with the feature of the positive example image, and the distribution of some regional shape features of some counterexample images is further dispersed.
  • the problem is that the degree of overlap of the features of the positive and negative examples is increased.
  • Step 102a for each counterexample sample set, determines to distinguish the positive example sample set from the negative example sample. The set of features.
  • the feature sets determined in step 102a are respectively: used to distinguish the positive example sample set from the first counterexample sample set a first feature set, and a second feature set for distinguishing between the positive example sample set and the second negative example sample set, wherein each feature set includes a corresponding area shape feature.
  • the operation of determining the shape feature of the region included in each feature group may be implemented in various implementations, for example, may be set according to actual conditions in advance; or in the positive sample set and each counter sample according to the regional shape feature. The distribution of sets is determined and so on. Wherein, according to the distribution of the regional shape feature in the positive sample set and the respective negative sample set, the steps 102b to 103b in FIG. 1b can be specifically determined.
  • Step 103a obtaining a classifier by the determined feature set training.
  • the step 103a includes: obtaining a first classifier by the determined first feature set training, and obtaining a second classifier by the determined second feature set training.
  • FIG. 1b is a detailed flowchart of training of a picture classifier according to an embodiment of the present invention.
  • this embodiment takes the example of subdividing the counter sample set into the first counter sample set and the second counter sample set.
  • this embodiment can also continue to subdivide the counter sample set, and the specific operation is similar to that of FIG.
  • the divided counter sample set is mainly determined according to the principle of the overlap feature with the positive sample set.
  • the first counter sample set is usually the sample with the least overlap feature of the positive sample set.
  • the second counter sample set has overlapping features with the positive sample set more than the first negative sample set and the positive sample set.
  • the scene picture is taken as the first counterexample
  • the portrait picture is taken as the second counterexample
  • the sensitive picture is taken as a positive example.
  • other pictures may be used in this embodiment, as shown in FIG. It is merely an example and is not intended to limit the embodiments of the invention.
  • the process can include the following steps:
  • the separability experiment is first performed on the region shape feature: the region shape feature is extracted in each of the three types of sample sets (step 100b), and the extracted region shape feature is measured in the positive example sample set. And different distribution features of the first counter sample set and the second counter sample set (step 101b); and then determining the separability of the region shape feature according to the distribution feature (step 102b). According to the different separability of different regional shape features in different sample sets, the regional shape features with better separability are selected, and the regional shape features with better separability relative to the positive sample set and the first counter sample set are obtained.
  • the area shape feature having better separability with respect to the positive example sample set and the second counterexample sample set is labeled as the second feature set (step 103b); finally, the area shape of the first feature set is used.
  • the feature trains the classifier to obtain a first classifier, and the classifier is trained by the region shape feature of the second feature group to obtain a second classifier (step 104b).
  • the present embodiment proposes two sets of feature groups, and two types of classifiers are trained to perform multiple layers of the picture to be recognized. Classification can reduce the rate of false positives of the classifier.
  • Typical area shape features include, but are not limited to, the following types:
  • Skin area to image area ratio skin blob number, maximum skin Blob to image area ratio, maximum skin blob eccentricity (the eccentricity of the ellipse of the moment of inertia equal to the maximum skin Blob's moment of inertia), compactness (Blob wheel ⁇ length to Blob area ratio), near-roundness (ratio of Blob area to circumscribed area), near-rectangularity (ratio of Blob area to minimum circumscribed rectangle area);
  • the density of the edge pixel of the largest skin blob (the edge pixel refers to the point on the Canny edge line of the image), and the number of the medium and long straight line segments in the largest skin blob (the medium long straight line segment refers to the line segment containing the number of pixels greater than a certain threshold, Detected and filtered with a line detector);
  • the ratio of the face blob to the maximum skin blob, the center of gravity of the face blob is the ratio of the horizontal and vertical distances of the maximum skin blob to the height and width of the face blob.
  • At least one of the above various regional shape features may be extracted when step 100b is performed. It is worth noting that other region shape features may also be extracted for feature separability experiments.
  • step 101b there are various methods in the prior art for measuring different distribution characteristics of extracted region shape features in respective sample sets, for example, a divergence matrix based method, a distributed histogram based method, and the like.
  • a method based on a distribution histogram is used as a means of obtaining distribution features. The specific process is as follows:
  • the distribution histogram of the region shape feature in each sample set is counted. Then, the histogram is normalized, and the distribution histogram of the shape feature in the sensitive picture and the distribution histogram in the scene picture, and the distribution histogram in the sensitive picture and the distribution in the portrait picture are sequentially compared. The histogram, then the histogram intersection ratio is used to measure the distinguishability of the shape feature of the region from the positive sample set and a counter sample set. As an embodiment of the invention, the intersection ratio of the normalized distribution histograms is the area of the intersection of the two normalized distribution histograms:
  • Equation (4) is the definition of the intersection ratio
  • Equation (5) indicates that the distribution histogram H is normalized.
  • the separability of the shape feature of the region may be determined according to the intersection ratio r, and the smaller the r is, the shape feature of the region is for two sample sets, such as a positive sample and a counter sample.
  • the predetermined threshold can be determined according to the specific application, and the shape feature of the region is determined according to the intersection ratio r and the predetermined threshold based on the shape feature of a certain region. Whether the set is separable.
  • a region shape feature in the group wherein the selected region shape feature comprises at least one of:
  • step 103b when step 103b is performed, the above selected area is The domain shape feature is labeled as the first feature set.
  • the probability distribution of the face-related statistical features in the face picture class (distribution histogram) and the probability distribution in the sensitive picture class (distribution histogram) are trained Bayes classification
  • the overall recognition error rate is ⁇ 10% when identifying sensitive pictures and sensitive pictures, that is, it is separable, and the shape features can be used to distinguish sensitive pictures from portrait pictures.
  • the statistical feature related to the face is marked as the second feature set.
  • step 104b When step 104b is executed, the positive example sample set and the scene picture are used to form the first counter sample set, the first classifier is trained by the area shape feature in the first feature set, and then the sensitive sample is used to form the positive example sample set. And the portrait picture constitutes a second counterexample sample set, and the second classifier is trained by the features in the second feature set.
  • the classifiers that can be used are mainly support vector machines (SVMs), perceptron networks (MLPs), decision trees, and so on.
  • SVMs support vector machines
  • MLPs perceptron networks
  • decision trees and so on.
  • both the first classifier and the second classifier can use the naive Bayes classification:
  • the classifier assumes that the dimensions of the feature are independent of each other in the form of:
  • w ⁇ is an N-dimensional region shape feature of the first feature set
  • the counter-example sample is estimated to be obtained.
  • the training process of the Naive Bayes classifier is the process of accounting lc from the positive and negative sample sets.
  • the dimension features of (1) can be exponentially weighted: ( 3 )
  • Cj , 7 1, 2 respectively represent the positive example and the second counterexample, 3 ⁇ 4 is an N-dimensional region shape feature of the second feature set;
  • the dimension of the region shape feature of the first feature group may be the same as or different from the dimension of the region shape feature of the second feature group, the two groups of region shapes Features can be coincident or different.
  • a weighting factor determined according to the intersection ratio, and its value is greater than zero. A larger value indicates a larger weight, and a larger weighting factor can be used for a good separability feature.
  • a probability histogram may be used to represent its probability distribution, and the specific process may refer to the steps in the "differentiation experiment of features" described above.
  • the picture classifier trained by the method described above can recognize each picture.
  • the following describes a method of recognizing a picture using the picture classifier described in FIG. As shown in Figure 2a, the process includes the following steps:
  • Step 200a obtaining a skin color or a similar skin color region of the image to be reviewed
  • step 200a can be specifically referred to as 200b shown in FIG. 2b, which will not be described in detail herein.
  • Step 201a extracting a region shape feature included in the feature group in the skin color or similar skin color region, and identifying the image to be reviewed according to the region shape feature and a classifier trained by the feature group including the region shape feature.
  • the classifier obtained by the method shown in Fig. la can accurately recognize the image.
  • FIG. 2b is a detailed flowchart of identifying a picture by using the above classifier provided by the present invention.
  • a typical use of picture classifiers trained by the methods described above is for identifying sensitive pictures.
  • the embodiment is to identify the sensitive picture, and subdivide the counter sample set into the first counter sample set and the second sample sample set as shown in FIG. 1b, wherein the positive sample set is a sensitive picture, and the first counter sample is Set For the scene picture, the second counterexample sample set is a portrait picture. Referring to FIG.
  • the present invention first detects a skin color or similar skin color region of a picture to be audited by a skin color detecting technique (step 200b); and extracts a first region shape feature of the first feature group in a skin color or similar skin color region ( Step 201b), wherein the first region shape feature for distinguishing the first counter sample set and the positive sample set is first used in identifying the sensitive image, mainly because the overlap between the first counter sample set and the positive sample set is The feature is relatively small, and it is relatively easy to judge. Thus, if the judgment result in this step is YES, the current flow can be directly ended, saving resources; and the first classifier identification according to the first region shape feature and the above method is obtained.
  • the picture to be audited is a scene picture (step 202b); if yes, it is determined as a scene picture, that is, the scene picture is a normal picture with respect to the sensitive picture (step 205b), and if not, the second color is extracted in the skin color or similar skin color area a second area shape feature of the feature set (step 203b), where the extracted area is shaped for ease of description
  • the feature is recorded as a second region shape feature; according to the second region shape feature and identifying, by the second classifier, whether the image to be reviewed is a sensitive image (step 204b). If not, determining that the image is a normal image relative to the sensitive image ( Step 205b), otherwise, it is determined to be a sensitive picture (step 206b), and is handed over to the manual for further review.
  • the invention selects a set of regional shape features with better separability based on the feature separability experiment, and can achieve higher discrimination accuracy for scene pictures and sensitive pictures; and for scene pictures and portrait pictures and sensitive pictures.
  • two sets of feature groups are proposed, and two classifiers are trained respectively, and the two normal images are processed separately by the two classifiers, which greatly improves the accuracy of sensitive picture recognition.
  • the currently widely used skin color detection method is the Bayes decision method.
  • the method calculates the distribution of skin color and non-skin color on a large sample set.
  • the Bayes formula is used to calculate the posterior probability that the color is the skin color according to the two distributions, and the probability is determined according to the probability. Is it skin color or non-skin color? Taking the skin color classification of the pixel x as an example, assuming that the color of the pixel X is, the likelihood probability of X in the two classes is P( « ⁇ r
  • the Bayes decision rule 'J can be expressed as ⁇ ( ⁇ / ⁇ ) > ⁇ ( ⁇ / ⁇ ) , ie skin
  • the posterior probability in the above formula can be reduced to the likelihood probability. It can be proved that the overall risk (error rate) of the classification results obtained by the Bayes decision method is the smallest.
  • the precondition for skin color testing using this method is the overall distribution within the known class, that is, the color distribution in the skin color and non-skin color classes is counted on the large sample set.
  • the total color of the skin color detection technique is detected.
  • the skin area accounts for a large proportion of the area of the entire picture, and the automatic distinction between such pictures and sensitive pictures is also difficult. If the distinguishing shape of the area shape extracted on the detected "skin area" is not good enough, a large number of normal pictures (such as natural scene pictures, portrait pictures, etc. with similar color and skin color) are misidentified as sensitive.
  • the present invention can also use the skin color test disclosed in the applicant's application number 2008100841302, entitled “A Skin Color Detection Method and Apparatus", in the execution of the step 200b. technology.
  • the special The application provides a training method for a multi-skin probability model, and a method for detecting skin color using a multi-skin probability model.
  • the multi skin color probability model provided is a plurality of skin color probability models obtained for skin color or different types of skin color training under different illumination conditions.
  • the appropriate skin color probability model can be selected for the image to be detected, thereby reducing the false positive rate or the missed detection rate.
  • the skin color pixels in the training sample set are clustered in the color space to obtain at least one skin color chromaticity class; the candidate skin color regions in the training sample are extracted, and the chromaticity mean value and the skin color chromaticity class of the candidate skin color region are calculated.
  • the distance of the center the training samples are classified into the skin color chromaticity class with the smallest distance, and the training subset corresponding to the skin color chromaticity class is obtained; the skin color probability distribution and the non-skin color probability distribution of each training subset are counted, and each The skin color probability model corresponding to the skin color chromaticity class.
  • obtaining the skin color or similar skin color region of the image to be audited in step 200b includes: extracting a candidate skin color region of the image to be audited, and calculating a distance between the candidate skin color region mean value and the skin color class center, according to the minimum distance
  • the skin color probability model corresponding to the skin color chromaticity class performs skin color discrimination on the pixels in the image to be detected, and the pixels determined to be skin color constitute a skin color or a similar skin color region.
  • the process of classifying (identifying) the images to be reviewed using the naive Bayes classifier described above is as follows:
  • the value of ⁇ is generally 0.5, and can also be adjusted according to the risk of two types of misclassification.
  • P ⁇ IJW• A P(c 1 1 ⁇ 2 ---x N ) + P(c 2 1 x x x 2 ---x N )) in the above formula is called a confidence value, when When the confidence value is lower than the threshold, the picture to be reviewed is recognized as a scene picture. Otherwise, the picture to be reviewed is further identified by the following steps:
  • the area shape of the second feature group to be audited ( 2 ... 3 ⁇ 4 )
  • the class posterior probability ⁇ ( ⁇ ) obtained by the second classifier (the plain Bayes classifier), j l, 2, it is worth noting that
  • the dimension of the region shape feature of a feature group may be the same as or different from the dimension of the region shape feature of the second feature group.
  • the shape features of the two groups may be coincident or different, and then the Bayes decision is performed using the threshold ⁇ :
  • the value of ⁇ is generally 0.5, and can also be adjusted according to the risk of two types of misclassification.
  • the threshold value when using the first classifier for Bayes decision can be the same or different, and there is no necessary relationship.
  • the picture to be reviewed is recognized as a portrait picture; otherwise, the picture to be reviewed is recognized as a sensitive picture.
  • the present invention also provides a training device for the corresponding classifier.
  • the training device of the picture classifier disclosed by the present invention basically comprises: a training picture set 401a, as above
  • the training picture set may include a positive example sample set and two or more counter-example sample sets.
  • the counter-example sample set may specifically include a first counter-example sample set and a second counter-example sample set.
  • the feature determining module 402a determines, for each counterexample sample set, a feature set for distinguishing the positive example sample set from the counter sample set; and a feature training module 403a for performing classifier training by using the feature of the feature set Get the classifier.
  • FIG. 4b is a detailed structural diagram of a training device according to an embodiment of the present invention.
  • the device includes: a training picture set 401b, a feature determining module 402b, and a feature training module 403b, wherein the functions of the training picture set 401b, the feature determining module 402b, and the feature training module 403b are respectively associated with the training picture set 401a.
  • the functions of the feature determining module 402a and the feature training module 403a are similar, and are not described herein again.
  • the feature determining module 402b may specifically include: a feature separability decision module 4021b and features.
  • Tag module 4022b may specifically include: a feature separability decision module 4021b and features.
  • the feature separability decision module 4021b obtains the regional shape features in the positive example sample set, the first counter sample set and the second counter sample set, respectively, and measures the shape feature of the area for each region shape feature.
  • the distribution characteristics in the positive sample set, the first counter sample set, and the second counter sample set; and the separability of the regional shape feature is determined according to the distribution feature; here, the method of determining the separability can be performed by the method described above Any one of the methods is implemented, and details are not described herein again.
  • the feature tagging module 4022b marks the region shape feature having separability with respect to the first counterexample sample set as the first feature group;
  • the region shape feature with separability of the counter sample set is labeled as the second feature group.
  • the feature training module 403b is configured to obtain a first classifier through the determined first feature set training, and obtain a second classifier through the determined second feature set training.
  • the first feature set of the device may further include at least one of the first sub-feature group, the second sub-feature group, and the third sub-feature group, and each sub-feature group includes various types that can be obtained through separability experiments.
  • a well-divided regional shape feature includes at least one of the following regional shape features: the first 3 components of the skin region Hu moment, the Zemike front 4 moments of the largest skin blob, the Z22, Z40, Z42, and the maximum skin blob Fourier descriptor High frequency Component, curvature energy, near rectangle.
  • the second sub-feature group includes at least one of the following regional shape features: Z11 in the Zemike moment of the largest skin blob, and eccentricity of the largest skin blob.
  • the third sub-feature group includes at least one of the following regional shape features: maximum skin blob to image area ratio, compactness, density of edge pixels.
  • the feature separability decision module 4021b may include:
  • the distribution probability statistics module 4023b is configured to separately calculate a distribution histogram of the shape feature of the region in the positive example sample set, the first counter sample set, and the second counter sample set for each extracted shape feature;
  • the separability module 4024b is configured to normalize the distribution histogram and determine an intersection ratio of the normalized histogram; and determine the separability of the shape feature of the region according to the intersection ratio.
  • the implementation method of the training apparatus for the picture classifier shown in Fig. 4a or Fig. 4b can be implemented in the relevant manners mentioned in the training method of the classifier described above, and will not be described again. It is worth noting that the training device of the classifier in Fig. 4a or Fig. 4b is only one of the instantiation devices of the training method of the classifier, and is not the only physical device that can implement the training method of the classifier.
  • the present invention also proposes a corresponding picture recognition device.
  • the picture recognition device includes a skin color area map module 501 and a classifier 502.
  • the skin color area mapping module acquires the skin color or similar skin color area of the picture to be reviewed;
  • the classifier is configured to extract the area shape feature included in the feature group in the skin color or similar skin color area, according to the The area shape feature identifies the picture to be reviewed.
  • the embodiment of the present invention takes an example of identifying a sensitive picture.
  • the classifier includes the first a classifier 5021 and a second classifier 5022, wherein
  • the first classifier 5021 extracts, in the skin color or similar skin color region, a first region shape feature of the first feature group, where the first feature group is used to distinguish the positive example sample set from the first negative example sample set a feature set, the first counter sample set is a scene picture set; according to the first area shape feature, whether the picture to be reviewed is a scene picture, and if not, notifying the second classifier 5022;
  • the second classifier 5022 is connected to the first classifier 5021, and is configured to extract a second region shape feature of the second feature group in the skin color or similar skin color region, where the second feature group is used to distinguish the positive example sample And a feature set of the second counter sample set, wherein the positive sample set is a sensitive image set; and the second area shape feature is used to identify whether the to-be-reviewed picture is a sensitive picture.
  • the implementation method of the first classifier and the second classifier is as described in FIG. 1b above, and details are not described herein again.
  • the first classifier or the second classifier is a Bayes classifier
  • the Bayes classifier may include: a posterior probability calculation module, configured to calculate the first feature group by using the first feature set The feature vector belongs to the posterior probability of the positive example or the first counterexample; calculating, by the second feature set, the feature vector of the second feature set belongs to the posterior probability of the positive or second counterexample; and the decision module is configured according to the posterior
  • the probability is Bayesian decision to identify whether the image to be reviewed is a scene picture or a sensitive picture.
  • the skin color or similar skin color region of the image to be reviewed acquired by the skin color region image detecting module can be implemented by the Bayes decision method in the prior art, and can also be applied by the applicant described above.
  • the technical solution disclosed in the application file of No. 2008100841302 is implemented.
  • the identification device of the sensitive image may further include a module related to detecting a skin color or a similar skin color region, for example, comprising: a candidate skin color region extracting module, configured to extract a candidate skin color region image of the image to be detected; a skin color region image detecting module, a chromaticity mean for calculating the candidate skin color region, according to the color chromaticity center and the color a skin color probability model corresponding to the nearest skin color chromaticity class, the skin color discrimination is performed on the pixels in the image to be detected, and the skin color region image is formed by the pixels determined to be skin color; the skin color chromaticity class is obtained by concentrating the skin color pixels in the training sample Clustering is obtained in the color space; the skin color probability model classifies the training sample into the skin color with the smallest distance by calculating the distance between the chromaticity mean value of the candidate skin color region of each training sample and the center of the skin color chromaticity class a degree class, a training subset corresponding to the skin color

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Description

分类器的训练方法及装置、 识别图片的方法及装置
技术领域
本发明涉及图像识别领域, 尤其涉及一种分类器的训练方法及装 置、 识别图片的方法及装置。 发明背景
随着互联网信息量的日益丰富, 不良信息也越来越多。 不良信息中 的色情图片等敏感图片污染社会风气, 危害青少年的身心健康, 识别并 拦截这类敏感图片是净化互联网内容的一项关键任务。
考虑到敏感图片绝大多数都是存在大面积人体皮肤棵露的, 而检测 人体棵露皮肤相对比直接检测出敏感图片容易, 因此人体棵露皮肤检测 是达到敏感图片识别的一种有效的启发式办法。 通过人体棵露皮肤检 测, 可以检测出疑似度相当高的一类敏感图片, 然后交给人工审核, 可 以大大降低人工审核的工作量。
现有技术中存在一种基于肤色检测技术及人体区域形状特征的人 体棵露皮肤检测方法。 通过肤色检测技术检测出待审核图片的肤色或类 似肤色区域, 然后在这些区域上提取出能够区分人体皮肤区域和非人体 皮肤的背景区域的区域形状特征, 再经过一个事先训练好的分类器进行 判别。
现有的肤色检测技术主要是基于人体皮肤颜色的统计概率分布来 进行的, 目前使用比较广泛的肤色检测方法是 Bayes决策法。 该方法在 一个大样本集上统计皮肤颜色和非皮肤颜色的分布, 对一种给定的颜 色, 根据这两个分布使用 Bayes公式计算出该颜色是皮肤颜色的后验概 率, 根据概率大小决定其是肤色区域还是非肤色区域。 现有技术中常用的人体区域形状特征主要有皮肤区域与图像的面 积比 (皮肤区域指所有的皮肤像素组成的区域, 不要求连续), 最大皮 肤 Blob与图像的面积比(皮肤 Blob指皮肤像素组成的连通区域),皮肤 Blob个数, 皮肤 Blob与外接矩形 (或凸包) 面积比、 皮肤 Blob的等价 椭圆的半轴长、 离心率、 方向等, 皮肤区域的矩不变量, 以及人脸区域 面积等。
在训练图片集上提取这些区域形状特征, 训练出一个能够自动分类 出敏感图片和正常图片的分类器。 训练图片集由正例样本集(敏感图片 组成)和反例样本集 (正常图片组成), 在每个样本集上提取的特征分 别打上各自的标签, 然后用于训练分类器。 用于该问题的分类器主要有 支持向量机(SVM )、 感知器网络(MLP )、 决策树等。
由于现有技术中将各类反例图片合在一起构成反例样本集, 致使反 例图片的某些区域形状特征的分布进一步分散化, 增大了正例与反例图 片的特征重叠程度, 例如, 反例照片中的肖像图片与敏感图片的很多彼 此重叠的特征被强行标注成不同的标签, 造成训练出的分类器出现过度 拟合, 分类面发生扭曲, 使得肖像图片的误检率和敏感图片的漏检率都 会增大, 场景图片的分类结果也会受到不易预料的影响。 因此, 现有技 术训练出的分类器存在漏检率和误检率高的问题。 发明内容
本发明实施例提供了一种图片分类器的训练方法及装置, 能够使训 练得到的分类器的漏检率和误检率降低;
一种图片分类器的训练方法, 包括步骤:
A, 将用于分类器训练的训练图片集划分为正例样本集和两个以上 的反例样本集; B , 针对每一反例样本集, 确定用于区分所述正例样本集与该反例 样本集的特征组;
C, 通过确定的特征组训练获得第二分类器。
本发明还公开了一种图片分类器的训练装置, 包括:
训练图片集, 所述训练图片集包括正例样本集和两个以上的反例样 本集;
特征确定模块, 针对每一反例样本集, 确定用于区分所述正例样本 集与该反例样本集的特征组;
特征训练模块, 用于通过特征组的特征进行分类器训练获得分类 器。
本发明将反例样本集进行了分类, 针对每种类型的反例样本集对大 量的区域形状特征进行可分性实验, 分别找出了用于区分不同反例图片 与敏感图片的特征组, 使用不同的特征组训练多个分类器, 从而使的训 练出的分类器的漏检率和误检率大大降低。
本发明实施例还提供了一种识别图片的方法及装置, 能够提高识别 图片的准确率。
一种利用上述图片分类器识别图片的方法, 包括步骤:
获取待审核图片的肤色或类似肤色区域;
在所述肤色或类似肤色区域提取包含在特征组的区域形状特征, 根 据该区域形状特征和通过包含该区域形状特征的特征组训练出的分类 器识别所述待审核图片。
本发明还公开了一种图片的识别装置, 包括:
肤色区域图 测模块, 用于获取待审核图片的肤色或类似肤色区 域;
分类器, 用于在所述肤色或类似肤色区域提取包含在特征组的区域 形状特征, 根据该区域形状特征识别所述待审核图片。
本发明中, 识别待审核图片所使用的分类器中的区域形状特征是针 对每种类型的反例样本集进行可分性实验后找出的区分性较好的区域 形状特征, 因此对各种类型的反例图片能达到较好的区分精度, 从而能 够提高敏感图片识别的精确度。 附图简要说明
图 la为本发明的一实施例中图片分类器的训练基本流程图; 图 lb为本发明的一实施例中图片分类器的训练详细流程图; 图 2a为本发明的一实施例中识别图片的方法的基本流程图; 图 2b为本发明的一实施例中识别图片的方法的详细流程图; 图 3为肤色检验结果的一实例图;
图 4a为本发明一实施例中图片分类器的训练装置基本结构图; 图 4b为本发明一实施例中图片分类器的训练装置详细结构图; 图 5为本发明一实施例中识别图片的装置的原理框图。 实施本发明的方式
请参见图 la, 图 la为本发明实施例提供的图片分类器的训练基本 流程图。 如图 la所示, 该流程可包括以下步骤:
步骤 101a, 将用于分类器训练的训练图片集区分为正例样本集、 两 个以上的反例样本集。
由于现有技术中仅将训练图片集区分为正例样本集和反例样本集, 比如, 正例样本集为敏感图片, 反例样本集为除敏感图片之外的所有图 片, 这样, 就会增大敏感图片的漏检率等问题, 基于此, 本发明实施例 对现有技术中的反例样本进行了进一步的层次细分, 比如, 根据实际情 况比如根据与正例图片的特征重叠程度的大小等情况将反例图片细分 为第一反例样本集、 第二反例样本集等, 避免了一些反例图片的某些区 域形状特征的分布进一步分散化的问题, 增大了正例与反例图片的特征 重叠程度。
值得指出的是, 正例样本集的种类和各个反例样本集的种类并非有 数量限制, 还可以根据实际情况进行相应的调整。 可以看出, 本发明实 施例并非按照现有技术的操作将所有反例图片都归纳为反例图片集, 步骤 102a, 针对每一反例样本集, 确定用于区分所述正例样本集与 该反例样本集的特征组。
这里,如果步骤 101a中划分的反例样本集为第一反例样本集和第二 反例样本集,则步骤 102a中确定的特征组分别为: 用于区分所述正例样 本集与第一反例样本集的第一特征组, 和用于区分所述正例样本集与第 二反例样本集的第二特征组, 其中, 每一特征组中分别包含了对应的区 域形状特征。 这里, 确定各个特征组中包含的区域形状特征的操作在具 体实现时可有多种实现形式, 比如: 可预先根据实际情况设定; 也可根 据区域形状特征在正例样本集与各个反例样本集的分布确定等。 其中, 根据区域形状特征在正例样本集与各个反例样本集的分布确定具体可 参见图 lb中的步骤 102b至步骤 103b。
步骤 103a, 通过确定的特征组训练获得分类器。
这里,如果步骤 102a中确定的特征组分别为: 用于区分所述正例样 本集与第一反例样本集的第一特征组, 和用于区分所述正例样本集与第 二反例样本集的第二特征组,则本步骤 103a包括: 通过确定的第一特征 组训练获得第一分类器, 通过确定的第二特征组训练获得第二分类器。 其中,步骤 103a的具体描述可参见图 lb所示的详细流程中的步骤 104b。
至此, 通过上述步骤实现了本发明实施例提供的基本流程图。 为使本发明实施例提供的方法更加清楚, 下面对本发明实施例提供 的方法进行详细描述。 参见图 lb, 图 lb为本发明实施例提供的图片分 类器的训练详细流程图。 为便于叙述, 本实施例以将反例样本集细分为 第一反例样本集和第二反例样本集为例。 当然, 本实施例也可继续将反 例样本集细分, 具体操作与图 lb类似, 这里不再——举例。 本实施例 中, 划分的反例样本集主要是按照与正例样本集具有的重叠特征的多少 的原则来确定, 比如, 第一反例样本集通常为与正例样本集具有的重叠 特征最少的样本集, 第二反例样本集为与正例样本集具有的重叠特征多 于第一反例样本集与正例样本集具有的重叠特征。 本实施例中, 为了方 便叙述, 以场景图片作为第一反例, 肖像图片作为第二反例, 敏感图片 作为正例的情况进行阐述, 当然, 本实施例还可采用其他图片, 图 lb 所示的只是一种举例, 并非限定本发明实施例。 如图 lb所示, 该流程 可包括以下步骤:
当使用上述训练图片集进行分类器训练时, 首先对区域形状特征进 行可分性实验: 分别在三类样本集中提取区域形状特征(步骤 100b ), 测量所提取的区域形状特征在正例样本集、 第一反例样本集和第二反例 样本集中的不同分布特征(步骤 101b ); 然后根据分布特征确定区域形 状特征的可分性(步骤 102b )。 针对不同区域形状特征在不同的样本集 中的可分性不同, 选择可分性较好的区域形状特征, 将相对于正例样本 集与第一反例样本集具有较好可分性的区域形状特征标注为第一特征 组, 将相对于正例样本集与第二反例样本集具有较好可分性的区域形状 特征标注为第二特征组(步骤 103b ); 最后使用第一特征组的区域形状 特征来训练分类器获得第一分类器, 通过第二特征组的区域形状特征来 训练分类器获得第二分类器(步骤 104b )。
本实施例经过对区域形状特征进行可分性试验, 可以得出区分场景 图片与敏感图片的区域形状特征、 和区分肖像图片与敏感图片的区域形 状特征不同的情况, 为此, 本实施例提出了两组特征组, 训练生成两种 分类器, 对待识别图片进行多层分类, 可以降低分类器的误检率。
在执行步骤 100b 时, 为了使可分性实验的结果更加真实的反应事 实, 本发明在尽可能广泛的各种区域形状特征中提取区域形状特征。 通 常区域形状特征包含但不限于以下几种类型:
1) 区域统计特征:
皮肤区域与图像面积比, 皮肤 Blob个数, 最大皮肤 Blob与图像的 面积比, 最大皮肤 Blob的偏心率 (转动惯量与最大皮肤 Blob的转动惯 量相等的椭圆的偏心率)、 紧凑性(Blob轮虞长度与 Blob面积之比)、 近圆性(Blob面积与外接圆面积之比)、 近矩形性(Blob面积与最小外 接矩形面积之比);
2)轮廓特征:
最大皮肤 Blob的轮虞曲率的均值、 方差、 曲率能量(曲率平方的均 值)和曲率的一阶差分的能量 (曲率的一阶差分的平方的均值), 最大 皮肤 Blob的轮廓 Fourier描述子的低频分量与高频分量(低频(高频) 分量是指 Fourier描述子在最低频率点 (最高频率点 )处的取值 );
3) 矩不变量特征:
皮肤区域的 Hu矩、 Zernike矩(前 8阶), 最大皮肤 Blob的 Hu矩、 Zernike矩(前 8阶);
4) 结构元素统计特征:
最大皮肤 Blob 的边缘像素的密度(边缘像素指该点位于图像的 Canny边缘线条上)、 最大皮肤 Blob中的中长直线段的个数 (中长直线 段指包含像素数大于一定阈值的线段, 用线检测器检出并过滤);
5)人脸相关的统计特征(具体为用于检测出人脸的肖像图片): 人脸 Blob与最大皮肤 Blob的面积比,人脸 Blob的重心距离最大皮 肤 Blob的重心的水平、 垂直距离与人脸 Blob的高、 宽之比。
在本发明的一个实施例中, 执行步骤 100b 时可提取以上各类区域 形状特征中的至少一个, 值得指出的是也可以提取其他的区域形状特征 进行特征可分性实验。
对于步骤 101b,现有技术中存在多种测量所提取的区域形状特征在 各个样本集的不同分布特征的方法, 例如, 基于散度矩阵的方法、 基于 分布直方图的方法等。 在本发明的一个优选实施例中, 将基于分布直方 图的方法作为获得分布特征的途径。 具体过程如下所述:
在肤色检测的结果上(如图 3 ), 对每个区域形状特征, 统计该区域 形状特征在每个样本集中的分布直方图。 然后, 对直方图进行归一化, 依次对比该区域形状特征在敏感图片中的分布直方图与在场景图片中 的分布直方图、 以及在敏感图片中的分布直方图与在肖像图片中的分布 直方图, 之后使用直方图的相交比来衡量该区域形状特征对正例样本集 与某个反例样本集的可区分性。 作为本发明的一个实施例, 归一化分布 直方图的相交比就是两个归一化的分布直方图的相交区域的面积:
Figure imgf000010_0001
ΣΓ:1 ]:" ,2 (5) 其中, ]表示区域形状特征在第 j类样本中的分布直方图的第 个 bin的值, W是分布直方图的 bin数, = l,2代表的两类, 分别指正例与 某个反例 (例如敏感图片与场景图片、 敏感图片与肖像图片)。 式 (4)是 相交比的定义, 式 (5)表示分布直方图 H是归一化的。
对于步骤 102b,可以根据上述相交比 r确定区域形状特征的可分性, r越小, 则该区域形状特征对两种样本集比如正例样本与某个反例样本 的可区分性越强, 反之越弱, 具体实现时, 可以根据具体应用确定预定 的阈值, 根据基于某个区域形状特征的相交比 r和预定的阈值的大小确 定该区域形状特征对于各反例样本集是否具有可分性。
经过上述的特征可分性实验, 可以获知对于敏感图片与场景图片, 上述的一些区域形状特征具有不同程度的可分性, 可以从该些区域形状 特征中选取至少一个区域形状特征作为第一特征组中的区域形状特征, 其中, 选取的区域形状特征包括下述中的至少一个包括:
1)皮肤区域 Hu矩的前 3分量、 最大皮肤 Blob的 Zemike前 4阶矩 中的、 Z22、 Z40、 Z42, 最大皮肤 Blob的 Fourier描述子高频分量、 曲 率能量、 近矩形性等, 经实验数据证明, 利用这些特征分别在场景图片 类中的概率分布(分布直方图)和在敏感图片类中的概率分布(分布直 方图)训练出的 Bayes分类器在进行识别场景图片和敏感图片时总体识 别错误率在 30%左右, 相对而言, 这些特征在区分敏感图片与场景图片 时具有弱可分性;
2) 最大皮肤 Blob的 Zemike矩中的 Z11 , 最大皮肤 Blob的偏心率, 经实验数据证明, 利用这些特征分别在场景图片类中的概率分布(直方 图)和在敏感图片类中的概率分布(分布直方图)训练出的 Bayes分类 器在进行识别场景图片和敏感图片时总体识别错误率 <20%; 相对而言, 这些特征在区分敏感图片与场景图片时具有中等可分性;
3) 最大皮肤 Blob与图像面积比、 紧凑性、 边缘像素的密度, 经实 验数据证明, 利用这些特征分别在场景图片类中的概率分布(分布直方 图)和在敏感图片类中的概率分布(分布直方图)训练出的 Bayes分类 器在进行识别场景图片和敏感图片时总体识别错误率 <10%, 相对而言, 这些特征在区分敏感图片与场景图片时具有强可分性。
作为本发明的一个实施例, 在执行步骤 103b 时, 将以上选取的区 域形状特征标注为第一特征组。
对于敏感图片与一般肖像图片 (包括人脸图片):
在能检出人脸的前提下, 人脸相关的统计特征分别在人脸图片类中 的概率分布(分布直方图)和在敏感图片类中的概率分布(分布直方图) 训练出的 Bayes分类器在进行识别敏感图片和敏感图片时总体识别错误 率<10%, 即具有可分性, 利用这些区域形状特征能够区分出敏感图片与 肖像图片。 作为本发明的一个实施例, 在执行步骤 103b 时, 将该人脸 相关的统计特征标注为第二特征组。
在执行步骤 104b 时, 使用敏感图片构成正例样本集和场景图片构 成第一反例样本集, 通过第一特征组中的区域形状特征训练出第一分类 器, 然后使用敏感图片构成正例样本集和肖像图片构成第二反例样本 集, 通过第二特征组中的特征训练出第二分类器。 可以使用的分类器主 要有支持向量机(SVM )、 感知器网络(MLP )、 决策树等。 作为本发明 的一个实施例,第一分类器和第二分类器都可以使用朴素 Bayes分类: 该分类器假定特征的各维之间彼此独立, 其形式为:
P( j I … ) = \^=1 P( j I X! ); (1)
其中, c] , = i,2表示两个类别, 即分别表示正例 (敏感图片)和 第一反例 (场景图片) /第二反例 (肖像图片); 当 , = 1,2分别表示 正例和第一反例时, w ^是所述第一特征组的 N维区域形状特征; c] ,
7 = 1,2分别表示正例和第二反例时, … ¾是所述第二特征组的 N维区 域形状特征。 值得指出的是, 在本发明的各实施例中的第一特征组的区 域形状特征的维数与第二特征组的区域形状特征的维数可以相同也可 以不同, 两组区域形状特征可以有重合的也可以有不同的。 公式(1 ) 中的 表示某个区域形状特征属于类 的概率。 由 公式 ( 1 ) 可以获知一个 Ν 维的特征向量属于类 的分布概率
P(Cj \Xlx2--xN) . 公式( 1 )表明了一个假设: N维特征向量的各维对判断 该特征向量属于哪个类的作用是彼此独立的, 因此, 由式 (1)的假设, 当 已知每个 Ρ(^ Ι ,) = i,2; = l,2,〜N , 就能推断出任意一个样本(其特征是 一个 N维特征向量 ^2··· )分别属于两个类的后验概率。通过公式(2) 的 Bayes 公式, 从两类的先验概率 P(c 和第一 /第二特征组概率分布 Ρ( , Ι )推算出 ρ( | ,)。 公式(2) 中两类的先验概率 Ρ( )根据业务中 的先险知识确定, Ρ( , Ι )为正例样本集( = l )、反例样本样本集( = 2 ) 的各个区域形状特征的分布概率, 可以从正、 反例样本集中估计得到。
如上所述, 朴素 Bayes分类器的训练过程即是从正、 反例样本集统 计 lc 的过程。
另夕卜,作为对公式 (1)的进一步改进,在本发明的一个优选实施例中, 当利用公式 (1)训练第一或第二分类器时, 考虑到第一特征组中的不 同特征的可分性不同, 可以对(1) 式中各维特征进行指数加权:
Figure imgf000013_0001
(3) 当 j' = l,2分别表示正例和第一反例时, 所述第一特征 组的 N维区域形状特征; Cj , 7 = 1,2分别表示正例和第二反例时,; … ¾ 是所述第二特征组的 N维区域形状特征; 第一特征组的区域形状特征的 维数与第二特征组的区域形状特征的维数可以相同也可以不同, 两组区 域形状特征可以有重合的也可以有不同的。 是根据所述相交比确定的 指数加权因子, 其值大于零, 其值越大表示权重越大, 对可分性好的特 征可以使用较大的加权因子。 使用正例样本集和第一反例样本集估计第一特征组的区域形状特 征在两类 (正例和第一反例即敏感图片和场景图片) 中的分布7^' 1 ), 从而获得第一分类器, 使用正例样本集和第二反例样本集估计第二特征 组的区域形状特征在两类(正例和第二反例即敏感图片和肖像图片) 中 的分布 从而获得第二分类器, 同样, 作为一个实施例, 可以使 用概率直方图来表示其概率分布, 具体过程可以参照上文所述的 "特征 的可分性实验" 中的步骤。
通过上文所述的方法训练出的图片分类器可以识别出各个图片。 下 面对利用图 la所述的图片分类器识别图片的方法进行描述。 如图 2a所 示, 该流程包括以下步骤:
步骤 200a, 获取待审核图片的肤色或类似肤色区域;
这里, 步骤 200a的描述具体可参见图 2b所示的 200b, 这里不再详 述。
步骤 201a,在所述肤色或类似肤色区域提取包含在特征组的区域形 状特征, 根据该区域形状特征和通过包含该区域形状特征的特征组训练 出的分类器识别所述待审核图片。
由于图 la对反例图片进行了进一步地细分, 如此, 利用图 la所示 的方法获得的分类器能够准确识别出图片。
为便于理解, 本实施例对本发明实施例提供的利用上文的分类器对 图片进行识别的流程进行详细描述。 图 2b 为本发明提供的利用上文的 分类器对图片进行识别的详细流程图。 通常, 通过上文所述的方法训练 出的图片分类器的一个典型用途是用于识别敏感图片。 本实施例以识别 敏感图片, 并且以图 lb 中所示的将反例样本集细分为第一反例样本集 和第二范例样本集例, 其中, 正例样本集为敏感图片, 第一反例样本集 为场景图片, 第二反例样本集为肖像图片。 请结合图 lb, 参见图 2b, 本发明首先通过肤色检测技术检测出待审核图片的肤色或类似肤色区 域(步骤 200b ); 在肤色或类似肤色区域提取第一特征组的第一区域形 状特征(步骤 201b ), 其中, 这里在识别敏感图片时先利用用于区分第 一反例样本集和正例样本集的第一区域形状特征, 主要是因为由于第一 反例样本集与正例样本集具有的重叠特征比较少, 比较容易判断,如此, 若在本步骤的判断结果为是时, 则可直接结束当前流程, 节省资源; 根 据第一区域形状特征和按照上文的方法获得的第一分类器识别待审核 图片是否为场景图片 (步骤 202b ); 如果是, 则判断为场景图片, 即该 场景图片相对于敏感图片为正常图片 (步骤 205b ), 如果否, 则在肤色 或类似肤色区域提取第二特征组的第二区域形状特征(步骤 203b ), 这 里, 为便于描述, 将该提取出的区域形状特征记为第二区域形状特征; 根据第二区域形状特征和通过第二分类器进行识别待审核图片是否为 敏感图片 (步骤 204b )如果否, 则判断为该图片相对于敏感图片为正常 图片 (步骤 205b ), 否则, 判断为敏感图片 (步骤 206b ), 交给人工继 续进行进一步审核。
本发明在特征可分性实验的基础上挑选了一组可分性较好的区域 形状特征, 对场景图片和敏感图片能达到较高的区分精度; 并针对场景 图片和肖像图片与敏感图片的可区分性不同的情况, 提出了两组特征 组,分别训练出两种分类器,通过两个分类器对两种正常图片分别处理, 大大提高了敏感图片识别的准确度。
对于步骤 200b,目前使用比较广泛的肤色检测方法是 Bayes决策法。 该方法在一个大样本集上统计皮肤颜色和非皮肤颜色的分布, 对一种给 定的颜色, 根据两个分布使用 Bayes公式计算出该颜色是皮肤颜色的后 验概率, 根据概率大小决定其是皮肤色还是非皮肤色。 以对像素 x进行肤色分类为例, 假定像素 X的颜色为 , X在两类 中的似然概率为 P(«^r | ")和 P(«^r |i ") ,两类的先验概率为 和
P(skin
Figure imgf000016_0001
, 同样可以得到 x属 于非肤色的后验概率 。
Bayes 决策规贝' J 可 以表示为 Ρ( ·/ψοΖοΓ) > Ρ(ι /ψοΖοΓ) , 即 肤
Figure imgf000016_0002
通常两类先验概率假定为相等, 则上式中后验概率可筒化为似然概 率。 可以证明, 通过 Bayes决策法得到的分类结果的总体概风险(错误率) 是最小的。 使用该方法进行肤色检验的前提条件是已知类内的总体分 布, 也就是在大样本集上统计出肤色类与非肤色类中的颜色分布。
另外, 由于自然界中的非人体皮肤颜色与人体皮肤颜色总存在一定 的重叠, 且人体皮肤颜色受环境光照、 成像条件的影响而有所变化, 因 此肤色检测技术检出的 "肤色区域" 中总会不同程度的包含被误检的类 似皮肤颜色的场景区域。 另外, 大量的肖像图片中皮肤区域占整个图片 的面积比例很高, 这类图片与敏感图片的自动区分也比较困难。 如果在 检出的 "肤色区域" 上提取出的区域形状特征的区分性不够好, 就会造 成大量的正常图片(如颜色与皮肤色近似的自然场景图片、 肖像图片等) 被误判为敏感图片, 作为对上述 Bayes决策法检验肤色的一种改进, 本 发明在执行步骤 200b时还可以使用申请人在申请号为 2008100841302, 发明名称为 《一种肤色检测方法及装置》 中公开的肤色检验技术。 该专 利申请提供了多肤色概率模型的训练方法, 以及利用多肤色概率模型进 行肤色检测的方法。 与现有的单肤色概率模型不同, 其提供的多肤色概 率模型是针对不同光照条件下的肤色或不同类的肤色训练得到的多个 肤色概率模型, 因此, 在对待检测图像进行肤色检测时, 可为待检测图 像选择合适的肤色概率模型, 从而降低误检率或漏检率。 以下对该方案 中的肤色检测技术做一筒要描述, 以作参考, 其他细节请详见该申请文 件。
在进行肤色检验前, 首先将训练样本集中的肤色像素在颜色空间中 聚类得到至少一个肤色色度类; 提取训练样本中的候选肤色区域, 计算 候选肤色区域的色度均值与肤色色度类中心的距离, 将训练样本归入所 述距离最小的肤色色度类, 得到与肤色色度类对应的训练子集; 统计每 一个训练子集的肤色概率分布和非肤色概率分布, 得到每一肤色色度类 对应的肤色概率模型。
如此, 步骤 200b中获取待审核图片的肤色或类似肤色区域则包括: 提取待审核图像的候选肤色区域, 计算所述候选肤色区域色度均值与肤 色色度类中心的距离, 根据所述距离最小的肤色色度类对应的肤色概率 模型对所述待检测图像中的像素进行肤色判别, 由判别为肤色的像素构 成肤色或类似肤色区域。
在执行步骤 202b及步骤 204b时, 在一个实施例中, 使用上文所述 的朴素 Bayes分类器对待审核图片进行分类 (识别) 的过程如下:
使用上文所述的公式(1 )或(3 )计算待审核的第一特征组的区域 形状特征;^ = ( 一¾)通过第一分类器(朴素 Bayes分类器 )得到的后验 概率 7 = 1,2; 然后使用阈值 进行 Bayes决策:
Figure imgf000017_0001
τ的取值一般是 0.5, 也可以根据两类错分的风险不同进行调整。 将上式中的 P^IJW• A,)/(P(c11 χ 2 ---xN) + P(c21 xxx2 ---xN))称为置信 值, 当这个置信值低于阈值 Γ时, 将待审核图片识别为场景图片, 否则, 将待审核图片执行下述步骤进行进一步识别:
待审核的第二特征组的区域形状 = ( 2¾ )通过第二分类器(朴素 Bayes分类器)得到的类后验概率 Ρ( ^) , j = l,2,值得注意的是, 第一特征组的区域形状特征的维数与第二特征组的区域形状特征的维 数可以相同也可以不同, 两组区域形状特征可以有重合的也可以有不同 的, 然后使用阈值 ^进行 Bayes决策:
Figure imgf000018_0001
τ的取值一般也是 0.5 , 也可以根据两类错分的风险不同进行调整, 跟使用第一分类器进行 Bayes决策时的阈值 Γ可以相同也可以不同, 无 必然关系。
当上式中置信值 P( I x,x2 · · ))低于阈 值 Γ时, 将待审核图片识别为肖像图片, 否则, 将待审核图片识别为敏 感图片。
针对以上分类器的训练方法, 本发明还提出了相应的分类器的训练 装置, 请结合图 1, 参见图 4a, 本发明公开的图片分类器的训练装置基 本包括: 训练图片集 401a, 如上文所述, 训练图片集可以包括正例样本 集和两个以上的反例样本集; 优选地, 该反例样本集具体可包含第一反 例样本集和第二反例样本集。特征确定模块 402a,针对每一反例样本集, 确定用于区分所述正例样本集与该反例样本集的特征组; 和特征训练模 块 403a, 用于通过所述特征组的特征进行分类器训练获得分类器。
为使本实施例提供的训练装置更加清楚, 下面结合具体实施例对该 训练装置进行详述。
参见图 4b, 图 4b为本发明实施例提供的训练装置详细结构图。 如 图 5所示, 该装置中包括: 训练图片集 401b、 特征确定模块 402b和特 征训练模块 403b, 其中, 训练图片集 401b、 特征确定模块 402b和特征 训练模块 403b的功能分别与训练图片集 401a、特征确定模块 402a和特 征训练模块 403a的功能类似, 这里不再赘述。
优选地, 当训练图片集 401包含的反例样本集为第一反例样本集和 第二反例样本集时, 如图 4b所示, 特征确定模块 402b具体可包括: 特 征可分性判决模块 4021b和特征标记模块 4022b。
以下阐述各模块的工作原理: 特征可分性判决模块 4021b分别在正 例样本集、 第一反例样本集和第二反例样本集中获取区域形状特征, 针 对每一区域形状特征, 测量该区域形状特征在正例样本集、 第一反例样 本集和第二反例样本集中的分布特征; 并根据分布特征确定区域形状特 征的可分性; 这里, 确定可分性的途径可通过上文所述的方法中任意一 种方式实现, 在此不再赘述。
特征标记模块 4022b, 根据特征可分性判决模块 4021b的可分性实 验结果, 将相对于第一反例样本集具有可分性的区域形状特征标注为第 一特征组; 将相对于所述第二反例样本集具有可分性的区域形状特征标 注为第二特征组。 如此, 特征训练模块 403b, 用于通过确定的第一特征 组训练获得第一分类器, 通过确定的第二特征组训练获得第二分类器。
另外, 该装置的第一特征组还可以包括第一子特征组、 第二子特征 组、 第三子特征组中的至少一个, 各子特征组包含经过可分性实验得出 的各种可分性较好的区域形状特征。 例如第一子特征组包括至少一项以 下区域形状特征:皮肤区域 Hu矩的前 3个分量、最大皮肤 Blob的 Zemike 前 4阶矩中的、 Z22、 Z40、 Z42, 最大皮肤 Blob的 Fourier描述子高频 分量、 曲率能量、 近矩形性。 第二子特征组包括至少一项以下区域形状 特征: 最大皮肤 Blob的 Zemike矩中的 Z11 , 最大皮肤 Blob的偏心率。 第三子特征组包括至少一项以下区域形状特征:最大皮肤 Blob与图像面 积比、 紧凑性、 边缘像素的密度。
作为本发明的一个实施例,如图 4b所示,特征可分性判决模块 4021b 可以包括:
分布概率统计模块 4023b, 用于针对提取出的每一区域形状特征, 分别统计该区域形状特征在所述正例样本集、 第一反例样本集和第二反 例样本集中的分布直方图;
可分性模块 4024b, 用于对所述分布直方图进行归一化, 并确定归 一化后的直方图的相交比; 根据所述相交比确定所述区域形状特征的可 分性。
对于图 4a或者图 4b所示的图片分类器的训练装置的实现方法可以 按照上文所述的分类器的训练方法中提到的各有关方式实现, 再次不再 赘述。 值得指出的是, 图 4a或者图 4b中的分类器的训练装置仅仅为分 类器的训练方法的其中一个实例化装置, 而并非可实现该分类器的训练 方法的唯一实体装置。
针对以上图片的识别方法, 本发明还提出了相应的图片的识别装 置, 请结合图 2, 参见图 5 , 图片的识别装置包括肤色区域图 测模 块 501和分类器 502。
以下阐述该图片的识别装置的工作原理: 肤色区域图 测模块获 取待审核图片的肤色或类似肤色区域; 分类器用于在所述肤色或类似肤 色区域提取包含在特征组的区域形状特征, 根据该区域形状特征识别所 述待审核图片。
本发明实施例以识别敏感图片为例。 如图 5所示, 分类器包括第一 分类器 5021和第二分类器 5022, 其中,
第一分类器 5021 ,在所述肤色或类似肤色区域提取第一特征组的第 一区域形状特征, 所述第一特征组为用于区分所述正例样本集与所述第 一反例样本集的特征组, 所述第一反例样本集为场景图片集; 根据所述 第一区域形状特征识别所述待审核图片是否为场景图片, 如果否, 则通 知第二分类器 5022;
第二分类器 5022与第一分类器 5021连接, 用于在所述肤色或类似 肤色区域提取第二特征组的第二区域形状特征, 所述第二特征组为用于 区分所述正例样本集与所述第二反例样本集的特征组, 所述正例样本集 为敏感图片集; 根据第二区域形状特征识别所述待审核图片是否为敏感 图片。 这里的第一分类器与第二分类器的实现方法如上文图 lb所述, 在此不再赘述。
作为本发明的一个实施例, 第一分类器或第二分类器为 Bayes分类 器, 该 Bayes分类器可以包括: 后验概率计算模块, 用于通过第一特征 组计算所述第一特征组的特征向量属于正例或第一反例的后验概率; 通 过第二特征组计算所述第二特征组的特征向量属于正例或第二反例的 后验概率; 以及决策模块, 用于根据后验概率进行 Bayes决策, 识别待 审核图片是否为场景图片或敏感图片。
另外, 值得指出的是, 对于肤色区域图像检测模块所获取的待审核 图片的肤色或类似肤色区域,可以通过现有技术中的 Bayes决策法实现, 还可以通过上文所述的申请人在申请号为 2008100841302的申请文件中 公开的技术方案实现。 敏感图片的识别装置还可以包括各个与检测肤色 或类似肤色区域有关的模块, 例如, 包含: 候选肤色区域提取模块, 用 于提取所述待检测图像的候选肤色区域图像; 肤色区域图像检测模块, 用于计算所述候选肤色区域的色度均值, 根据肤色色度类中心与所述色 度均值最近的肤色色度类对应的肤色概率模型, 对所述待检测图像中的 像素进行肤色判别, 由判别为肤色的像素构成肤色区域图像; 肤色色度 类通过将训练样本集中的肤色像素在颜色空间中聚类得到; 所述肤色概 率模型通过计算每一训练样本的候选肤色区域的色度均值与所述肤色 色度类中心的距离, 将训练样本归入所述距离最小的肤色色度类, 得到 与肤色色度类对应的训练子集, 统计每一个训练子集的肤色概率分布和 非肤色概率分布得到; 如此, 肤色区域图像检测模块 501提取待审核图 像的候选肤色区域, 计算所述候选肤色区域色度均值与肤色色度类中心 的距离, 根据所述距离最小的肤色色度类对应的肤色概率模型对所述待 检测图像中的像素进行肤色判别, 由判别为肤色的像素构成肤色或类似 肤色区域。
以上所述的本发明实施方式, 并不构成对本发明保护范围的限定。 任何在本发明的精神和原则之内所作的修改、 等同替换和改进等, 均应 包含在本发明的权利要求保护范围之内。

Claims

权利要求书
1、 一种图片分类器的训练方法, 其特征在于, 包括步骤:
A, 将用于分类器训练的训练图片集划分为正例样本集、 两个以上 的反例样本集;
B , 针对每一反例样本集, 确定用于区分所述正例样本集与该反例 样本集的特征组;
C, 通过确定的特征组训练获得分类器。
2、 根据权利要求 1 所述的图片分类器的训练方法, 其特征在于, 当步骤 A中划分的反例样本集为第一反例样本集和第二反例样本集时, 所述步骤 B包括:
B1 , 分别在正例样本集、 第一反例样本集和第二反例样本集中提取 出区域形状特征;
B2, 针对提取出的每一区域形状特征, 测量提取出的区域形状特征 在正例样本集、 第一反例样本集和第二反例样本集中的分布特征, 根据 所述分布特征确定该区域形状特征的可分性;
B3 ,根据确定的可分性确定用于区分所述正例样本集与所述第一反 例样本集的第一特征组和用于区分所述正例样本集与所述第二反例样 本集的第二特征组;
所述步骤 C包括: 通过确定的第一特征组训练获得第一分类器, 通 过确定的第二特征组训练获得第二分类器。
3、 根据权利要求 2所述的图片分类器的训练方法, 其特征在于, 所述第一特征组包括:
皮肤区域 Hu矩的前 3个分量, 最大皮肤 Blob的 Zemike前 4阶矩 中的 Z22、 Z40、 Z42, 以及最大皮肤 Blob的 Fourier描述子高频分量、 曲率能量、 近矩形性中的至少一个; 或者
最大皮肤 Blob的 Zernike矩中的 Zll、最大皮肤 Blob的偏心率中的 至少一个; 或者
最大皮肤 Blob与图像面积比、 紧凑性、边缘像素的密度中的至少一 个。
4、根据权利要求 2所述的图片分类器的训练方法,其特征在于: 所 述步骤 B2包括:
针对提取出的每一区域形状特征, 分别统计该区域形状特征在所述 正例样本集、 第一反例样本集和第二反例样本集中的分布直方图; 对所述分布直方图进行归一化, 并确定归一化后的直方图的相交 比;
根据所述相交比确定所述区域形状特征的可分性。
5、 根据权利要求 2所述的图片分类器的训练方法, 其特征在于: 所述第一分类器或第二分类器为 Bayes分类器, 所述 Bayes分类器的形 式为: p(cj I ¾¾···½) = Πιρ( · I !·) . (i)
P(c \χ) = 、 、 ' L
1 1 Pic^Pix^c^ + Pic^Pix^c,) ? 7=1,2 (2) 其中, Cj, = 1,2分别表示正例和第一反例时, w ^是所述第一 特征组的 N维区域形状特征向量, P(Cj I Λ · · · ¾ )为所述第一特征组的的 特征向量 ν ·· ^属于正例或第一反例的后验概率; c] , = i,2分别表示 正例和第二反例时, · · · χΝ是所述第二特征组的 N维区域形状特征向 量, Pi I ; ¾… ¾ )为第二特征组的特征向量 1 … ¾属于正例或第二反例 的后验概率; p(c 为正例或第一反例或第二反例的先验概率; P(Cj ,)表 示所述区域形状特征向量的各维属于类 C]的概率; P(Xi I )为所述区域形 状特征向量的各维在正例或第一 /第二反例中的概率分布;
通过在所述正例样本集和第一 /第二反例样本集上估计所述先验概 率 P(c 和统计第一 /第二特征组的区域形状特征向量的各维在正例或第 一 /第二反例中的概率分布 , 得到第一或第二分类器。
6、 根据权利要求 2所述的图片分类器的训练方法, 其特征在于: 所述第一分类器或第二分类器为 Bayes分类器, 所述 Bayes分类器的形 式为:
Figure imgf000025_0001
(3)
P(c.)P{x. \c ) ,
P(ci \xi) = J ' 3 , 7=1,2 (〜2)
1 Pic^Pix^c^ + Pic^Pix^c,) 其中, Cj , = 1,2分别表示正例和第一反例时, w ^是所述第一 特征组的 N维区域形状特征向量, P(c j I 1 · · · ¾ )为所述第一特征组的特 征向量 ν ··^属于正例或第一反例的后验概率; c] , = i,2分别表示正 例和第二反例时, 1 · · · χΝ是所述第二特征组的 N维区域形状特征向量,
P(Cj I … ¾ )为第二特征组的特征向量 1¾属于正例或第二反例的 后验概率; P(C 为正例或第一反例或第二反例的先验概率; P(C l ,)表示 所述区域形状特征向量的各维属于类 的概率; 为所述区域形状 特征向量的各维在正例或第一 /第二反例中的概率分布; 是根据所述 相交比确定的指数加权因子, 大于零;
通过在所述正例样本集和第一 /第二反例样本集上估计所述先验概 率 P(Cj)和统计第一 /第二特征组的区域形状特征向量的各维在正例或第 一 /第二反例中的概率分布 , 得到第一或第二分类器。
7、 一种利用权利要求 1至 6任一项所述的图片分类器识别图片的 方法, 其特征在于, 包括步骤:
A, 获取待审核图片的肤色或类似肤色区域;
B,在所述肤色或类似肤色区域提取包含在特征组的区域形状特征, 根据该区域形状特征和通过包含该区域形状特征的特征组训练出的分 类器识别所述待审核图片。
8、 根据权利要求 7 所述的利用图片分类器识别图片的方法, 其特 征在于, 所述步骤 B包括:
B 1 ,在所述肤色或类似肤色区域提取第一特征组的第一区域形状特 征, 所述第一特征组为用于区分所述正例样本集与所述第一反例样本集 的特征组, 所述第一反例样本集为场景图片集; 根据所述第一区域形状 特征和通过第一特征组训练出的第一分类器识别所述待审核图片是否 为场景图片, 如果不是, 执行步骤 B2;
B2,在所述肤色或类似肤色区域提取第二特征组的第二区域形状特 征, 所述第二特征组为用于区分所述正例样本集与所述第二反例样本集 的特征组, 所述正例样本集为敏感图片集; 根据第二区域形状特征和通 过第一特征组训练出的第二分类器识别所述待审核图片是否为敏感图 片。
9、 根据权利要求 8 所述的利用图片分类器识别图片的方法, 其特 征在于, 所述获取待审核图片的肤色或类似肤色区域之前还包括步骤: 将训练样本集中的肤色像素在颜色空间中聚类得到至少一个肤色 色度类;
提取训练样本中的候选肤色区域, 计算候选肤色区域的色度均值与 肤色色度类中心的距离, 将训练样本归入所述距萬最小的肤色色度类, 得到与肤色色度类对应的训练子集; 统计每一个训练子集的肤色概率分布和非肤色概率分布, 得到每一 肤色色度类对应的肤色概率模型;
所述获取待审核图片的肤色或类似肤色区域的步骤包括: 提取待审核图像的候选肤色区域, 计算所述候选肤色区域色度均值 与肤色色度类中心的距离, 根据所述距离最小的肤色色度类对应的肤色 概率模型对所述待检测图像中的像素进行肤色判别, 由判别为肤色的像 素构成肤色或类似肤色区域。
10、 根据权利要求 8所述的利用图片分类器识别图片的方法, 其特 征在于, 所述根据第一区域形状特征和第一分类器识别待审核图片是否 为场景图片包括:
计算第一区域形状特征通过第一分类器得到的后验概率
Figure imgf000027_0001
, 其中, j = 1,2 , 分别表示正例和第一反例;
判断得到的 P(cl I χχχ2 · · · xN)/(P(cl \xxx2---xN) + P(c21 xxx2 ···¾))是否氏于预 设的阈值 T, 如果是, 确定待审核图片为场景图片; 否则, 确定待审核 图片不为场景图片;
所述根据第二区域形状特征和第二分类器识别待审核图片是否为 敏感图片包括:
计算第二区域形状特征通过第二分类器得到的后验概率 J^ W'XN) , 其中, j' = 1,2, 分别表示正例和第二反例;
判断得到的 P(cl I χχχ2 · · · xN)/(P(cl \xxx2---xN) + P(c21 xxx2 ···¾))是否氏于预 设的阈值 T, 如果是, 确定待审核图片不为敏感图片; 否则, 确定待审 核图片为敏感图片。
11、 一种图片分类器的训练装置, 其特征在于, 包括:
训练图片集, 所述训练图片集包括正例样本集和两个以上的反例样 本集;
特征确定模块, 针对每一反例样本集, 确定用于区分所述正例样本 集与该反例样本集的特征组;
特征训练模块, 用于通过所述特征组的特征进行分类器训练获得分 类器。
12、 根据权利要求 11所述的图片分类器的训练装置, 其特征在于, 当所述训练图片集包含的反例样本集为第一反例样本集和第二反例样 本集时, 所述特征确定模块包括:
特征可分性判决模块, 分别在正例样本集、 第一反例样本集和第二 反例样本集中提取出区域形状特征, 针对每一区域形状特征, 测量该区 域形状特征在所述正例样本集、 第一反例样本集和第二反例样本集中的 特征标记模块, 用于将相对于所述第一反例样本集具有可分性的区 域形状特征标注为第一特征组; 将相对于所述第二反例样本集具有可分 性的区域形状特征标注为第二特征组;
所述特征训练模块, 用于通过确定的第一特征组训练获得第一分类 器, 通过确定的第二特征组训练获得第二分类器。
13、 根据权利要求 12所述的图片分类器的训练装置, 其特征在于, 所述第一特征组包括:
皮肤区域 Hu矩的前 3个分量, 最大皮肤 Blob的 Zemike前 4阶矩 中的 Z22、 Z40、 Z42, 以及最大皮肤 Blob的 Fourier描述子高频分量、 曲率能量、 近矩形性中的至少一个; 或者
最大皮肤 Blob的 Zemike矩中的 Z11、最大皮肤 Blob的偏心率中的 至少一个; 或者
最大皮肤 Blob与图像面积比、 紧凑性、边缘像素的密度中的至少一 个。
14、 根据权利要求 12所述的图片分类器的训练装置, 其特征在于, 所述特征可分性判决模块包括:
分布概率统计模块, 用于针对提取出的每一区域形状特征, 分别统 计所述区域形状特征在所述正例样本集、 第一反例样本集和第二反例样 本集中的分布直方图;
可分性模块, 用于对所述分布直方图进行归一化, 并确定归一化后 的直方图的相交比; 根据所述相交比确定所述区域形状特征的可分性。
15、 一种图片的识别装置, 其特征在于, 该装置包括:
肤色区域图 测模块, 用于获取待审核图片的肤色或类似肤色区 域;
分类器, 用于在所述肤色或类似肤色区域提取包含在特征组的区域 形状特征, 根据该区域形状特征识别所述待审核图片。
16、 根据权利要求 15 所述的图片的识别装置, 其特征在于, 所述 分类器包括: 第一分类器和第二分类器; 其中,
第一分类器, 在所述肤色或类似肤色区域提取第一特征组的第一区 域形状特征, 所述第一特征组为用于区分所述正例样本集与所述第一反 例样本集的特征组, 所述第一反例样本集为场景图片集; 根据所述第一 区域形状特征识别所述待审核图片是否为场景图片, 如果否, 则通知所 述第二分类器;
第二分类器, 与所述第一分类器连接, 用于在所述肤色或类似肤色 区域提取第二特征组的第二区域形状特征, 所述第二特征组为用于区分 所述正例样本集与所述第二反例样本集的特征组, 所述正例样本集为敏 感图片集; 根据第二区域形状特征识别所述待审核图片是否为敏感图 片。
17、 根据权利要求 15 所述的图片的识别装置, 其特征在于, 该装 置还包括:
候选肤色区域提耳 ^莫块, 用于提取所述待检测图像的候选肤色区域 图像;
所述肤色区域图像检测模块, 用于计算所述候选肤色区域的色度均 值, 根据肤色色度类中心与所述色度均值最近的肤色色度类对应的肤色 概率模型, 对所述待检测图像中的像素进行肤色判别, 由判别为肤色的 像素构成肤色区域图像;
所述肤色色度类, 通过将训练样本集中的肤色像素在颜色空间中聚 类得到;
所述肤色概率模型, 通过计算每一训练样本的候选肤色区域的色度 均值与所述肤色色度类中心的距离, 将训练样本归入所述距离最小的肤 色色度类, 得到与肤色色度类对应的训练子集, 统计每一个训练子集的 肤色概率分布和非肤色概率分布得到;
所述肤色区域图 测模块提取待审核图像的候选肤色区域, 计算 所述候选肤色区域色度均值与肤色色度类中心的距离, 根据所述距离最 小的肤色色度类对应的肤色概率模型对所述待检测图像中的像素进行 肤色判别, 由判别为肤色的像素构成肤色或类似肤色区域。
18、 根据权利要求 16所述的图片的识别装置, 其特征在于, 所述 第一分类器或第二分类器为 Bayes分类器, 所述 Bayes分类器包括: 后验概率计算模块, 用于通过所述第一特征组计算所述第一特征组 的特征向量属于正例或第一反例的后验概率; 通过所述第二特征组计算 所述第二特征组的特征向量属于正例或第二反例的后验概率;
决策模块, 用于根据所述后验概率进行 Bayes决策, 识别所述待审 核图片是否为场景图片或敏感图片。
PCT/CN2009/074110 2008-09-26 2009-09-22 分类器的训练方法及装置、识别图片的方法及装置 WO2010037332A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/856,856 US8611644B2 (en) 2008-09-26 2010-08-16 Method and apparatus for training classifier, method and apparatus for image recognition

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810198788.6 2008-09-26
CN2008101987886A CN101359372B (zh) 2008-09-26 2008-09-26 分类器的训练方法及装置、识别敏感图片的方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/856,856 Continuation US8611644B2 (en) 2008-09-26 2010-08-16 Method and apparatus for training classifier, method and apparatus for image recognition

Publications (1)

Publication Number Publication Date
WO2010037332A1 true WO2010037332A1 (zh) 2010-04-08

Family

ID=40331818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/074110 WO2010037332A1 (zh) 2008-09-26 2009-09-22 分类器的训练方法及装置、识别图片的方法及装置

Country Status (3)

Country Link
US (1) US8611644B2 (zh)
CN (1) CN101359372B (zh)
WO (1) WO2010037332A1 (zh)

Families Citing this family (49)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8995715B2 (en) * 2010-10-26 2015-03-31 Fotonation Limited Face or other object detection including template matching
US8335404B2 (en) * 2007-07-20 2012-12-18 Vision Louis Winter Dynamically varying classified image display system
CN101359372B (zh) * 2008-09-26 2011-05-11 腾讯科技(深圳)有限公司 分类器的训练方法及装置、识别敏感图片的方法及装置
JP5521881B2 (ja) * 2010-08-12 2014-06-18 富士ゼロックス株式会社 画像識別情報付与プログラム及び画像識別情報付与装置
CN102270303B (zh) * 2011-07-27 2013-06-05 重庆大学 敏感图像的联合检测方法
CN103093180B (zh) * 2011-10-28 2016-06-29 阿里巴巴集团控股有限公司 一种色情图像侦测的方法和系统
US8565486B2 (en) * 2012-01-05 2013-10-22 Gentex Corporation Bayesian classifier system using a non-linear probability function and method thereof
US9361377B1 (en) * 2012-01-06 2016-06-07 Amazon Technologies, Inc. Classifier for classifying digital items
CN102590052B (zh) * 2012-02-28 2014-06-11 清华大学 液体内异物微粒粒径标定方法
CN102842032B (zh) * 2012-07-18 2015-07-22 郑州金惠计算机系统工程有限公司 基于多模式组合策略的移动互联网色情图像识别方法
CN105164700B (zh) 2012-10-11 2019-12-24 开文公司 使用概率模型在视觉数据中检测对象
US9230383B2 (en) * 2012-12-28 2016-01-05 Konica Minolta Laboratory U.S.A., Inc. Document image compression method and its application in document authentication
US9305208B2 (en) * 2013-01-11 2016-04-05 Blue Coat Systems, Inc. System and method for recognizing offensive images
US9355406B2 (en) * 2013-07-18 2016-05-31 GumGum, Inc. Systems and methods for determining image safety
CN103413145B (zh) * 2013-08-23 2016-09-21 南京理工大学 基于深度图像的关节点定位方法
KR20150051711A (ko) * 2013-11-05 2015-05-13 한국전자통신연구원 유해 콘텐츠 영상 차단을 위한 피부 영역 추출 장치 및 방법
KR20150092546A (ko) * 2014-02-05 2015-08-13 한국전자통신연구원 무해 프레임 필터 및 이를 포함하는 유해 영상 차단 장치, 무해 프레임을 필터링하는 방법
JP2016057918A (ja) * 2014-09-10 2016-04-21 キヤノン株式会社 画像処理装置、画像処理方法及びプログラム
US9684831B2 (en) * 2015-02-18 2017-06-20 Qualcomm Incorporated Adaptive edge-like feature selection during object detection
EP3268870A4 (en) * 2015-03-11 2018-12-05 Ayasdi, Inc. Systems and methods for predicting outcomes using a prediction learning model
CN105095911B (zh) 2015-07-31 2019-02-12 小米科技有限责任公司 敏感图片识别方法、装置以及服务器
CN105354589A (zh) * 2015-10-08 2016-02-24 成都唐源电气有限责任公司 一种在接触网图像中智能识别绝缘子裂损的方法及系统
CN105488502B (zh) * 2015-11-27 2018-12-21 北京航空航天大学 目标检测方法与装置
CN107291737B (zh) * 2016-04-01 2019-05-14 腾讯科技(深圳)有限公司 敏感图像识别方法及装置
US10795926B1 (en) * 2016-04-22 2020-10-06 Google Llc Suppressing personally objectionable content in search results
CN106650780B (zh) * 2016-10-18 2021-02-12 腾讯科技(深圳)有限公司 数据处理方法及装置、分类器训练方法及系统
US10110868B2 (en) * 2016-12-22 2018-10-23 Aestatix LLC Image processing to determine center of balance in a digital image
CN108460319B (zh) * 2017-02-22 2021-04-20 浙江宇视科技有限公司 异常人脸检测方法及装置
CN107197331B (zh) * 2017-05-03 2020-01-31 北京奇艺世纪科技有限公司 一种实时监测直播内容的方法及装置
CN107194419A (zh) * 2017-05-10 2017-09-22 百度在线网络技术(北京)有限公司 视频分类方法及装置、计算机设备与可读介质
WO2019027451A1 (en) * 2017-08-02 2019-02-07 Hewlett-Packard Development Company, L.P. TRAINING CLASSIFIER TO REDUCE ERROR RATE
CN107729924B (zh) * 2017-09-25 2019-02-19 平安科技(深圳)有限公司 图片复审概率区间生成方法及图片复审判定方法
US20190114673A1 (en) * 2017-10-18 2019-04-18 AdobeInc. Digital experience targeting using bayesian approach
US11694093B2 (en) * 2018-03-14 2023-07-04 Adobe Inc. Generation of training data to train a classifier to identify distinct physical user devices in a cross-device context
CN109034169B (zh) * 2018-06-29 2021-02-26 广州雅特智能科技有限公司 智能食物容器识别方法、装置、系统和存储介质
CN109586950B (zh) * 2018-10-18 2022-08-16 锐捷网络股份有限公司 网络场景识别方法、网络管理设备、系统及存储介质
CN111292285B (zh) * 2018-11-21 2023-04-07 中南大学 一种基于朴素贝叶斯与支持向量机的糖网病自动筛查方法
CN109902578B (zh) * 2019-01-25 2021-01-08 南京理工大学 一种红外目标检测与跟踪方法
CN109740018B (zh) * 2019-01-29 2021-03-02 北京字节跳动网络技术有限公司 用于生成视频标签模型的方法和装置
CN110222791B (zh) * 2019-06-20 2020-12-04 杭州睿琪软件有限公司 样本标注信息的审核方法及装置
CN112819020A (zh) * 2019-11-15 2021-05-18 富士通株式会社 训练分类模型的方法和装置及分类方法
CN110909224B (zh) * 2019-11-22 2022-06-10 浙江大学 一种基于人工智能的敏感数据自动分类识别方法及系统
CN111047336A (zh) * 2019-12-24 2020-04-21 太平金融科技服务(上海)有限公司 用户标签推送、用户标签展示方法、装置和计算机设备
CN111178442B (zh) * 2019-12-31 2023-05-12 北京容联易通信息技术有限公司 一种提高算法精度的业务实现方法
CN111639665B (zh) * 2020-04-08 2024-05-14 浙江科技学院 一种汽车换挡面板图像自动分类方法
WO2021237570A1 (zh) * 2020-05-28 2021-12-02 深圳市欢太科技有限公司 影像审核方法及装置、设备、存储介质
CN111639718B (zh) * 2020-06-05 2023-06-23 中国银行股份有限公司 分类器应用方法及装置
CN112686047B (zh) * 2021-01-21 2024-03-29 北京云上曲率科技有限公司 一种基于命名实体识别的敏感文本识别方法、装置、系统
CN116244738B (zh) * 2022-12-30 2024-05-28 浙江御安信息技术有限公司 一种基于图神经网络的敏感信息检测方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178773A (zh) * 2007-12-13 2008-05-14 北京中星微电子有限公司 基于特征提取和分类器的图像识别系统及方法
CN100412888C (zh) * 2006-04-10 2008-08-20 中国科学院自动化研究所 基于内容的敏感网页识别方法
CN101359372A (zh) * 2008-09-26 2009-02-04 腾讯科技(深圳)有限公司 分类器的训练方法及装置、识别敏感图片的方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1323370C (zh) 2004-05-28 2007-06-27 中国科学院计算技术研究所 一种色情图像检测方法
CN101251898B (zh) 2008-03-25 2010-09-15 腾讯科技(深圳)有限公司 一种肤色检测方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100412888C (zh) * 2006-04-10 2008-08-20 中国科学院自动化研究所 基于内容的敏感网页识别方法
CN101178773A (zh) * 2007-12-13 2008-05-14 北京中星微电子有限公司 基于特征提取和分类器的图像识别系统及方法
CN101359372A (zh) * 2008-09-26 2009-02-04 腾讯科技(深圳)有限公司 分类器的训练方法及装置、识别敏感图片的方法及装置

Also Published As

Publication number Publication date
US20100310158A1 (en) 2010-12-09
CN101359372A (zh) 2009-02-04
US8611644B2 (en) 2013-12-17
CN101359372B (zh) 2011-05-11

Similar Documents

Publication Publication Date Title
WO2010037332A1 (zh) 分类器的训练方法及装置、识别图片的方法及装置
CN110348319B (zh) 一种基于人脸深度信息和边缘图像融合的人脸防伪方法
CN100592322C (zh) 照片人脸与活体人脸的计算机自动鉴别方法
US8379961B2 (en) Mitotic figure detector and counter system and method for detecting and counting mitotic figures
WO2018072233A1 (zh) 一种基于选择性搜索算法的车标检测识别方法及系统
WO2017190574A1 (zh) 一种基于聚合通道特征的快速行人检测方法
CN106650669A (zh) 一种鉴别仿冒照片欺骗的人脸识别方法
CN109101871A (zh) 一种基于深度和近红外信息的活体检测装置、检测方法及其应用
CN104036278B (zh) 人脸算法标准脸部图像的提取方法
Dlagnekov License plate detection using adaboost
TWI687159B (zh) 魚苗計數系統及魚苗計數方法
CN105989331B (zh) 脸部特征提取装置、脸部特征提取方法、图像处理设备和图像处理方法
KR20170006355A (ko) 모션벡터 및 특징벡터 기반 위조 얼굴 검출 방법 및 장치
CN101984453B (zh) 一种人眼识别系统及方法
CN106845328A (zh) 一种基于双摄像头的智能人脸识别方法及系统
CN103902978A (zh) 人脸检测及识别方法
CN106650623A (zh) 一种基于人脸检测的出入境人证核实的方法
CN106650574A (zh) 基于PCANet的人脸识别方法
JP5004181B2 (ja) 領域識別装置およびコンテンツ識別装置
CN106599834A (zh) 信息推送方法和系统
CN108108651B (zh) 基于视频人脸分析的驾驶员非专心驾驶检测方法及系统
KR101343623B1 (ko) 적응적 피부색 검출 방법, 그리고 이를 이용한 얼굴 검출 방법 및 그 장치
CN114299606A (zh) 一种基于前端相机的睡觉检测方法及装置
CN108520208A (zh) 局部化面部识别方法
Ye et al. A new text detection algorithm in images/video frames

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09817246

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 5107/CHENP/2010

Country of ref document: IN

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC- FORM 1205A DATED 12-08-2011

122 Ep: pct application non-entry in european phase

Ref document number: 09817246

Country of ref document: EP

Kind code of ref document: A1