CN106815595A - Mobile terminal and its object detection method and device - Google Patents
Mobile terminal and its object detection method and device Download PDFInfo
- Publication number
- CN106815595A CN106815595A CN201510893620.7A CN201510893620A CN106815595A CN 106815595 A CN106815595 A CN 106815595A CN 201510893620 A CN201510893620 A CN 201510893620A CN 106815595 A CN106815595 A CN 106815595A
- Authority
- CN
- China
- Prior art keywords
- threshold value
- sample
- pruned
- wave filter
- approximate
- 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
- 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
- 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/2415—Classification 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
Abstract
Mobile terminal and its object detection method and device, methods described include:The root wave filter of training objective and multiple part wave filters;Scanned for by the way of the distorted pattern based on part and cascade detection, determine target location, including:Calculate the threshold value that the threshold value and approximate negative sample of approximate positive sample pruning are pruned;During the response of add up successively described response of the sample of wave filter and the sample of each part wave filter, the threshold value that the threshold value and approximate negative sample pruned according to the approximate positive sample are pruned to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned.The present invention by the way of being detected using the distorted pattern based on part and cascade during scanning for, the threshold value that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned, so as to reduce the operand during successive iterations.
Description
Technical field
The present invention relates to computer vision and machine learning techniques field, more particularly to a kind of mobile terminal and its target
Detection method and device.
Relational language is explained
Histogram of Oriented Gradient --- HOG --- gradient orientation histogram;
Support Vector Machine --- SVM --- SVMs;
Convolutional Neural Network --- CNN --- convolutional neural networks;
The distorted pattern of Deformable Part-based Model --- DPM --- based on part;
Cascade --- cascade;
Image Pyramids --- image pyramid;
Feature Pyramids --- feature pyramid;
Haar --- Ha Er.
Background technology
Currently, including many products including smart mobile phone, panel computer, the function of target detection can be all carried, for example
Staff detection, Face datection, pedestrian detection etc..
By taking staff detection as an example, the main purpose of staff detection, is the target reality that staff is detected in image and video
Example, can be applied to gesture identification, man-machine interaction etc..
Object detection and recognition is one extremely challenging problem of computer vision field, and target detection is target identification
Premise, the size of recognition success rate can be directly affected.Used as the initialization step of gesture identification, staff detects also not example
Outward.
The method that there is plurality of target identification and detection in the prior art, if being distinguished according to model, the scheme of main flow
Have:
1) a liter cascade model (AdaBoost Cascaded Model) is picked up by oneself, main and Lis Hartel is levied and is applied to people together
Face detects (Face Detection) field.The program levies many simple Weak Classifiers of study using simple Lis Hartel
(Weak Classifier), constantly adjusts by the weight of wrong classification samples in the training stage, is obtained finally by weighted average
Obtain final classification device.Cascade structure is used when actually detected, each metafiltration falls most of non-face candidate, while allowing major part
Face candidate passes through, so that acceleration detection.
2) SVMs (Support Vector Machine, SVM), main and gradient orientation histogram
(Histogram of Oriented Gradient, HOG) feature is applied to pedestrian detection (Pedestrian together
Detection) field.The program calculates dense gradient direction feature, and the HOG of higher-dimension is described using simple Linear SVM
Son classify with regard to that can obtain good effect.
3) convolutional neural networks (Convolutional Neural Network, CNN) are the methods of big heat in recent years, are applicable
In the detection and identification of extensive target (Generalized Object).Convolution, the pondization operation of multilayer are carried out to input picture,
Classified by Softmax graders again and completed detection process.Although the process realized is similar to black box, result
Other method is exceeded.
4) distorted pattern (Deformable Part-based Model, DPM) based on part, main and gradient direction
Histogram (HOG) feature is applied to the detection and identification of extensive target together, is especially suitable for the detection and knowledge to non-rigid targets
Not.The key element of the method, is that part relative position and integral position are considered as into hidden variable, uses stealthy SVM (Latent-
SVM semi-supervised learning) is completed.The method can also realize cascade detection, on the premise of detection quality is not influenceed, it is possible to achieve
The speed lifting of an order of magnitude.This is one of object detection method best at present.
Inventor has found that the scheme of above-mentioned prior art has certain defect, specific as follows:
On such scheme 1), Lis Hartel is levied and is picked up by oneself liter cascade model and mainly achieved on Face datection at present
Work(, from the point of view of existing disclosed paper, patent, may not behave oneself best in the target detection of other classifications, there is certain limitation
Property.Main cause is that Lis Hartel levies the target enriched suitable for texture information, and it is informative to be but applied to edge contour
Target, such as pedestrian.
On such scheme 2), pedestrian detector's effect that HOG features and SVM classifier are realized preferably, but to deformation or
The drawbacks for the treatment of for being the pedestrian target at side visual angle is it.To find out its cause, because not for deformation and the place of various visual angles
Reason mechanism.
On such scheme 3), the extensive object detector that CNN models and Softmax graders are realized, in existing mark
Quasi- data set is such as:Testing result on Visual Object Classes Challenge, ImageNet is better than other method,
Simultaneously also below the detection level of human visual system.But the approximate black box of operation of this kind of method, for the inspection of specific objective
Survey, adjust ginseng to be also required to expend great manpower.From the point of view of current trend, this kind of method also needs to further improve.
On such scheme 4), the detector based on DPM models and HOG features, although suitable for deformation and various visual angles
Target.But computation complexity problem high, computationally intensive have impact on its practical application.Especially for smart mobile phone as generation
For table mobile terminal, because the operational capability of smart mobile phone can not show a candle to mainframe computer, therefore, the program is multiple due to its calculating
High, the computationally intensive problem of miscellaneous degree cannot also be applied on the mobile terminals such as smart mobile phone at present.
Specifically, the object detection method based on DPM models and HOG features, when being detected, can use level joint inspection
The mode of survey.
Before cascade detection is introduced, the algorithm flow of classical detection scheme is first briefly described.Classical detection scheme is traversal
All of component and yardstick, as 8 pairs of root wave filters of formula and feature carry out template matches computing.For another example all part filtering of formula 9 pairs
The template matches computing that device and feature are carried out, and using range conversion (Distance Transform) method subtract it is corresponding
Deformation cost (Deformation Cost).Last all of deformation component response diagram (Deformed Part Score) can tire out
It is added on root response diagram (Root Score).After completing to add up, the threshold value such as formula 10 can be carried out on final root response diagram and is grasped
Make and non-extreme value suppresses operation, so as to provide testing result.
Formula 8:RScs=TM (Rc,Fs)
Formula 9:RScs←RScs+DT1≤q≤Q(TM(Pcq,Fs),Dcq)
Wherein, RcThe root wave filter (Root Filter) of proxy component c, FsRepresent the characteristic image of yardstick s, RScsIt is Rc
And FsCarry out the root response diagram (Root Score) of template matches generation.PcqQ-th part wave filter (Part of proxy component c
Filter), DcqThe denaturation parameter of q-th part of proxy component c.TM represents template matches (Template Matching) operation,
DT represents range conversion (Distance Transform) operation.
Formula 10:Pos=NMS (RS>T)(10)
Wherein, RS represents final root response diagram, and T represents threshold value, and NMS represents non-extreme value and suppresses (Non Maximum
Suppression), Pos is the testing result of output.
Because classical detection scheme needs to travel through whole feature pyramid, and calculate all of unit response value (Part
Score) and it is corresponding deformation cost (Deformation Cost).The computation complexity of this strategy is very high, have impact on DPM side
The practical application of method.
Cascade detection model is on the basis of classical detection model, to train one group of threshold value for the quick of detection-phase
Calculate.The order of cumulative part wave filter response during cascade order, i.e. cascade detection is to determine first.In calculating training sample
The response of all part wave filters, then according to information entropy theory, the big part wave filter of variance is first selected, until selecting all
Part wave filter.
After determining waterfall sequence, the response of root wave filter that adds up successively and the response of all parts wave filter.Simultaneously
Threshold value is calculated (assuming that pruning according to probability approximate correct (Probably Approximately Correct, PAC) principle
The threshold value that threshold value and deformation are pruned).As shown in formula 11, formula 12:
Formula 11:
Formula 12:
Wherein, q ∈ { 1,2 ..., Q } are the phase index values of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image, and Th assumes that the threshold value of pruning (Hypothesis Pruning), Td
It is the threshold value of deformation pruning (Deformation Pruning).
In cascade detection, according to pre-determined waterfall sequence, add up the described response of the sample of wave filter successively
With the response of the sample of part wave filter each described, the candidate window on target location is obtained;Added up successively described
During the response of the sample of the described response of the sample of wave filter and each part wave filter, according to described
Assuming that prune threshold value and deformation prune threshold value to add up after response carry out assume pruning and deformation prune.
Such scheme is although involved computation complexity in reducing processing procedure by way of cascading detection
And amount of calculation, but for the computing capability of the mobile terminals such as smart mobile phone, it is still excessive.
The content of the invention
Present invention solves the technical problem that being:For the object detection method based on DPM models and HOG features, how to make
The scope that can be allowed in mobile terminals such as smart mobile phones of computation complexity involved in its processing procedure and amount of calculation
Within.
In order to solve the above-mentioned technical problem, the embodiment of the present invention provides a kind of object detection method, including:
The root wave filter of training objective and multiple part wave filters, obtain the sample of the root wave filter on target and each
The sample of individual part wave filter;
Scanned for by the way of the distorted pattern based on part and cascade detection, determine target location;
Scan for including by the way of the distorted pattern and cascade detection using based on part:
The described response of the sample of wave filter of training is calculated, the sample of each part wave filter of training is calculated
This response;
Determine waterfall sequence;
Calculate threshold value, the threshold value of approximate positive sample pruning and the approximate negative sample assumed the threshold value pruned, deformation and prune
The threshold value of pruning;
According to the waterfall sequence, the described response of the sample of wave filter that add up successively and each described part are filtered
The response of the sample of device, obtains the candidate window on target location;In the described sample of wave filter that add up successively
Response and each part wave filter sample response during, according to the threshold that the approximate positive sample is pruned
The threshold value that value and approximate negative sample are pruned to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned;
According to the candidate window on target location, target location is determined.
Optionally, it is described calculate assume prune threshold value, deformation prune threshold value, approximate positive sample prune threshold value and
The threshold value that approximate negative sample is pruned includes:
The threshold value for assuming to prune is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image.
Optionally, it is described calculate assume prune threshold value, deformation prune threshold value, approximate positive sample prune threshold value and
The threshold value that approximate negative sample is pruned includes:
The threshold value that deformation is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image.
Optionally, it is described calculate assume prune threshold value, deformation prune threshold value, approximate positive sample prune threshold value and
The threshold value that approximate negative sample is pruned includes:
The threshold value that approximate positive sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image.
Optionally, it is described calculate assume prune threshold value, deformation prune threshold value, approximate positive sample prune threshold value and
The threshold value that approximate negative sample is pruned includes:
The threshold value that approximate negative sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image.
Optionally, the determination waterfall sequence is:Determine waterfall sequence using greedy algorithm.
Optionally, it is described calculate assume prune threshold value, deformation prune threshold value, approximate positive sample prune threshold value and
Approximately the threshold value of negative sample pruning is:The threshold for assuming that the threshold value pruned, deformation are pruned is calculated according to the approximate correct principle of probability
The threshold value that the threshold value and approximate negative sample that value, approximate positive sample are pruned are pruned.
Optionally, it is described according to the waterfall sequence, the response of the described sample of wave filter of adding up successively and described
The response of the sample of part wave filter, obtaining the candidate window on target location includes:
Step a), according to the waterfall sequence, adds up successively on the basis of the described response of the sample of wave filter
The response of the sample of all parts wave filter;
Step b) according to the threshold value for assuming to prune, deforms after the response of the sample of cumulative part wave filter
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned is assumed the response after adding up
Prune, deformation is pruned, approximate positive sample is pruned and approximate negative sample is pruned;
Repeat the above steps a) to b), until the response of the sample of all parts wave filter that added up, obtains on mesh
The candidate window of cursor position.
Optionally, after the threshold value that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned is to adding up
Response carry out that approximate positive sample is pruned and approximate negative sample is pruned and included:
Approximate positive sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TpqIt is q-th threshold value of approximate positive sample pruning, prune represents cut operation.
Optionally, after the threshold value that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned is to adding up
Response carry out that approximate positive sample is pruned and approximate negative sample is pruned and included:
Approximate negative sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TnqIt is q-th threshold value of approximate negative sample pruning, prune represents cut operation.
Optionally, the root wave filter of the training objective and multiple part wave filters, obtain the root wave filter on target
Sample and the sample of all parts wave filter include:For root wave filter/each part wave filter,
Initial root wave filter/part wave filter is trained using the SVMs of standard;
The initial root wave filter/part wave filter is continued using hidden variable SVMs train, iteration is several times
The sample of root wave filter/part wave filter is obtained afterwards.
Optionally, the use hidden variable SVMs continues to train to the initial root wave filter/part wave filter
Including:Gravity treatment positive sample, data are carried out to the initial root wave filter/part wave filter using hidden variable SVMs to dig
Pick and the optimization of stochastic gradient descent method.
Optionally, it is described obtain the candidate window on target location after, before the determination target location, also
Including:
Non- extreme value is carried out to the candidate window and suppresses operation.
In order to solve the above-mentioned technical problem, the embodiment of the present invention also provides a kind of object detecting device, including:Sample training
Unit and object searching unit;Wherein:
Sample training unit, is suitable to the root wave filter of training objective and multiple part wave filters, obtains the root on target
The sample of wave filter and the sample of all parts wave filter;
Object searching unit, the mode for being suitable for use with the distorted pattern based on part and cascade detection is scanned for, it is determined that
Target location;
The object searching unit includes:Response computation subunit, waterfall sequence determination subelement, threshold calculations are single
Unit, response cumulative subelement and target location determination subelement;Wherein:
Response computation subunit, is suitable to calculate the described response of the sample of wave filter of training, calculates training
The response of the sample of each part wave filter;
Waterfall sequence determination subelement, is adapted to determine that waterfall sequence;
Threshold calculations subelement, is suitable to calculate threshold value, the pruning of approximate positive sample assumed the threshold value pruned, deformation and prune
Threshold value and approximate negative sample prune threshold value;
Response adds up subelement, is suitable to according to the waterfall sequence, and add up the described sound of the sample of wave filter successively
The response with the sample of part wave filter each described should be worth, the candidate window on target location is obtained;It is described successively
During the response of the sample of the cumulative described response of the sample of wave filter and each part wave filter, foundation
The threshold value that the threshold value and approximate negative sample that the approximate positive sample is pruned are pruned carries out approximate positive sample to the response after adding up
Prune and approximate negative sample is pruned;
Target location determination subelement, is suitable to, according to the candidate window on target location, determine target location.
Optionally, the threshold calculations subelement calculates threshold value, the approximate positive sample assumed the threshold value pruned, deformation and prune
The threshold value that the threshold value of this pruning and approximate negative sample are pruned includes:
The threshold value for assuming to prune is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image.
Optionally, the threshold calculations subelement calculates threshold value, the approximate positive sample assumed the threshold value pruned, deformation and prune
The threshold value that the threshold value of this pruning and approximate negative sample are pruned includes:
The threshold value that deformation is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image.
Optionally, the threshold calculations subelement calculates threshold value, the approximate positive sample assumed the threshold value pruned, deformation and prune
The threshold value that the threshold value of this pruning and approximate negative sample are pruned includes:
The threshold value that approximate positive sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image.
Optionally, the threshold calculations subelement calculates threshold value, the approximate positive sample assumed the threshold value pruned, deformation and prune
The threshold value that the threshold value of this pruning and approximate negative sample are pruned includes:
The threshold value that approximate negative sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image.
Optionally, the waterfall sequence determination subelement determines that waterfall sequence is:Determine that cascade is suitable using greedy algorithm
Sequence.
Optionally, the threshold calculations subelement calculates threshold value, the approximate positive sample assumed the threshold value pruned, deformation and prune
The threshold value of this pruning and the threshold value of approximate negative sample pruning are:The threshold for assuming to prune is calculated according to the approximate correct principle of probability
The threshold value of threshold value, the threshold value that approximate positive sample is pruned and the pruning of approximate negative sample that value, deformation are pruned.
Optionally, according to the waterfall sequence, add up the cumulative subelement of the response the described sample of wave filter successively
The response of this response and the sample of the part wave filter, obtaining the candidate window on target location includes:
Step a), according to the waterfall sequence, adds up successively on the basis of the described response of the sample of wave filter
The response of the sample of all parts wave filter;
Step b) according to the threshold value for assuming to prune, deforms after the response of the sample of cumulative part wave filter
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned is assumed the response after adding up
Prune, deformation is pruned, approximate positive sample is pruned and approximate negative sample is pruned;
Repeat the above steps a) to b), until the response of the sample of all parts wave filter that added up, obtains on mesh
The candidate window of cursor position.
Optionally, the threshold value and approximate negative sample that the cumulative subelement of the response is pruned according to the approximate positive sample are repaiied
The threshold value cut to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned and included:
Approximate positive sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TpqIt is q-th threshold value of approximate positive sample pruning, prune represents cut operation.
Optionally, the threshold value and approximate negative sample that the cumulative subelement of the response is pruned according to the approximate positive sample are repaiied
The threshold value cut to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned and included:
Approximate negative sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TnqIt is q-th threshold value of approximate negative sample pruning, prune represents cut operation.
Optionally, the root wave filter of the sample training module training target and multiple part wave filters, obtain on mesh
The sample of target root wave filter and the sample of all parts wave filter include:For root wave filter/each part wave filter,
Initial root wave filter/part wave filter is trained using the SVMs of standard;
The initial root wave filter/part wave filter is continued using hidden variable SVMs train, iteration is several times
The sample of root wave filter/part wave filter is obtained afterwards.
Optionally, the object searching unit also includes:
Non- extreme value suppresses subelement, be suitable to it is described obtain the candidate window on target location after, in the determination
Before target location, non-extreme value is carried out to the candidate window and suppresses operation.
In order to solve the above-mentioned technical problem, the embodiment of the present invention also provides a kind of mobile terminal, including above-mentioned target detection
Device.
Optionally, the mobile terminal is smart mobile phone or panel computer.
Compared with prior art, technical scheme has the advantages that:
Improved on the basis of the object detection method based on DPM models and HOG features in the prior art, adopted
During being scanned for the mode of the distorted pattern based on part and cascade detection, precompute approximate positive sample and prune
Threshold value and the threshold value pruned of approximate negative sample, the threshold that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned
Value to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned, so as to during reducing successive iterations
Operand so that computation complexity and amount of calculation involved by the object detection method based on DPM models and HOG features can
Within the scope of the mobile terminals such as smart mobile phone are allowed.
Further, the threshold value, approximate assumed the threshold value pruned, deformation and prune is calculated according to the approximate correct principle of probability
The threshold value that the threshold value and approximate negative sample that positive sample is pruned are pruned, so as to improve the precision and efficiency of threshold calculations.
Further, during the root wave filter/part wave filter of training objective, in the supporting vector using standard
Machine is trained on the basis of initial root wave filter/part wave filter, further using hidden variable SVMs to described initial
Root wave filter/part wave filter continues training by the way of the optimization of gravity treatment positive sample, data mining and stochastic gradient descent method,
Iteration obtains the sample of root wave filter/part wave filter afterwards several times, so as to improve the essence of root wave filter/part wave filter sample
Degree, in order to reduce the computation complexity and amount of calculation in succeeding target search procedure.
Brief description of the drawings
Fig. 1 is object detection method flow chart in the embodiment of the present invention;
Fig. 2 scans for method flow for the mode of the distorted pattern in the embodiment of the present invention based on part and cascade detection
Figure;
Fig. 3 is the response method flow diagram of the sample of cumulative root wave filter/part wave filter in the embodiment of the present invention;
Fig. 4 is object detecting device structured flowchart in the embodiment of the present invention;
Fig. 5 is another object detection method flow chart in the embodiment of the present invention;
Fig. 6 is extraction HOG characterization method flow charts in the embodiment of the present invention.
Specific embodiment
It can be seen from analysis according to background section, object detection method based on DPM models and HOG features (i.e. scheme
4)) when using cascade detection technique, the detection speed of an order of magnitude can be realized on the premise of detection quality is not influenceed
Lifting, is one of object detection method best at present.
But program computation complexity problem high, computationally intensive have impact on its practical application.Especially for intelligence
Can mobile phone for for representing mobile terminal, because the operational capability of smart mobile phone can not show a candle to mainframe computer, therefore, the program by
Cannot also be applied on the mobile terminals such as smart mobile phone at present in its computation complexity problem high, computationally intensive.
Inventor is improved for program computation complexity defect high, computationally intensive.Using based on part
Distorted pattern and cascade detection mode scan for during, precompute threshold value that approximate positive sample prunes and near
Like the threshold value that negative sample is pruned, after the threshold value that the threshold value and approximate negative sample pruned according to the approximate positive sample are pruned is to adding up
Response carry out that approximate positive sample is pruned and approximate negative sample is pruned.
Inventor proposes after research:In the described response of the sample of wave filter and each the described part of adding up successively
During the response of the sample of wave filter, approximate positive sample pruning can be carried out and (in current pixel neighborhood of a point, there is sound
Should be worth when being higher by the enough pixel of current point, current pixel point will be pruned) because, even if this partial pixel is not repaiied
Cut, can also be excluded in the non-extreme value of post processing suppresses;The approximate negative sample pruning (sound of current pixel point can also be carried out
When should be worth sufficiently low, current pixel neighborhood of a point will be pruned) because, in the very low situation of the response of current pixel point
Under, in its neighborhood the response of pixel generally also than relatively low, even if this partial pixel is not pruned, generally also can be to follow-up
It is trimmed to about in the pruning of cascade.The present invention subsequently will necessarily be trimmed to about or be that the pixel being very likely trimmed to about is repaiied in advance
Cut, it is possible to reduce be subsequently necessarily trimmed to about or be the insignificant calculating of the pixel being very likely trimmed to about to this part,
Thus reduce computation complexity and amount of calculation so that the meter involved by the object detection method based on DPM models and HOG features
Calculate complexity and amount of calculation can be within the scope of the mobile terminals such as smart mobile phone be allowed.
To more fully understand those skilled in the art and realizing the present invention, referring to the drawings, by specific embodiment
It is described in detail.
Embodiment one
As described below, the embodiment of the present invention provides a kind of object detection method.
Object detection method in the present embodiment, in the prior art the target detection side based on DPM models and HOG features
Improved on the basis of method, substantially reduced computation complexity and amount of calculation involved during it is realized so that its
Involved computation complexity and amount of calculation can be within the scope of the mobile terminals such as smart mobile phone be allowed in processing procedure.
Scheme provided by the present invention is applied to the detection of extensive target, such as in staff detection, Face datection, Hang Renjian
The fields such as survey are applicable.It is especially suitable for the detection to non-rigid targets.
Object detection method flow chart shown in reference picture 1:
Object detection method based on DPM models and HOG features includes:
S101, the root wave filter of training objective and multiple part wave filters, obtain the sample of the root wave filter on target
With the sample of all parts wave filter.
Object detection method based on DPM models and HOG features needs the root wave filter and multiple parts of first training objective
Wave filter, so as to during follow-up target detection, it is possible to use to these root wave filters and part wave filter response
Accumulated value determines target (in another scene) position.
In specific implementation, the root wave filter and multiple part wave filter of the training objective obtain the root on target
The sample of wave filter and the sample of all parts wave filter can include:For root wave filter/each part wave filter, difference
Perform following steps:
Initial root wave filter/part wave filter is trained using the SVMs of standard;
The initial root wave filter/part wave filter is continued using hidden variable SVMs train, iteration is several times
The sample of root wave filter/part wave filter is obtained afterwards.
Wherein, the use hidden variable SVMs continues to train tool to the initial root wave filter/part wave filter
Body can include:Gravity treatment positive sample, number are carried out to the initial root wave filter/part wave filter using hidden variable SVMs
Optimize with stochastic gradient descent method according to excavating.
Description to technical scheme more than can be seen that:In the present embodiment, in the root wave filter/part of training objective
During wave filter, on the basis of initial root wave filter/part wave filter is trained using the SVMs of standard, enter
One step uses gravity treatment positive sample, data mining using hidden variable SVMs to the initial root wave filter/part wave filter
The mode optimized with stochastic gradient descent method continues training, and iteration obtains the sample of root wave filter/part wave filter afterwards several times,
It is complicated in order to reduce the calculating in succeeding target search procedure so as to improve the precision of root wave filter/part wave filter sample
Degree and amount of calculation.
S102, is scanned for by the way of the distorted pattern based on part and cascade detection, determines target location.
Wherein, as shown in Fig. 2 being scanned for (i.e. by the way of the distorted pattern and cascade detection using based on part
Step S102) include:
S201, calculates the described response of the sample of wave filter of training, calculates each described part filtering of training
The response of the sample of device.
The response of the sample of the response of the sample of the root wave filter for calculating and each part wave filter, meeting
For follow-up step S202 and step S204.
S202, determines waterfall sequence.
Waterfall sequence, that is, cascade detection process in come to add up successively in what order root wave filter sample response and
The response of the sample of each part wave filter.(classics detection is not related to cascade suitable for classical detection scheme
Sequence), follow-up computational efficiency can be improved.
In specific implementation, it is possible to use greedy algorithm determines waterfall sequence.
S203, calculates the threshold value assuming the threshold value pruned, deformation and prune, the threshold value and approximately negative that approximate positive sample is pruned
The threshold value that sample is pruned.
Difference with prior art is that prior art is in the described sound of the sample of wave filter that subsequently adds up successively
During should being worth with the response of the sample of part wave filter each described, generally only carry out assuming that pruning and deformation are pruned,
Without carrying out, approximate positive sample is pruned and approximate negative sample is pruned, therefore, only need to calculate in this step and assume what is pruned
The threshold value that threshold value and deformation are pruned, the threshold value that threshold value and approximate negative sample without calculating approximate positive sample pruning are pruned.And
The present embodiment is in the described response of the sample of wave filter and the sample of each part wave filter of subsequently adding up successively
(i.e. step S204) is, it is necessary to carry out hypothesis pruning, deformation pruning, the pruning of approximate positive sample and approximately negative sample during response
This pruning, therefore, threshold value, the threshold of approximate positive sample pruning assumed the threshold value pruned, deformation and prune are calculated in this step
The threshold value that value and approximate negative sample are pruned.
In specific implementation, described calculating assumes that the threshold value pruned, the threshold value of deformation pruning, approximate positive sample are pruned
The threshold value that threshold value and approximate negative sample are pruned can include:
The threshold value for assuming to prune is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image;
The threshold value that deformation is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image;
The threshold value that approximate positive sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image;
The threshold value that approximate negative sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image.
Above formula is counted using approximate correct (Probably Approximately Correct, the PAC) principle of probability
Calculate and assume the threshold value that the threshold value pruned, the threshold value of deformation pruning, approximate positive sample are pruned and the threshold value that approximate negative sample is pruned.
It is understood that in other embodiments, it would however also be possible to employ other modes draw above-mentioned threshold value.
Description to technical scheme more than can be seen that:In the present embodiment, calculated according to the approximate correct principle of probability
Go out to assume the threshold value that the threshold value pruned, the threshold value of deformation pruning, the threshold value of approximate positive sample pruning and approximate negative sample are pruned, from
And improve the precision and efficiency of threshold calculations.
S204, according to the waterfall sequence, add up the described response of the sample of wave filter and each described portion successively
The response of the sample of part wave filter, obtains the candidate window on target location.
Difference with prior art is, as it was previously stated, prior art is in the described sample of wave filter that add up successively
During the response of this response and the sample of each part wave filter, generally only carry out assuming pruning and deformation
Prune, without carrying out, approximate positive sample is pruned and approximate negative sample is pruned.And the present embodiment is in the described filtering that adds up successively
During the response of the sample of the response of the sample of device and each part wave filter, according to the approximate positive sample
The threshold value that the threshold value of pruning and approximate negative sample are pruned to adding up after response carry out approximate positive sample and prune and approximately negative sample
This pruning.
Description to technical scheme more than can be seen that:In the present embodiment, in the prior art based on DPM models
Improved with the basis of the object detection method of HOG features, detected using the distorted pattern based on part and cascade
Mode scan for during, precompute the threshold value that approximate positive sample prunes and the threshold value that approximate negative sample is pruned,
The threshold value that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned to adding up after response carry out it is approximate just
Sample is pruned and approximate negative sample is pruned, so as to reduce the operand during successive iterations so that based on DPM models and
Computation complexity and amount of calculation involved by the object detection method of HOG features can be allowed in mobile terminals such as smart mobile phones
Within the scope of.
It is understood that the present embodiment is on the basis of approximate positive sample pruning and the pruning of approximate negative sample is carried out,
Can carry out assuming that pruning and deformation are pruned.
In specific implementation, described according to the waterfall sequence, add up the described response of the sample of wave filter successively
With the response of the sample of the part wave filter, obtaining the candidate window on target location can include:
Step a), according to the waterfall sequence, adds up successively on the basis of the described response of the sample of wave filter
The response of the sample of all parts wave filter;
Step b) according to the threshold value for assuming to prune, deforms after the response of the sample of cumulative part wave filter
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned is assumed the response after adding up
Prune, deformation is pruned, approximate positive sample is pruned and approximate negative sample is pruned;
Repeat the above steps a) to b), until the response of the sample of all parts wave filter that added up, obtains on mesh
The candidate window of cursor position.
Wherein, after the threshold value that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned is to adding up
Response carries out approximate positive sample prunes can include with the pruning of approximate negative sample:
Approximate positive sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TpqIt is q-th threshold value of approximate positive sample pruning, prune represents cut operation;
Approximate negative sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TnqIt is q-th threshold value of approximate negative sample pruning, prune represents cut operation.
Specifically, can be with as shown in figure 3, adding up corresponding to a circulation for each part wave filter, follows at each
In ring, approximate negative sample pruning is carried out successively, pruning, the pruning of approximate positive sample, the sound of the sample of cumulative part wave filter is assumed
Should be worth, deform pruning.Continuous iteration, until the response of the sample of all parts wave filter that added up, obtains on target position
The candidate window put.
S205, according to the candidate window on target location, determines target location.
By after cascade detection (i.e. step S201 to step S204), it will usually leave a small amount of candidate window
(Candidate Window)。
If (detecting target position in the scene, and target is existed only in scene extremely using single goal scheme
Many positions), then it is follow-up to choose the maximum candidate window of response, as target location.
If (detecting target position in the scene, target may reside in many in scene using multi-objective program
Individual position), then can it is described obtain the candidate window on target location after, it is right before the determination target location
The candidate window carries out non-extreme value and suppresses operation, with the candidate window for suppressing not being excluded in operation in non-extreme value, as mesh
Cursor position.
Embodiment two
As described below, the embodiment of the present invention provides a kind of object detecting device.
Object detecting device structured flowchart shown in reference picture 4.
The object detecting device includes:Sample training unit 401 and object searching unit 402;The wherein master of each unit
Want function as follows:
Sample training unit 401, is suitable to the root wave filter of training objective and multiple part wave filters, obtains on target
The sample of root wave filter and the sample of all parts wave filter;
Object searching unit 402, the mode for being suitable for use with the distorted pattern based on part and cascade detection is scanned for, really
Set the goal position;
The object searching unit 402 includes:Response computation subunit 4021, waterfall sequence determination subelement 4022,
Threshold calculations subelement 4023, response adds up subelement 4024 and target location determination subelement 4025;Wherein:
Response computation subunit 4021, is suitable to calculate the described response of the sample of wave filter of training, calculates instruction
The response of the sample of each experienced part wave filter;
Waterfall sequence determination subelement 4022, is adapted to determine that waterfall sequence;
Threshold calculations subelement 4023, is suitable to calculate threshold value, the approximate positive sample for assuming that the threshold value pruned, deformation are pruned
The threshold value that the threshold value of pruning and approximate negative sample are pruned;
Response adds up subelement 4024, is suitable to according to the waterfall sequence, and add up the described sample of wave filter successively
Response and each part wave filter sample response, obtain the candidate window on target location;Described
During the response of the described response of the sample of wave filter that add up successively and the sample of each part wave filter,
The threshold value that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned to adding up after response carry out it is approximate just
Sample is pruned and approximate negative sample is pruned;
Target location determination subelement 4025, is suitable to, according to the candidate window on target location, determine target position
Put.
Description to technical scheme more than can be seen that:In the present embodiment, in the prior art based on DPM models and
Improved on the basis of the object detection method of HOG features, what is detected using the distorted pattern based on part and cascade
During mode is scanned for, the threshold value that the threshold value and approximate negative sample of approximate positive sample pruning are pruned is precomputed, according to
The threshold value that the threshold value pruned according to the approximate positive sample and approximate negative sample are pruned to adding up after response carry out approximate positive sample
This pruning and approximate negative sample are pruned, so as to reduce the operand during successive iterations so that based on DPM models and HOG
What computation complexity and amount of calculation involved by the object detection method of feature can be allowed in mobile terminals such as smart mobile phones
Within the scope of.
In specific implementation, the threshold calculations subelement calculates the threshold value, near assumed the threshold value pruned, deformation and prune
The threshold value that the threshold value pruned like positive sample and approximate negative sample are pruned can include:
The threshold value for assuming to prune is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image;
The threshold value that deformation is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response diagram
Picture, P is unit response image, and D is deformation cost image;
The threshold value that approximate positive sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image;
The threshold value that approximate negative sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel
Point, p ' is any pixel point in neighborhood, and N (p) is current pixel neighborhood of a point, and S is response image.
Description to technical scheme more than can be seen that:In the present embodiment, calculated according to the approximate correct principle of probability
Go out to assume the threshold value that the threshold value pruned, the threshold value of deformation pruning, the threshold value of approximate positive sample pruning and approximate negative sample are pruned, from
And improve the precision and efficiency of threshold calculations.
In specific implementation, the waterfall sequence determination subelement determines that waterfall sequence can be:It is true using greedy algorithm
Determine waterfall sequence.
In specific implementation, the threshold calculations subelement calculates the threshold value, near assumed the threshold value pruned, deformation and prune
The threshold value pruned like positive sample and the threshold value of approximate negative sample pruning can be:Hypothesis is calculated according to the approximate correct principle of probability
The threshold value of threshold value, the threshold value that approximate positive sample is pruned and the pruning of approximate negative sample that the threshold value of pruning, deformation are pruned.
In specific implementation, according to the waterfall sequence, add up the cumulative subelement of the response described filtering successively
The response of the sample of the response of the sample of device and the part wave filter, obtaining the candidate window on target location can be with
Including:
Step a), according to the waterfall sequence, adds up successively on the basis of the described response of the sample of wave filter
The response of the sample of all parts wave filter;
Step b) according to the threshold value for assuming to prune, deforms after the response of the sample of cumulative part wave filter
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned is assumed the response after adding up
Prune, deformation is pruned, approximate positive sample is pruned and approximate negative sample is pruned;
Repeat the above steps a) to b), until the response of the sample of all parts wave filter that added up, obtains on mesh
The candidate window of cursor position.
In specific implementation, threshold value that the cumulative subelement of the response is pruned according to the approximate positive sample and approximately negative
The threshold value that sample is pruned to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned and included:
Approximate positive sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TpqIt is q-th threshold value of approximate positive sample pruning, prune represents cut operation;
Approximate negative sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is
The response of current pixel point, TnqIt is q-th threshold value of approximate negative sample pruning, prune represents cut operation.
In specific implementation, the root wave filter and multiple part wave filter of the sample training module training target are obtained
The sample of the root wave filter on target and the sample of all parts wave filter can include:For root wave filter/each portion
Part wave filter,
Initial root wave filter/part wave filter is trained using the SVMs of standard;
The initial root wave filter/part wave filter is continued using hidden variable SVMs train, iteration is several times
The sample of root wave filter/part wave filter is obtained afterwards.
In specific implementation, the use hidden variable SVMs to the initial root wave filter/part wave filter after
Continuous training can include:The positive sample of gravity treatment is carried out to the initial root wave filter/part wave filter using hidden variable SVMs
Originally, data mining and the optimization of stochastic gradient descent method.
Description to technical scheme more than can be seen that:In the present embodiment, in the root wave filter/part of training objective
During wave filter, on the basis of initial root wave filter/part wave filter is trained using the SVMs of standard, enter
One step uses gravity treatment positive sample, data mining using hidden variable SVMs to the initial root wave filter/part wave filter
The mode optimized with stochastic gradient descent method continues training, and iteration obtains the sample of root wave filter/part wave filter afterwards several times,
It is complicated in order to reduce the calculating in succeeding target search procedure so as to improve the precision of root wave filter/part wave filter sample
Degree and amount of calculation.
In specific implementation, the object searching unit can also include:
Non- extreme value suppresses subelement, be suitable to it is described obtain the candidate window on target location after, in the determination
Before target location, non-extreme value is carried out to the candidate window and suppresses operation.
Embodiment three
As described below, the embodiment of the present invention provides a kind of mobile terminal.
Difference with prior art is that the mobile terminal includes the target as provided in the embodiment of the present invention
Detection means.The mobile terminal is based on being carried out on the basis of the object detection method of DPM models and HOG features in the prior art
Improve, during being scanned for by the way of being detected using the distorted pattern based on part and cascade, precompute closely
The threshold value that the threshold value pruned like positive sample and approximate negative sample are pruned, the threshold value pruned according to the approximate positive sample and approximately negative
The threshold value that sample is pruned to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned, after reducing
Operand in continuous iterative process so that the computation complexity involved by the object detection method based on DPM models and HOG features
Can be within the scope of the mobile terminals such as smart mobile phone be allowed with amount of calculation.
In specific implementation, the mobile terminal can be smart mobile phone or panel computer.
Example IV
As described below, the embodiment of the present invention provides a kind of object detection method.
Object detection method flow chart shown in reference picture 5:
Object detection method based on DPM models and HOG features includes:
S501, constructs image pyramid.
In order to realize to the detection of multiple dimensioned staff target, it is necessary to construct image pyramid, and calculate corresponding feature gold
Word tower.
Construction image pyramid needs to carry out down-sampled, and two ways is used in the present embodiment:Bicubic interpolation
(Bicubic Interpolation) and bilinear interpolation.It is down-sampled for one yardstick of difference, using more efficiently two-wire
Property interpolation.It is down-sampled under same layer (Octave) yardstick, using bicubic interpolation.This down-sampled strategy of distinction can be
On the premise of ensureing picture quality, computation complexity is reduced as far as possible.
S502, calculates the feature pyramid based on HOG corresponding to image pyramid;
, it is necessary to calculate corresponding feature pyramid after image pyramid is completed.It is described to calculate image pyramid institute
The corresponding feature pyramid based on HOG includes:Extract HOG features.
As shown in fig. 6, the present embodiment extracts HOG features as follows:
S601, calculates gradient image.
During gradient image is calculated, in order to reduce amount of calculation, input picture can be converted to grayscale format, then
Use One-Dimensional Center template P=[- 1,0,1] and its transposition PTThe input picture to grayscale format is filtered respectively, respectively
Calculate x, the gradient image in y directions, i.e. Gx, Gy.For another example formula 1 calculates gradient magnitude image GM:
Formula 1:
Gradient direction is generally divided into M direction, as formula 2 calculates gradient direction coded image GO。
Formula 2:
Wherein, [] represents bracket function, and mod represents mod, GOIt is the integer in the range of { 1,2 ..., M }.
After the calculating gradient image, also include:Gradient direction is divided into M direction, is calculated using formula 2
Gradient direction coded image GO;
Formula 2:
Wherein, [] represents bracket function, and mod represents mod, GOIt is the integer in the range of { 1,2 ..., M }.
S602, carries out statistics with histogram.
After gradient image is calculated, statistics with histogram is carried out.
It is the gradient image of w*h to size, cellular that can be with size as k*k is counted for unit.Can generally adopt
With bilinear interpolation (Bilinear Interpolation), i.e., any pixel can simultaneously be included into around four in gradient image
Adjacent cellular is counted.For each coding direction m, can count dimension isTwo-dimensional histogram H
(x, y, m), wherein,It is overall that histogram dimension is
Expression is rounded downwards.
S603, is normalized and blocks.
After statistics with histogram is carried out, it is normalized and blocks.
In the present embodiment, it is described be normalized and block including:
Pre-build the first look-up table, first look-up table is by multiple numerical value and their own evolution corresponding guarantor reciprocal
Deposit;
The histogrammic second order norm in each direction is accumulated, gradient energy image is obtained;
According to the gradient energy image and first look-up table, HOG features are calculated.
Wherein, first look-up table of setting up can specifically include:
FormedFunction curve;
Based on the function curve, multiple numerical value are obtained using the method for piecewise fitting reciprocal with their own evolution;
By the corresponding preservation reciprocal of multiple numerical value and their own evolution, the first look-up table is formed.
It is described according to the gradient energy image and first look-up table, calculating HOG features can specifically include:
Using formula 8 obtain normalized image square
Formula 8:
Wherein,
According to first look-up table, obtain normalized image squareCorresponding evolution is reciprocal
FoundationF is calculated using formula 5 and formula 61(x, y, m) and F2(x,y,(δ,γ));
Formula 5:
Formula 6:
Wherein,T1、T2For corresponding
Interceptive value;
According to F1(x, y, m) and F2(x, y, (δ, γ)), calculates HOG feature F=[F1,F2]。
By above-mentioned steps S601 to S603, the extraction to HOG features is completed.
Description to technical scheme more than can be seen that:In the present embodiment, in the prior art based on DPM models and
Improved on the basis of the object detection method of HOG features, pre-build the first look-up table, first look-up table will be many
Individual numerical value corresponding preservation reciprocal with their own evolution, during being normalized and blocking, according to gradient energy figure
Picture and first look-up table for pre-building, calculate HOG features, so as to avoid substantial amounts of during normalized removing
Method computing and extracting operation so that computation complexity and meter involved by the object detection method based on DPM models and HOG features
Calculation amount can be within the scope of the mobile terminals such as smart mobile phone be allowed.
If picture size is larger, to ensure detection quality, every layer (Octave) need to calculate more series (Level).Such as
Fruit all calculates HOG features per one-level, then computation complexity can be very high.
Practice have shown that, the image close for yardstick, their HOG features are presented the relation of approximate exponential function.
The present embodiment only calculates the HOG features of a small amount of yardstick, and the HOG features of other adjacent yardsticks can be by such as formula 7
Approximate calculation is obtained.
Formula 7:FS≈R(F,S)·S-λ
Wherein, F represents known features, FSThe approximation characteristic of required solution is represented, S represents relative scalar, and λ represents index letter
Several coefficients, R function to be represented and carry out resampling to known features F with relative scalar S.
Description to technical scheme more than can be seen that:In the present embodiment, calculating corresponding to image pyramid
During feature based on HOG is pyramidal, the HOG features of a small amount of yardstick are only calculated, obtained by approximate calculation on this basis
To the HOG features of other adjacent yardsticks, so as on the premise of on detection quality influence less, further reduce and be based on DPM moulds
Computation complexity and amount of calculation involved by the object detection method of type and HOG features.
S503, is scanned for by the way of the distorted pattern based on part and cascade detection to feature pyramid, it is determined that
Target location.
So far, the target detection based on DPM models and HOG features is realized.The present embodiment is based on DPM in the prior art
Improved on the basis of the object detection method of model and HOG features, (the step during being normalized
S603), it is to avoid substantial amounts of division arithmetic and extracting operation, the gold of the feature based on HOG corresponding to image pyramid is being calculated
During word tower (step S502), it is to avoid the HOG features of a large amount of yardsticks of calculating, little premise is being influenceed on detection quality
Under substantially reduce computation complexity and amount of calculation so that the object detection method based on DPM models and HOG features its treat
Involved computation complexity and amount of calculation can be easy to this within the scope of the mobile terminals such as smart mobile phone are allowed in journey
Object detection method application on mobile terminals.
It will appreciated by the skilled person that in the various methods of above-described embodiment, all or part of step is can
Indicate related hardware come what is completed with by program, the program can be stored in a computer-readable recording medium, storage
Medium can include:ROM, RAM, disk or CD etc..
Although present disclosure is as above, the present invention is not limited to this.Any those skilled in the art, are not departing from this
In the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute
The scope of restriction is defined.
Claims (28)
1. a kind of object detection method, it is characterised in that including:
The root wave filter of training objective and multiple part wave filters, obtain the sample and all parts of the root wave filter on target
The sample of wave filter;
Scanned for by the way of the distorted pattern based on part and cascade detection, determine target location;
Scan for including by the way of the distorted pattern and cascade detection using based on part:
The described response of the sample of wave filter of training is calculated, the sample of each part wave filter of training is calculated
Response;
Determine waterfall sequence;
Threshold value, the threshold value of approximate positive sample pruning and the approximate negative sample assumed the threshold value pruned, deformation and prune is calculated to prune
Threshold value;
According to the waterfall sequence, the described response of the sample of wave filter that add up successively and each part wave filter
The response of sample, obtains the candidate window on target location;In the described sound of the sample of wave filter that adds up successively
During should being worth with the response of the sample of part wave filter each described, the threshold value pruned according to the approximate positive sample and
Response after approximately the threshold value of negative sample pruning is to adding up carries out approximate positive sample and prunes and the pruning of approximate negative sample;
According to the candidate window on target location, target location is determined.
2. object detection method as claimed in claim 1, it is characterised in that described to calculate threshold value, the deformation for assuming to prune
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned includes:
The threshold value for assuming to prune is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response image, P
It is unit response image, D is deformation cost image.
3. object detection method as claimed in claim 1, it is characterised in that described to calculate threshold value, the deformation for assuming to prune
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned includes:
The threshold value that deformation is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response image, P
It is unit response image, D is deformation cost image.
4. object detection method as claimed in claim 1, it is characterised in that described to calculate threshold value, the deformation for assuming to prune
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned includes:
The threshold value that approximate positive sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel point, p '
It is any pixel point in neighborhood, N (p) is current pixel neighborhood of a point, and S is response image.
5. object detection method as claimed in claim 1, it is characterised in that described to calculate threshold value, the deformation for assuming to prune
The threshold value that the threshold value and approximate negative sample that the threshold value of pruning, approximate positive sample are pruned are pruned includes:
The threshold value that approximate negative sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel point, p '
It is any pixel point in neighborhood, N (p) is current pixel neighborhood of a point, and S is response image.
6. object detection method as claimed in claim 1, it is characterised in that the determination waterfall sequence is:Calculated using greediness
Method determines waterfall sequence.
7. object detection method as claimed in claim 1, it is characterised in that described to calculate threshold value, the deformation for assuming to prune
The threshold value of pruning, approximate positive sample prune threshold value and approximate negative sample prune threshold value be:According to the approximate correct principle of probability
Calculate and assume the threshold value that the threshold value pruned, the threshold value of deformation pruning, approximate positive sample are pruned and the threshold that approximate negative sample is pruned
Value.
8. object detection method as claimed in claim 1, it is characterised in that described according to the waterfall sequence, adds up successively
The response of the response of described sample of wave filter and the sample of the part wave filter, obtains the time on target location
Selecting window includes:
Step a), according to the waterfall sequence, adds up each successively on the basis of the described response of the sample of wave filter
The response of the sample of part wave filter;
Step b) is pruned after the response of the sample of cumulative part wave filter according to the threshold value for assuming to prune, deformation
Threshold value, the threshold value pruned of the threshold value pruned of approximate positive sample and approximate negative sample carries out hypothesis and repaiies to the response after adding up
Cut, deform pruning, the pruning of approximate positive sample and approximate negative sample pruning;
Repeat the above steps a) to b), until the response of the sample of all parts wave filter that added up, obtains on target position
The candidate window put.
9. object detection method as claimed in claim 1, it is characterised in that the threshold pruned according to the approximate positive sample
The threshold value that value and approximate negative sample are pruned to adding up after response carry out that approximate positive sample is pruned and approximate negative sample prunes bag
Include:
Approximate positive sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is current
The response of pixel, TpqIt is q-th threshold value of approximate positive sample pruning, prune represents cut operation.
10. object detection method as claimed in claim 1, it is characterised in that described to prune according to the approximate positive sample
The threshold value that threshold value and approximate negative sample are pruned to adding up after response carry out that approximate positive sample is pruned and approximate negative sample is pruned
Including:
Approximate negative sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is current
The response of pixel, TnqIt is q-th threshold value of approximate negative sample pruning, prune represents cut operation.
11. object detection methods as claimed in claim 1, it is characterised in that the root wave filter and multiple of the training objective
Part wave filter, the sample of the sample and all parts wave filter that obtain the root wave filter on target includes:Filtered for root
Device/each part wave filter,
Initial root wave filter/part wave filter is trained using the SVMs of standard;
The initial root wave filter/part wave filter is continued using hidden variable SVMs train, iteration is obtained afterwards several times
To the sample of root wave filter/part wave filter.
12. object detection methods as claimed in claim 11, it is characterised in that the use hidden variable SVMs is to institute
Stating initial root wave filter/part wave filter continuation training includes:Using hidden variable SVMs to the initial root wave filter/
Part wave filter carries out the optimization of gravity treatment positive sample, data mining and stochastic gradient descent method.
13. object detection methods as claimed in claim 1, it is characterised in that obtain the candidate on target location described
After window, before the determination target location, also include:
Non- extreme value is carried out to the candidate window and suppresses operation.
A kind of 14. object detecting devices, it is characterised in that including:Sample training unit and object searching unit;Wherein:
Sample training unit, is suitable to the root wave filter of training objective and multiple part wave filters, obtains the root filtering on target
The sample of device and the sample of all parts wave filter;
Object searching unit, the mode for being suitable for use with the distorted pattern based on part and cascade detection is scanned for, and determines target
Position;
The object searching unit includes:Response computation subunit, waterfall sequence determination subelement, threshold calculations subelement,
Response adds up subelement and target location determination subelement;Wherein:
Response computation subunit, is suitable to calculate the described response of the sample of wave filter of training, calculates each of training
The response of the sample of the part wave filter;
Waterfall sequence determination subelement, is adapted to determine that waterfall sequence;
Threshold calculations subelement, is suitable to calculate threshold value, the threshold of approximate positive sample pruning assumed the threshold value pruned, deformation and prune
The threshold value that value and approximate negative sample are pruned;
Response adds up subelement, is suitable to according to the waterfall sequence, and add up the described response of the sample of wave filter successively
With the response of the sample of part wave filter each described, the candidate window on target location is obtained;Added up successively described
During the response of the sample of the described response of the sample of wave filter and each part wave filter, according to described
The threshold value that the threshold value and approximate negative sample that approximate positive sample is pruned are pruned carries out approximate positive sample pruning to the response after adding up
Pruned with approximate negative sample;
Target location determination subelement, is suitable to, according to the candidate window on target location, determine target location.
15. object detecting devices as claimed in claim 14, it is characterised in that the threshold calculations subelement calculates hypothesis
The threshold value of threshold value, the threshold value that approximate positive sample is pruned and the pruning of approximate negative sample that the threshold value of pruning, deformation are pruned includes:
The threshold value for assuming to prune is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response image, P
It is unit response image, D is deformation cost image.
16. object detecting devices as claimed in claim 14, it is characterised in that the threshold calculations subelement calculates hypothesis
The threshold value of threshold value, the threshold value that approximate positive sample is pruned and the pruning of approximate negative sample that the threshold value of pruning, deformation are pruned includes:
The threshold value that deformation is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and R is root response image, P
It is unit response image, D is deformation cost image.
17. object detecting devices as claimed in claim 14, it is characterised in that the threshold calculations subelement calculates hypothesis
The threshold value of threshold value, the threshold value that approximate positive sample is pruned and the pruning of approximate negative sample that the threshold value of pruning, deformation are pruned includes:
The threshold value that approximate positive sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel point, p '
It is any pixel point in neighborhood, N (p) is current pixel neighborhood of a point, and S is response image.
18. object detecting devices as claimed in claim 14, it is characterised in that the threshold calculations subelement calculates hypothesis
The threshold value of threshold value, the threshold value that approximate positive sample is pruned and the pruning of approximate negative sample that the threshold value of pruning, deformation are pruned includes:
The threshold value that approximate negative sample is pruned is calculated using below equation:
Wherein, q ∈ { 1,2 ..., Q } are the phase index value of cascade detection, and Ω is training sample set, and p is current pixel point, p '
It is any pixel point in neighborhood, N (p) is current pixel neighborhood of a point, and S is response image.
19. object detecting devices as claimed in claim 14, it is characterised in that the waterfall sequence determination subelement determines level
Connection order be:Determine waterfall sequence using greedy algorithm.
20. object detecting devices as claimed in claim 14, it is characterised in that the threshold calculations subelement calculates hypothesis
The threshold value that the threshold value and approximate negative sample that threshold value that the threshold value of pruning, deformation are pruned, approximate positive sample are pruned are pruned is:According to general
The approximate correct principle of rate calculates the threshold value assuming the threshold value pruned, deformation and prune, the threshold value that approximate positive sample is pruned and approximate
The threshold value that negative sample is pruned.
21. object detecting devices as claimed in claim 14, it is characterised in that the cumulative subelement of the response is according to described
Waterfall sequence, the response of the sample of the response of the cumulative described sample of wave filter and the part wave filter, obtains successively
Include to the candidate window on target location:
Step a), according to the waterfall sequence, adds up each successively on the basis of the described response of the sample of wave filter
The response of the sample of part wave filter;
Step b) is pruned after the response of the sample of cumulative part wave filter according to the threshold value for assuming to prune, deformation
Threshold value, the threshold value pruned of the threshold value pruned of approximate positive sample and approximate negative sample carries out hypothesis and repaiies to the response after adding up
Cut, deform pruning, the pruning of approximate positive sample and approximate negative sample pruning;
Repeat the above steps a) to b), until the response of the sample of all parts wave filter that added up, obtains on target position
The candidate window put.
22. object detecting devices as claimed in claim 14, it is characterised in that the cumulative subelement of the response is according to described
The threshold value that the threshold value and approximate negative sample that approximate positive sample is pruned are pruned carries out approximate positive sample pruning to the response after adding up
Being pruned with approximate negative sample includes:
Approximate positive sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is current
The response of pixel, TpqIt is q-th threshold value of approximate positive sample pruning, prune represents cut operation.
23. object detecting devices as claimed in claim 14, it is characterised in that the cumulative subelement of the response is according to described
The threshold value that the threshold value and approximate negative sample that approximate positive sample is pruned are pruned carries out approximate positive sample pruning to the response after adding up
Being pruned with approximate negative sample includes:
Approximate negative sample pruning is carried out using below equation:
Wherein, p is current pixel point, and N (p) is current pixel neighborhood of a point, and p ' is any pixel point in neighborhood, and S (p) is current
The response of pixel, TnqIt is q-th threshold value of approximate negative sample pruning, prune represents cut operation.
24. object detecting devices as claimed in claim 14, it is characterised in that the root of the sample training module training target
Wave filter and multiple part wave filters, obtain the sample of the root wave filter on target and the sample bag of all parts wave filter
Include:For root wave filter/each part wave filter,
Initial root wave filter/part wave filter is trained using the SVMs of standard;
The initial root wave filter/part wave filter is continued using hidden variable SVMs train, iteration is obtained afterwards several times
To the sample of root wave filter/part wave filter.
25. object detecting devices as claimed in claim 24, it is characterised in that the use hidden variable SVMs is to institute
Stating initial root wave filter/part wave filter continuation training includes:Using hidden variable SVMs to the initial root wave filter/
Part wave filter carries out the optimization of gravity treatment positive sample, data mining and stochastic gradient descent method.
26. object detecting devices as claimed in claim 14, it is characterised in that the object searching unit also includes:
Non- extreme value suppresses subelement, be suitable to it is described obtain the candidate window on target location after, in the determination target
Before position, non-extreme value is carried out to the candidate window and suppresses operation.
27. a kind of mobile terminals, it is characterised in that including the object detecting device any one of claim 14 to 26.
28. mobile terminals as claimed in claim 27, it is characterised in that the mobile terminal is smart mobile phone or flat board electricity
Brain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510893620.7A CN106815595A (en) | 2015-11-27 | 2015-11-27 | Mobile terminal and its object detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510893620.7A CN106815595A (en) | 2015-11-27 | 2015-11-27 | Mobile terminal and its object detection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106815595A true CN106815595A (en) | 2017-06-09 |
Family
ID=59106393
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510893620.7A Pending CN106815595A (en) | 2015-11-27 | 2015-11-27 | Mobile terminal and its object detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106815595A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368861A (en) * | 2018-12-25 | 2020-07-03 | 杭州海康威视数字技术股份有限公司 | Method and apparatus for determining sub-component order in image object detection process |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102842045A (en) * | 2012-08-03 | 2012-12-26 | 华侨大学 | Pedestrian detection method based on combined features |
CN103886589A (en) * | 2014-02-27 | 2014-06-25 | 四川农业大学 | Goal-oriented automatic high-precision edge extraction method |
CN103903013A (en) * | 2014-04-15 | 2014-07-02 | 复旦大学 | Optimization algorithm of unmarked flat object recognition |
-
2015
- 2015-11-27 CN CN201510893620.7A patent/CN106815595A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102842045A (en) * | 2012-08-03 | 2012-12-26 | 华侨大学 | Pedestrian detection method based on combined features |
CN103886589A (en) * | 2014-02-27 | 2014-06-25 | 四川农业大学 | Goal-oriented automatic high-precision edge extraction method |
CN103903013A (en) * | 2014-04-15 | 2014-07-02 | 复旦大学 | Optimization algorithm of unmarked flat object recognition |
Non-Patent Citations (2)
Title |
---|
JUNJIE YAN等: "The Fastest Deformable Part Model for Object Detection", 《2014 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION》 * |
PEDRO F. FELZENSZWALB等: "Cascade Object Detection with Deformable Part Models", 《2010 IEEE COMPUTER SOCIETY CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368861A (en) * | 2018-12-25 | 2020-07-03 | 杭州海康威视数字技术股份有限公司 | Method and apparatus for determining sub-component order in image object detection process |
CN111368861B (en) * | 2018-12-25 | 2023-05-09 | 杭州海康威视数字技术股份有限公司 | Method and device for determining the sequence of sub-components in an image object detection process |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Thai et al. | Image classification using support vector machine and artificial neural network | |
CN108470320B (en) | Image stylization method and system based on CNN | |
CN104700099B (en) | The method and apparatus for recognizing traffic sign | |
CN112733822B (en) | End-to-end text detection and identification method | |
CN107563433B (en) | Infrared small target detection method based on convolutional neural network | |
CN106778835A (en) | The airport target by using remote sensing image recognition methods of fusion scene information and depth characteristic | |
CN111079739B (en) | Multi-scale attention feature detection method | |
CN107229904A (en) | A kind of object detection and recognition method based on deep learning | |
CN106022363B (en) | A kind of Chinese text recognition methods suitable under natural scene | |
CN106682569A (en) | Fast traffic signboard recognition method based on convolution neural network | |
CN110309842B (en) | Object detection method and device based on convolutional neural network | |
CN108062543A (en) | A kind of face recognition method and device | |
CN110991444B (en) | License plate recognition method and device for complex scene | |
CN104268593A (en) | Multiple-sparse-representation face recognition method for solving small sample size problem | |
CN103824090B (en) | Adaptive face low-level feature selection method and face attribute recognition method | |
CN109785344A (en) | The remote sensing image segmentation method of binary channel residual error network based on feature recalibration | |
CN103778436B (en) | A kind of pedestrian's attitude detecting method based on image procossing | |
CN103927531A (en) | Human face recognition method based on local binary value and PSO BP neural network | |
CN112766229B (en) | Human face point cloud image intelligent identification system and method based on attention mechanism | |
CN104298974A (en) | Human body behavior recognition method based on depth video sequence | |
CN104239902A (en) | Hyper-spectral image classification method based on non-local similarity and sparse coding | |
CN107301376A (en) | A kind of pedestrian detection method stimulated based on deep learning multilayer | |
CN107944354A (en) | A kind of vehicle checking method based on deep learning | |
CN103927555B (en) | Static manual alphabet identifying system and method based on Kinect sensor | |
CN107301643A (en) | Well-marked target detection method based on robust rarefaction representation Yu Laplce's regular terms |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170609 |
|
RJ01 | Rejection of invention patent application after publication |