CN109359551A - A kind of nude picture detection method and system based on machine learning - Google Patents
A kind of nude picture detection method and system based on machine learning Download PDFInfo
- Publication number
- CN109359551A CN109359551A CN201811104850.0A CN201811104850A CN109359551A CN 109359551 A CN109359551 A CN 109359551A CN 201811104850 A CN201811104850 A CN 201811104850A CN 109359551 A CN109359551 A CN 109359551A
- Authority
- CN
- China
- Prior art keywords
- image
- face
- input
- skin
- colour
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/162—Detection; Localisation; Normalisation using pixel segmentation or colour matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Biology (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Biophysics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The present invention discloses a kind of nude picture detection method based on machine learning, and steps are as follows: S1, system initialization, and setting face accounts for complexion model gravity thresholds;S2, input picture;S3, recognition of face;S4, Face Detection;S5, the nude picture detection based on machine learning.The present invention carries out recognition of face to image, excludes the image for not including face information;Using Face Detection model, area and the face proportion in colour of skin area of the colour of skin in the picture are detected, exclusion colour of skin area is less and face accounts for the great image in threshold value of ratio of skin tone;If face accounts for colour of skin specific gravity less than threshold value, the convolutional neural networks completed using training are extracted characteristics of image and judge image attributes by support vector machine classifier classification.Recognition of face, Face Detection can not only efficiently be told sensitive image in conjunction with three kinds of technologies of deep learning, and meet the requirement that sensitive image is handled in real time by the present invention, reduce recognition time.
Description
Technical field
The present invention is that research object is built with deep learning technology with sensitive image in internet (refering in particular to pornographic image)
Vertical convolutional neural networks structure, by transfer learning, to the image zooming-out after recognition of face and two layers of Face Detection screening
Semantic feature constructs semantic feature database, finally establishes support vector machine classifier, judge image attributes, establish one kind
Nude picture detection method and system based on machine learning.
Background technique
Under conditions of Internet technology rapid development, when today's society has stepped into the big data based on multimedia messages
Generation.The characteristics of image can more directly show things compared to other multimedias, and it is abundant in content there is no a language wide gap, therefore sea
The digital picture of amount generates on the internet, and as Baidu includes the different picture of several hundred million Zhang Laiyuan, and quantity is being continuously increased
In, the search engine Google and social network sites microblogging, Twitter, Facebook etc. of same type equally possess a large amount of figure
Piece.Due to the complexity of internet, cause network while bringing people's convenience, pornography is also propagated without restraint.In China,
Although law clear stipulaties are forbidden to propagate the harmful informations such as obscene pornographic, still there are many underground websites to seek by pornography
Sudden huge profits.Since network access content is not classified limitation, i.e., any content can be accessed by anyone on network, lead to pornography
It causes greatly to injure to teen-age physical and mental health, therefore inhibits the propagation of internet pornography, strike illegal website, screen
Pornography is covered as an important social concern.
For teen-age secure internet connection, some anti-yellow softwares come into being, it is therefore intended that identification sensitive image, and by this
A little sensitive image shieldings.These anti-yellow softwares mainly use two kinds of technologies at present: one is based on domain names and text information
Image recognition, this method mainly pass through shielding IP address and keyword achieve the purpose that shield respective image, cannot be automatic
Judge whether image is sensitive image by identification, and many porn sites come from overseas server now, lead to domain name
It is difficult to find.Second method is the image recognition filtering technique based on content, by image skin color segmentation and human body attitude
Etc. geometrical characteristics judge whether image is sensitive image, obtain preferable effect.But such methods extraction is characterized in low layer
Feature, not only descriptive power is limited, but also intrinsic dimensionality is high, computationally intensive, especially when description image and sensitive image very
When similar, it is difficult correctly to distinguish sensitive image and non-sensitive image using existing two kinds of technologies.How to extract high-level semantic and
Distinguishable features become a difficult point of nude picture detection.
With the fast development of machine learning, deep learning is come into being, and becomes branch most booming at present, and
The most wide technology of application prospect in entire artificial intelligence field.Wherein most widely used model is volume in computer vision
Product neural network (Convolutional Neural Network, CNN), CNN model are shared by local receptor field and weight
Strategy, realize the mapped mode characterized under less model parameter by original image pixels to abstract semantics.Due to depth mind
Through network model, the neocognitron system of people can be simulated, picture material is carried out from bottom to high-rise gradually abstract table
It reaches, closer to the mankind to the semantic knowledge of image, and extracting feature not by way of study is that artificial design is extracted, therefore
The characteristic performance of extraction is more preferable.
Summary of the invention
It is an object of the invention to overcome the prior art, a kind of nude picture detection based on machine learning is proposed
Recognition of face, Face Detection are merged with the feature extraction based on deep learning, can not only efficiently be told by method and system
Sensitive image, and meet the requirement that sensitive image is handled in real time, more reduce recognition time.
The present invention solves technical solution used by its technology drawback: a kind of nude picture detection based on machine learning
Method, comprising:
S1, system initialization, setting face account for complexion model gravity thresholds.
S2, input picture
S3, recognition of face: face knowledge is carried out first with Haar algorithm and AdaBoost algorithm to the image of user's input
Not, if a possibility that in image not including face, being excluded as sensitive image, it is not necessary to subsequent identification is carried out, to reduce identification
Time improves recognition efficiency.
S31, Haar-Like wavelet character extract: describing image to the image zooming-out Haar-Like wavelet character of input
Face information, the matrix character of image is calculated by formula (1), and characteristic value, the party are quickly sought using integrogram method
Method need to only traverse an image can obtain image all areas pixel and, will when avoiding each calculating matrix characteristic value
Pixel and operation, to accelerate whole calculating speed.
fI=∑I ∈ I=1 ..., N)wi·RecSum(ri) (1)
F in formulaIIt is the characteristic value of i-th matrix, wiIt is the weight of i-th of matrix character, riIt is i-th of matrix character,
RecSum(ri) be i-th of matrix character pixel and.
S32, AdaBoost algorithm are combined optimization to face characteristic: the small baud extracted using Haar-Like algorithm
Training Weak Classifier is levied, the relatively minimal Weak Classifier of classification error rate is obtained by formula (2), and training step is repeated several times
Suddenly, it is continuously added new Weak Classifier, until reaching scheduled error rate, then to each training by way of Nearest Neighbor with Weighted Voting
Sample assigns a weight, so that Weak Classifier is combined into strong classifier.In order to accurately identify the image comprising face,
Multiple strong classifiers are connected, by adjusting the threshold value of each strong classifier, allows the output of previous classifiers to be used as and classifies below
The input of device, multilayer screening, to obtain the higher recognition of face classifier of accuracy rate.
ε in formulajPresentation class error rate, xiIt is i-th of training sample, yiIt is the label of i-th of training sample, wherein yi
∈ { 0,1 }, respectively indicates face and non-face, and n is training sample sum, hjIndicate Haar-Like feature fiTraining obtains weak
Classifier, wt(i) the error weight of i-th of training sample in the t times iteration is indicated.
S4, Face Detection: often there are the parts of a large amount of Naked skins in sensitive image, therefore for including face
Image carries out Face Detection under the color space YCbCr, image complexion model is calculated using formula (3), according to non-face area
Colour of skin area is greater than twice of area of face's colour of skin of prior probability, gravity thresholds of the face in image area of skin color is arranged, such as
The colour of skin is free of in fruit image or accounts for the overwhelming majority of the colour of skin containing the less colour of skin and face, i.e. face complexion proportion is big
In threshold value, then judge the image for non-sensitive image immediately.
In formula, the partial pixel of ' 1 ' expression image belongs to the colour of skin, and ' 0 ' then indicates that the pixel is not belonging to the colour of skin.
S5, the nude picture detection based on machine learning
S51, training stage: the different types of image largely marked is chosen as training dataset, then builds depth
Learning model, using convolutional neural networks model VGG16, it has 13 convolutional layers, 3 full articulamentums.For each calculating
Unit need to only consider the input near its location of pixels, not need to connect with upper one layer of all nodes, meet the mankind to image
Understanding, and to a picture carry out convolution when, convolution kernel slips over each pixel of picture one by one, that is, handles each pixel
Parameter it is identical.Image often passes through a convolution kernel, is all the process of the feature extraction to image zooming-out.Pond layer utilizes maximum
The method of value or average value makes the image characteristics extraction extracted have translation invariant shape, and convolutional layer and pond layer group are combined into convolution
Very strong priori is added in neural network, that is, emphasizes the continuity and correlation of image local, while keeping feature invariant shape.
Due to the increase of the model number of plies, parameter is caused to increase the drawbacks of increasing with complexity, using the parameter initialization of initialization VGG16
For it on ImageNet trained numerical value, the feature and training set image of extraction are compared by support vector machine classifier
Label establishes loss function, then carries out transfer learning to small parameter perturbations using formula (4) and formula (5) backpropagation.It is logical
Convolutional neural networks after crossing transfer learning extract characteristics of image, establish training set characteristics of image library.
wl→wl-α∑xδX, l(aX, l-1)T (4)
bl→bl-α∑xδX, l (5)
W in formulalIndicate weight, blIndicate biasing, δX, lIndicate the mistake that the sample x of input is generated in l layers of neuron
(error i.e. between actual value and predicted value), aX, l-1Indicate output of the sample x of input at l-1 layers, α indicates learning rate, T
Indicate transposition.
S52, test phase: by the image of recognition of face and Face Detection, pass through trained convolutional Neural net
Network VGG16 extracts feature, and image in query image and characteristics of image library is then carried out measuring similarity, passes through support vector machines
Classifier judges image attributes.
A kind of nude picture detection system based on machine learning, comprising:
Input system, for initializing system, given threshold, and input picture.
First compares judgement system, the input that the output of the input system compares judgement system as first;This first
Compare judgement system for carrying out recognition of face to input picture, according to whether judging whether to continue to execute comprising face.
Second compares judgement system, and the described first output for comparing judgement system compares the defeated of judgement system as second
Enter;This second compares judgement system and is used to carry out Face Detection to the image comprising face, according to complexion model in image and
Specific gravity of the face in complexion model, judges whether to continue to execute.
Deep learning system, described second compares input of the output of judgement system as deep learning system;The depth
Learning system is used to extract the feature of image, and judges image attributes by classifier, exports image attributes result;The depth
Learning system is divided into training stage and test test, before input picture enters deep learning system, the deep learning system
Training stage needs to complete, and convolutional neural networks VGG16 parameter is completed to adjust by the training stage;When input picture reaches depth
When learning system, the process of feature extraction is directly completed by adjusting good convolutional neural networks, and complete by support vector machines
Classification is to judge image attributes.
A kind of nude picture detection method and system based on machine learning of the present invention, advantage and effect are:
The present invention improves existing nude picture detection mode, in conjunction with recognition of face, Face Detection and deep learning, mentions
A kind of nude picture detection method and system based on deep learning out.The present invention carries out recognition of face to image, and exclusion is not wrapped
Image containing face information;Using Face Detection model, colour of skin area in the picture and face are detected in colour of skin area
Proportion, exclusion colour of skin area is less and face accounts for the great image in threshold value of ratio of skin tone;If face accounts for the colour of skin, specific gravity is small
In threshold value, characteristics of image is extracted using the convolutional neural networks that training is completed and by support vector machine classifier classification judgement figure
As attribute.Recognition of face, Face Detection in conjunction with three kinds of technologies of deep learning, can not only efficiently be told sensitivity by the present invention
Image, and meet the requirement that sensitive image is handled in real time, reduce recognition time.
Detailed description of the invention
The main flow chart of Fig. 1 nude picture detection.
Fig. 2 face recognition process flow chart.
Fig. 3 strong classifier series connection block diagram.
Fig. 4 Face Detection process flow diagram flow chart.
The image recognition process of Fig. 5 a, b based on machine learning.
Nude picture detection system diagram of the Fig. 6 based on machine learning.
Specific embodiment
Shown in Figure 1, the present invention is a kind of nude picture detection method based on machine learning, comprising:
Every threshold value is arranged by known priori knowledge, comprising: the colour of skin of normal picture accounts in S1, first system initialization
Human body proportion and face account for colour of skin specific gravity;Priori knowledge refers in particular to the historical data that this industry has already passed through verifying.
The image for needing to judge is inputted, can be handled in real time by S2, input picture.
S3, recognition of face is carried out to the image of input, the step is shown in Figure 2, and selection, which has to be exceedingly fast, detects speed
Haar-Like small echo Face datection algorithm.Firstly, extracting the Haar-Like wavelet character of image, calculated with integrogram method
Then the characteristic value of Haar-Like feature is combined and is optimized to obtained face characteristic using AdaBoost algorithm, by
A kind of the smallest Weak Classifier composition strong classifier of the error in classification rate arrived, then multistage strong classifier series connection is examined to improve face
The precision of survey.
The face information that image is described to the image zooming-out Haar-Like wavelet character of input is calculated using formula (6)
The matrix character of image.
fI=∑I ∈ I={ 1 ..., N }wi·RecSum(ri) (6)
F in formulaIIt is the characteristic value of i-th matrix, wiIt is the weight of i-th of matrix character, riIt is i-th of matrix character,
RecSum(ri) be i-th of matrix character pixel and.
Characteristic value, this method progressive scanning picture, using formula (7) recursive calculation are quickly sought using integrogram method
When, image, which arrives each point from the off and is formed by the sum of rectangular area pixel as the element of an array, is stored in memory
In, when the pixel and Shi Ke that calculate some region are with the element of direct index array, only need to traverse an image can be obtained
The pixel of image all areas and, when avoiding each calculating matrix characteristic value will pixel and operation, to accelerate whole
The calculating speed of body.
(i, j) indicates any point in image in formula, s (i, j) indicate the cumulative of the line direction and, initialization s (i ,-
1) integral image is indicated for 0, n (i, j), initialization n (- 1, j) is 0.
AdaBoost algorithm is combined optimization to face characteristic: being instructed using the wavelet character that Haar-Like algorithm extracts
Practice Weak Classifier, the relatively minimal Weak Classifier of classification error rate is obtained by formula (8).
ε in formulajPresentation class error rate, xiIt is i-th of training sample, yiIt is the label of i-th of training sample, wherein yi
∈ { 0,1 }, respectively indicates face and non-face, and n is training sample sum, hjIndicate Haar-Like feature fiTraining obtains weak
Classifier, wt(i) the error weight of i-th of training sample in the t times iteration is indicated.
Then a weight is assigned to each training sample by the way of formula (9) Nearest Neighbor with Weighted Voting, updates all samples
Weighting parameter:
In formula,Indicate the parameters weighting of t-th of learner, εtPresentation class error rate, σiIt indicates to divide when=0
Class is correct, right value update, σiPresentation class mistake when=1, weight are constant.
The training step is repeated several times, is continuously added new Weak Classifier, it is scheduled until reaching after n times iteration
Then Weak Classifier is combined into strong classifier by error rate.
In order to accurately identify the image comprising face, multiple strong classifiers are connected, it is shown in Figure 3, pass through tune
The threshold value for saving each strong classifier, allows input of the output as classifier below of previous classifiers, and multilayer is screened, to obtain
The higher recognition of face classifier of accuracy rate.
S4, Face Detection: it is shown in Figure 4, Face Detection is executed to the image comprising face information.
Often there are the parts of a large amount of Naked skins in sensitive image, therefore for the image comprising face in YCbCr
(Y representative image luminance component, Cb represent blue luminences component, and Cr represents red luma component) carries out colour of skin inspection under color space
It surveys, calculates image complexion model using formula (10) by known priori knowledge.
In formula, the partial pixel of ' 1 ' expression image belongs to the colour of skin, and ' 0 ' then indicates that the pixel is not belonging to the colour of skin.
It is greater than twice of area of face's colour of skin of prior probability according to the non-face area colour of skin area of human body face, setting face exists
Gravity thresholds in image area of skin color, if without the colour of skin or accounting for the exhausted of the colour of skin containing the less colour of skin and face in image
Most of, i.e., face complexion proportion is greater than threshold value, then judges the image for non-sensitive image immediately.
The step of S5, nude picture detection based on machine learning, is referring to shown in Fig. 5 a, b, including two stages: training rank
Section and test phase.
S51, training stage: the different types of image largely marked is chosen as training dataset, then builds depth
Learning model, using convolutional neural networks model VGG16, it has 13 convolutional layers, 3 full articulamentums.
Convolutional layer is mainly there are three feature: local sensing, weight be shared, multi-kernel convolution.For each computing unit, only
It need to consider the input near its location of pixels, not need to connect with upper one layer of all nodes, meet understanding of the mankind to image,
And when carrying out convolution to a picture, convolution kernel slips over each pixel of picture one by one, that is, handles the parameter of each pixel
It is identical.Image often passes through a convolution kernel, is all the process of the feature extraction to image zooming-out.
Pond layer makes the image characteristics extraction extracted have translation invariant shape, volume using maximum value or the method for average value
Lamination and pond layer group are combined into convolutional neural networks and very strong priori are added, that is, emphasize the continuity of image local to it is related
Property, while keeping feature invariant shape.
In order to realize linear separability, the vector of a feature space is mapped to another space by nonlinear transformation
In, it must be added to activation primitive in convolutional neural networks, the activation primitive using formula (11) ReLU function as this frame.
F (x)=max (0, x) (11)
Its derivative is formula (12):
When x value is negative, node is closed;When x is greater than 0, functional derivative is always 1, it is entirely avoided gradient disappears
The problem of mistake, guarantees that parameter can continue to restrain.
Due to the increase of the model number of plies, parameter is caused to increase the drawbacks of increasing with complexity, using the ginseng of initialization VGG16
Number is initialized as its trained numerical value on ImageNet, and the feature and training of extraction are compared by support vector machine classifier
The label for collecting image, establishes loss function, is then moved using formula (13) and formula (14) backpropagation to small parameter perturbations
Move study.
wl→wl-α∑xδX, l(aX, l-1)T (13)
bl→bl-α∑xδX, l (14)
W in formulalIndicate weight, blIndicate biasing, δX, lIndicate the mistake that the sample x of input is generated in l layers of neuron
(error i.e. between actual value and predicted value), aX, l-1Indicate output of the sample x of input at l-1 layers, α indicates learning rate, T
For transposition.
Characteristics of image is extracted by the convolutional neural networks after transfer learning, establishes training set characteristics of image library, preservation is moved
Move the parameter of convolutional neural networks model after learning.
S52, test phase: to the image Jing Guo recognition of face and Face Detection, pass through trained convolutional Neural
Network extracts feature, and image in query image and characteristics of image library is then carried out measuring similarity, passes through support vector machines point
Class device judges image attributes.
A kind of nude picture detection system based on deep learning, it is shown in Figure 6, comprising:
Input system, for initializing system, given threshold, and input picture.
First compares judgement system, the input that the output of the input system compares judgement system as first;This first
Compare judgement system for carrying out recognition of face to input picture, according to whether judging whether to continue to execute comprising face.
Second compares judgement system, and the described first output for comparing judgement system compares the defeated of judgement system as second
Enter;This second compares judgement system and is used to carry out Face Detection to the image comprising face, according to complexion model in image and
Specific gravity of the face in complexion model, judges whether to continue to execute.
Deep learning system, described second compares input of the output of judgement system as deep learning system;The depth
Learning system is used to extract the feature of image, and judges image attributes by classifier, exports image attributes result;The depth
Learning system is divided into training stage and test test, before input picture enters deep learning system, the deep learning system
Training stage needs to complete, and convolutional neural networks VGG16 parameter is completed to adjust by the training stage;When input picture reaches depth
When learning system, the process of feature extraction is directly completed by adjusting good convolutional neural networks, and complete by support vector machines
Classification is to judge image attributes.
Above-mentioned implementation be only used to further illustrate a kind of nude picture detection method based on deep learning of the invention with
System, but the present invention does not limit to and embodiment, any letter to the above embodiments according to the technical essence of the invention
Single modification, equivalent variations and modification, each fall within the protection scope of technical solution of the present invention.
Claims (4)
1. a kind of nude picture detection method based on machine learning, it is characterised in that: the method steps are as follows:
S1, system initialization, setting face account for complexion model gravity thresholds;
S2, input picture;
S3, recognition of face: carrying out recognition of face first with Haar algorithm and AdaBoost algorithm to the image of user's input, if
A possibility that not including face in image, being excluded as sensitive image, it is not necessary to subsequent identification is carried out, so that recognition time is reduced,
Improve recognition efficiency;
S4, Face Detection: carrying out Face Detection for the image comprising face under the color space YCbCr, is counted using formula (3)
Nomogram is greater than twice of area of face's colour of skin of prior probability according to non-face area colour of skin area as complexion model, and face is arranged
Gravity thresholds in image area of skin color, if without the colour of skin or accounting for the colour of skin containing the less colour of skin and face in image
The overwhelming majority, i.e. face complexion proportion are greater than threshold value, then judge the image for non-sensitive image immediately;
In formula, the partial pixel of ' 1 ' expression image belongs to the colour of skin, and ' 0 ' then indicates that the pixel is not belonging to the colour of skin;
S5, the nude picture detection based on machine learning.
2. a kind of nude picture detection method based on machine learning according to claim 1, it is characterised in that: the step
Rapid S3 recognition of face, specific as follows:
S31, Haar-Like wavelet character extract: the people of image is described to the image zooming-out Haar-Like wavelet character of input
Face information is calculated the matrix character of image by formula (1), and quickly seeks characteristic value using integrogram method:
fI=∑I ∈ I={ 1 ..., N }wi·RecSum(ri) (1)
F in formulaIIt is the characteristic value of i-th matrix, wiIt is the weight of i-th of matrix character, riIt is i-th of matrix character, RecSum
(ri) be i-th of matrix character pixel and;
S32, AdaBoost algorithm are combined optimization to face characteristic: being instructed using the wavelet character that Haar-Like algorithm extracts
Practice Weak Classifier, the relatively minimal Weak Classifier of classification error rate obtained by formula (2), and the training step is repeated several times,
It is continuously added new Weak Classifier, until reaching scheduled error rate, then to each trained sample by way of Nearest Neighbor with Weighted Voting
One weight of this imparting, so that Weak Classifier is combined into strong classifier:
ε in formulajPresentation class error rate, xiIt is i-th of training sample, yiIt is the label of i-th of training sample, wherein yi∈ 0,
1 }, face and non-face is respectively indicated, n is training sample sum, hjIndicate Haar-Like feature fiThe weak typing that training obtains
Device, wt(i) the error weight of i-th of training sample in the t times iteration is indicated.
3. a kind of nude picture detection method based on machine learning according to claim 1, it is characterised in that: the step
Rapid nude picture detection of the S5 based on machine learning, specific as follows:
S51, training stage: the different types of image largely marked is chosen as training dataset, then builds deep learning
Model, using convolutional neural networks model VGG16, it has 13 convolutional layers, 3 full articulamentums;For each computing unit,
It need to only consider the input near its location of pixels, not need to connect with upper one layer of all nodes, and a picture is carried out
When convolution, convolution kernel slips over each pixel of picture one by one, that is, the parameter for handling each pixel is identical;Image often passes through one
Convolution kernel is all the process of the feature extraction to image zooming-out;Pond layer makes extraction using maximum value or the method for average value
Image characteristics extraction has translation invariant shape, and convolutional layer and pond layer group are combined into convolutional neural networks and very strong priori warp are added
It tests, that is, emphasizes the continuity and correlation of image local, while keeping feature invariant shape;Due to the increase of the model number of plies, cause
Parameter increases the drawbacks of with complexity increase, and the parameter initialization of initialization VGG16 is used to train on ImageNet for it
Numerical value, the feature of extraction and the label of training set image are compared by support vector machine classifier, establishes loss function, then
Using formula (4) and formula (5) backpropagation to small parameter perturbations, transfer learning is carried out;Pass through the convolutional Neural after transfer learning
Network extracts characteristics of image, establishes training set characteristics of image library:
wl→wl-α∑xδX, l(aX, l-1)T (4)
bl→bl-α∑xδX, l (5)
W in formulalIndicate weight, blIndicate biasing, δX, lThe mistake for indicating that the sample x of input is generated in l layers of neuron is (i.e. real
Error between actual value and predicted value), aX, l-1Indicate output of the sample x of input at l-1 layers, α indicates that learning rate, T indicate
Transposition;
S52, test phase: by the image of recognition of face and Face Detection, pass through trained convolutional neural networks
VGG16 extracts feature, and image in query image and characteristics of image library is then carried out measuring similarity, passes through support vector machines point
Class device judges image attributes.
4. a kind of nude picture detection system based on machine learning, it is characterised in that: the nude picture detection system includes:
Input system, for initializing system, given threshold, and input picture;
First compares judgement system, the input that the output of above-mentioned input system compares judgement system as first;This first compares
Judgement system is used to carry out recognition of face to input picture, according to whether judging whether to continue to execute comprising face;
Second compares judgement system, the input that the described first output for comparing judgement system compares judgement system as second;It should
Second, which compares judgement system, is used to carry out Face Detection to the image comprising face, is existed according to complexion model in image and face
Specific gravity in complexion model judges whether to continue to execute;
Deep learning system, described second compares input of the output of judgement system as deep learning system;The deep learning
System is used to extract the feature of image, and judges image attributes by classifier, exports image attributes result;The deep learning system
System is divided into training stage and test test, before input picture enters deep learning system, the training of the deep learning system
Stage needs to complete, and convolutional neural networks VGG16 parameter is completed to adjust by the training stage;When input picture reaches deep learning system
When system, the process of feature extraction is directly completed by adjusting good convolutional neural networks, and complete to classify by support vector machines
To judge image attributes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811104850.0A CN109359551A (en) | 2018-09-21 | 2018-09-21 | A kind of nude picture detection method and system based on machine learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811104850.0A CN109359551A (en) | 2018-09-21 | 2018-09-21 | A kind of nude picture detection method and system based on machine learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109359551A true CN109359551A (en) | 2019-02-19 |
Family
ID=65351161
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811104850.0A Pending CN109359551A (en) | 2018-09-21 | 2018-09-21 | A kind of nude picture detection method and system based on machine learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109359551A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110321873A (en) * | 2019-07-12 | 2019-10-11 | 苏州惠邦医疗科技有限公司 | Sensitization picture recognition methods and system based on deep learning convolutional neural networks |
CN110414431A (en) * | 2019-07-29 | 2019-11-05 | 广州像素数据技术股份有限公司 | Face identification method and system based on elastic context relation loss function |
CN111222548A (en) * | 2019-12-30 | 2020-06-02 | Oppo广东移动通信有限公司 | Similar image detection method, device, equipment and storage medium |
CN115331286A (en) * | 2022-07-29 | 2022-11-11 | 中国兵器工业信息中心 | Content safety detection system based on deep learning |
CN115546824A (en) * | 2022-04-18 | 2022-12-30 | 荣耀终端有限公司 | Taboo picture identification method, equipment and storage medium |
CN115633166A (en) * | 2022-09-27 | 2023-01-20 | 北京星绚文化传播有限公司 | Video detection method and device and electronic equipment |
CN117421730A (en) * | 2023-09-11 | 2024-01-19 | 暨南大学 | Code segment sensitive information detection method based on ensemble learning |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101996314A (en) * | 2009-08-26 | 2011-03-30 | 厦门市美亚柏科信息股份有限公司 | Content-based human body upper part sensitive image identification method and device |
CN102117413A (en) * | 2011-03-01 | 2011-07-06 | 金华就约我吧网络科技有限公司 | Method for automatically filtering defective image based on multilayer feature |
CN102270303A (en) * | 2011-07-27 | 2011-12-07 | 重庆大学 | Joint detection method for sensitive image |
CN101923652B (en) * | 2010-07-23 | 2012-05-30 | 华中师范大学 | Pornographic picture identification method based on skin color and characteristic part joint detection |
CN103839076A (en) * | 2014-02-25 | 2014-06-04 | 中国科学院自动化研究所 | Network sensitive image identification method based on light characteristics |
CN105389516A (en) * | 2015-11-09 | 2016-03-09 | 小米科技有限责任公司 | Sensitive picture reminding method and apparatus |
CN106682694A (en) * | 2016-12-27 | 2017-05-17 | 复旦大学 | Sensitive image identification method based on depth learning |
CN106778581A (en) * | 2016-12-07 | 2017-05-31 | 西京学院 | A kind of mobile terminal " sensitivity " information identifying method |
CN107403200A (en) * | 2017-08-10 | 2017-11-28 | 北京亚鸿世纪科技发展有限公司 | Improve the multiple imperfect picture sorting technique of image segmentation algorithm combination deep learning |
CN107527357A (en) * | 2017-08-21 | 2017-12-29 | 杭州电子科技大学 | Face datection positioning and method for real time tracking in Violent scene |
CN107871314A (en) * | 2016-09-23 | 2018-04-03 | 商汤集团有限公司 | A kind of sensitive image discrimination method and device |
CN107909095A (en) * | 2017-11-07 | 2018-04-13 | 江苏大学 | A kind of image-recognizing method based on deep learning |
CN108021936A (en) * | 2017-11-28 | 2018-05-11 | 天津大学 | A kind of tumor of breast sorting algorithm based on convolutional neural networks VGG16 |
CN108280454A (en) * | 2018-01-18 | 2018-07-13 | 天津市国瑞数码安全系统股份有限公司 | The nude picture detection method being combined with LBP features based on HSV |
CN108460390A (en) * | 2018-02-27 | 2018-08-28 | 北京中晟信达科技有限公司 | A kind of nude picture detection method of feature based study |
-
2018
- 2018-09-21 CN CN201811104850.0A patent/CN109359551A/en active Pending
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101996314A (en) * | 2009-08-26 | 2011-03-30 | 厦门市美亚柏科信息股份有限公司 | Content-based human body upper part sensitive image identification method and device |
CN101923652B (en) * | 2010-07-23 | 2012-05-30 | 华中师范大学 | Pornographic picture identification method based on skin color and characteristic part joint detection |
CN102117413A (en) * | 2011-03-01 | 2011-07-06 | 金华就约我吧网络科技有限公司 | Method for automatically filtering defective image based on multilayer feature |
CN102270303A (en) * | 2011-07-27 | 2011-12-07 | 重庆大学 | Joint detection method for sensitive image |
CN103839076A (en) * | 2014-02-25 | 2014-06-04 | 中国科学院自动化研究所 | Network sensitive image identification method based on light characteristics |
CN105389516A (en) * | 2015-11-09 | 2016-03-09 | 小米科技有限责任公司 | Sensitive picture reminding method and apparatus |
CN107871314A (en) * | 2016-09-23 | 2018-04-03 | 商汤集团有限公司 | A kind of sensitive image discrimination method and device |
CN106778581A (en) * | 2016-12-07 | 2017-05-31 | 西京学院 | A kind of mobile terminal " sensitivity " information identifying method |
CN106682694A (en) * | 2016-12-27 | 2017-05-17 | 复旦大学 | Sensitive image identification method based on depth learning |
CN107403200A (en) * | 2017-08-10 | 2017-11-28 | 北京亚鸿世纪科技发展有限公司 | Improve the multiple imperfect picture sorting technique of image segmentation algorithm combination deep learning |
CN107527357A (en) * | 2017-08-21 | 2017-12-29 | 杭州电子科技大学 | Face datection positioning and method for real time tracking in Violent scene |
CN107909095A (en) * | 2017-11-07 | 2018-04-13 | 江苏大学 | A kind of image-recognizing method based on deep learning |
CN108021936A (en) * | 2017-11-28 | 2018-05-11 | 天津大学 | A kind of tumor of breast sorting algorithm based on convolutional neural networks VGG16 |
CN108280454A (en) * | 2018-01-18 | 2018-07-13 | 天津市国瑞数码安全系统股份有限公司 | The nude picture detection method being combined with LBP features based on HSV |
CN108460390A (en) * | 2018-02-27 | 2018-08-28 | 北京中晟信达科技有限公司 | A kind of nude picture detection method of feature based study |
Non-Patent Citations (6)
Title |
---|
刘亚春等: "基于人脸检测的网络图像内容过滤技术研究", 《技术研究》 * |
孙竞媛: "基于内容的敏感图像过滤技术的研究", 《中国优秀硕士学位论文全文数据库•信息科技辑》 * |
张争珍等: "YCgCr颜色空间的肤色聚类人脸检测法", 《计算机工程与应用》 * |
每天记笔记: "卷积神经网络学习笔记--原理篇", 《HTTPS://BLOG.CSDN.NET/WUHE671767/ARTICLE/DETAILS/82584916》 * |
苏松志等: "《行人检测:理论与实践》", 31 March 2016, 厦门大学出版社 * |
颜志国等: "《多摄像机协同关注目标检测跟踪技术》", 30 June 2017, 东南大学出版社 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110321873B (en) * | 2019-07-12 | 2023-10-10 | 苏州思萃工业大数据技术研究所有限公司 | Sensitive picture identification method and system based on deep learning convolutional neural network |
CN110321873A (en) * | 2019-07-12 | 2019-10-11 | 苏州惠邦医疗科技有限公司 | Sensitization picture recognition methods and system based on deep learning convolutional neural networks |
CN110414431B (en) * | 2019-07-29 | 2022-12-27 | 广州像素数据技术股份有限公司 | Face recognition method and system based on elastic context relation loss function |
CN110414431A (en) * | 2019-07-29 | 2019-11-05 | 广州像素数据技术股份有限公司 | Face identification method and system based on elastic context relation loss function |
WO2021136027A1 (en) * | 2019-12-30 | 2021-07-08 | Oppo广东移动通信有限公司 | Similar image detection method and apparatus, device and storage medium |
CN111222548A (en) * | 2019-12-30 | 2020-06-02 | Oppo广东移动通信有限公司 | Similar image detection method, device, equipment and storage medium |
CN115546824A (en) * | 2022-04-18 | 2022-12-30 | 荣耀终端有限公司 | Taboo picture identification method, equipment and storage medium |
CN115546824B (en) * | 2022-04-18 | 2023-11-28 | 荣耀终端有限公司 | Taboo picture identification method, apparatus and storage medium |
CN115331286A (en) * | 2022-07-29 | 2022-11-11 | 中国兵器工业信息中心 | Content safety detection system based on deep learning |
CN115331286B (en) * | 2022-07-29 | 2023-03-17 | 中国兵器工业信息中心 | Content safety detection system based on deep learning |
CN115633166A (en) * | 2022-09-27 | 2023-01-20 | 北京星绚文化传播有限公司 | Video detection method and device and electronic equipment |
CN117421730A (en) * | 2023-09-11 | 2024-01-19 | 暨南大学 | Code segment sensitive information detection method based on ensemble learning |
CN117421730B (en) * | 2023-09-11 | 2024-06-04 | 暨南大学 | Code segment sensitive information detection method based on ensemble learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109359551A (en) | A kind of nude picture detection method and system based on machine learning | |
CN110866140B (en) | Image feature extraction model training method, image searching method and computer equipment | |
US10339419B2 (en) | Fine-grained image similarity | |
WO2019140767A1 (en) | Recognition system for security check and control method thereof | |
Hu et al. | Recognition of pornographic web pages by classifying texts and images | |
CN112347244B (en) | Yellow-based and gambling-based website detection method based on mixed feature analysis | |
CN109919177B (en) | Feature selection method based on hierarchical deep network | |
CN112001282A (en) | Image recognition method | |
CN110019790B (en) | Text recognition, text monitoring, data object recognition and data processing method | |
CN108345850A (en) | The scene text detection method of the territorial classification of stroke feature transformation and deep learning based on super-pixel | |
CN109471944A (en) | Training method, device and the readable storage medium storing program for executing of textual classification model | |
CN108319672B (en) | Mobile terminal bad information filtering method and system based on cloud computing | |
Gomez et al. | A fast hierarchical method for multi-script and arbitrary oriented scene text extraction | |
CN109886161A (en) | A kind of road traffic index identification method based on possibility cluster and convolutional neural networks | |
CN112541476A (en) | Malicious webpage identification method based on semantic feature extraction | |
CN106960040A (en) | A kind of URL classification determines method and device | |
CN115456043A (en) | Classification model processing method, intent recognition method, device and computer equipment | |
Tian et al. | Object detection in optical remote sensing images by integrating object-to-object relationships | |
Dong et al. | Text sentiment polarity classification based on TextCNN-SVM combination model | |
Zhang et al. | Deep contextual stroke pooling for scene character recognition | |
Gururaj et al. | Content based image retrieval system implementation through neural network | |
Nandhini et al. | Sign language recognition using convolutional neural network | |
CN117332409A (en) | Method for detecting steal attack aiming at image classification model | |
CN116911286A (en) | Dictionary construction method, emotion analysis device, dictionary construction equipment and storage medium | |
Sun et al. | Sample hardness guided softmax loss for face recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |