CN103942565B - Based on the quick object detecting method of iteration two points of cascade classifiers - Google Patents
Based on the quick object detecting method of iteration two points of cascade classifiers Download PDFInfo
- Publication number
- CN103942565B CN103942565B CN201410145293.2A CN201410145293A CN103942565B CN 103942565 B CN103942565 B CN 103942565B CN 201410145293 A CN201410145293 A CN 201410145293A CN 103942565 B CN103942565 B CN 103942565B
- Authority
- CN
- China
- Prior art keywords
- classifier
- cascade
- points
- iteration
- consumption
- 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.)
- Expired - Fee Related
Links
Landscapes
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
所属技术领域Technical field
本发明涉及人机交互、计算机视觉等领域中快速、高效的物体检测方法,特别是涉及采用级联分类器进行物体检测的方法。The invention relates to a fast and efficient object detection method in the fields of human-computer interaction, computer vision, etc., in particular to a method for object detection using cascaded classifiers.
背景技术Background technique
物体检测是计算机视觉中一个十分重要的研究领域,包含人脸检测、行人检测以及车辆检测等,可以广泛地用于人机交互、视频监控以及图像检索等领域。衡量一个物体检测系统好坏的两个主要指标为:检测率和检测速度[1]。一般情况而言,检测率越高意味着检测速度相对较慢,而检测速度越快意味着检测率相对较低。因此,如何权衡二者的利弊一直是物体检测领域一个不可回避的问题。Object detection is a very important research field in computer vision, including face detection, pedestrian detection and vehicle detection, etc. It can be widely used in human-computer interaction, video surveillance and image retrieval and other fields. The two main indicators to measure the quality of an object detection system are: detection rate and detection speed [1]. Generally speaking, a higher detection rate means a relatively slow detection speed, and a faster detection speed means a relatively low detection rate. Therefore, how to weigh the pros and cons of the two has always been an unavoidable problem in the field of object detection.
近年来,随着智能手机、可穿戴式设备的发展,基于移动设备的物体检测逐渐发展起来。但是,由于存在计算能力相对较弱、电池电量相对较少等局限,移动设备对物体检测系统的实时性提出了更加苛刻地要求。因此,本发明主要研究如何在保持检测率不变的情况下提高检测速度。In recent years, with the development of smartphones and wearable devices, object detection based on mobile devices has gradually developed. However, due to limitations such as relatively weak computing power and relatively low battery power, mobile devices impose more stringent requirements on the real-time performance of object detection systems. Therefore, the present invention mainly studies how to improve the detection speed while keeping the detection rate unchanged.
物体检测主要包含特征提取、窗口生成以及分类器判定等三个方面。其中,分类器判定占据了物体检测大部分时间。研究人员在基于级联结构的分类器设计方面做了许多相关工作,试图通过优化级联分类器的结构来减少分类器判定的时间,进而加快物体检测的速度。Object detection mainly includes three aspects: feature extraction, window generation, and classifier judgment. Among them, the classifier decision occupies most of the object detection time. Researchers have done a lot of related work on the design of classifiers based on cascade structure, trying to reduce the time of classifier judgment by optimizing the structure of cascade classifiers, thereby speeding up the speed of object detection.
当前,大部分已存在级联分类器学习方法都属于基于检测率和虚检率的级联分类器学习方法,简称为DF-guided方法。2004年Viola和Jones[2]发现结构相对简单的Boosted分类器在保证正例窗口全部通过的前提下能够拒绝大部分的负例窗口。他们利用这一特性将总检测目标平均分配给每一级分类器,即指定每一级分类器的检测率和虚检率,由此训练得到一个级联分类器。这种方法被称为传统级联分类器学习方法。由于前几级分类器仅由少量的弱分类器构成便能够提前拒绝大部分的负例窗口,因此,这种级联结构的分类器大大地加快了物体检测的速度。2008年Brubaker等人[3]利用不同级之间弱分类器之间存在一定冗余这一特性,提出后一级分类器可利用前一级分类器的得分继续训练得到。这种方法被称为循环利用级联分类器方法。由于重复利用前一级分类器的信息,相对于传统级联分类器,循环利用级联分类器减少了每一级分类器中的弱分类器个数,进而进一步加快了检测速度。2005年Bourdev和Brandt[4]提出了soft-Cascade。该方法训练一级长度为T强分类器,并为强分类器中每一个弱分类器设定一个阈值,这样就形成了一个长度为T的级联分类器。若一个窗口通过前t个弱分类器的得分之和低于第t个弱分类器的阈值就会被立即拒绝。该方法减少级联分类器中弱分类器总数,通过适当的设置每一级弱分类器的阈值能够在检测率基本保持不变的情况下加快检测速度。以上几种方法都是基于如何减少每一级中弱分类的总数以及如何更早地拒绝负例窗口的思想提出的。虽然它们在一定的程度上提高了检测速度,但是这些方法没有从根本上解决如何设定级联分类器的级数、如何分配每一级分类器的检测率和虚检率以及如何最小化计算消耗量等问题。At present, most of the existing cascade classifier learning methods belong to the cascade classifier learning method based on detection rate and false detection rate, which is called DF-guided method for short. In 2004, Viola and Jones [2] found that the Boosted classifier with a relatively simple structure can reject most of the negative example windows on the premise of ensuring that all positive example windows pass. They use this feature to evenly distribute the total detection target to each classifier, that is, specify the detection rate and false detection rate of each classifier, and thus train a cascade classifier. This approach is known as the traditional cascade classifier learning approach. Since the first few stages of classifiers are only composed of a small number of weak classifiers and can reject most of the negative example windows in advance, the classifiers of this cascaded structure greatly speed up the speed of object detection. In 2008, Brubaker et al. [3] took advantage of the redundancy between weak classifiers at different levels, and proposed that the latter classifier can be continuously trained by using the scores of the previous classifier. This approach is known as the recycling cascade classifier approach. Compared with traditional cascaded classifiers, recycle cascaded classifiers reduces the number of weak classifiers in each classifier due to the reuse of information from previous classifiers, thus further speeding up the detection speed. In 2005, Bourdev and Brandt [4] proposed soft-Cascade. This method trains a strong classifier with a length of T, and sets a threshold for each weak classifier in the strong classifier, thus forming a cascaded classifier with a length of T. If a window passes the sum of the scores of the first t weak classifiers below the threshold of the tth weak classifier, it will be rejected immediately. This method reduces the total number of weak classifiers in cascaded classifiers, and by properly setting the threshold of each level of weak classifiers, the detection speed can be accelerated while the detection rate remains basically unchanged. The above several methods are proposed based on the idea of how to reduce the total number of weak classifications in each level and how to reject the negative window earlier. Although they have improved the detection speed to a certain extent, these methods have not fundamentally solved how to set the number of cascaded classifiers, how to allocate the detection rate and false detection rate of each classifier, and how to minimize the calculation consumption etc.
相对于DF-guided方法,近年来,科研人员开始从最小化计算量的角度出发设计级联分类器。2005年Chen和Yuille[5]从最优化总检测时间的角度出发进行弱分类的选择和级联结构的生成。该方法试探性地设置一个较大的总检测时间并由高到低减小该时间,直到不能够将该时间分配给每一级为止,此时形成的级联分类器便是一种快速、高效的级联分类器。该方法将先前的文字检测的算法[6]加快了2.5倍。2010年Sabrian和Vasconcelos[7]从传统级联分类器设计的过程没有考虑速度最优以及自动设计的角度出发,以联合最优分类误差和计算时间为目标函数,在训练过程中不断迭代增加最能够优化目标函数的弱分类,提出了一种快速级联分类器(即FCBoost)生成方法。该方法在检测速度和检测性能上较传统的级联分类器都有了一定的提升。同样,2012年Chen[8]等人从最优化检测性能和计算速度的角度出发,不断调整弱分类器先后顺序,设计了Cronus级联分类器并取得了不错的效果。以上几种方法都从较低计算复杂度的角度出发进行级联分类器的设计,相对于DF-guided方法,它们在检测速度和检测性能上都取得了不错的效果。但是,大部分方法都存在训练过于复杂和局部贪婪等问题。Compared with the DF-guided method, in recent years, researchers have begun to design cascaded classifiers from the perspective of minimizing the amount of calculation. In 2005, Chen and Yuille [5] selected weak classifications and generated cascade structures from the perspective of optimizing the total detection time. This method tentatively sets a larger total detection time and reduces the time from high to low until the time cannot be allocated to each level. At this time, the cascade classifier formed at this time is a fast, Efficient cascaded classifiers. This method speeds up the previous text detection algorithm [6] by 2.5 times. In 2010, Sabrian and Vasconcelos[7] started from the point of view that the design process of traditional cascaded classifiers did not consider the optimal speed and automatic design, and took the joint optimal classification error and calculation time as the objective function, and iteratively increased the maximum classifier during the training process. Weak classification capable of optimizing the objective function, a fast cascaded classifier (i.e. FCBoost) generation method is proposed. Compared with traditional cascaded classifiers, this method has a certain improvement in detection speed and detection performance. Similarly, in 2012, from the perspective of optimizing detection performance and computing speed, Chen[8] et al. continuously adjusted the sequence of weak classifiers, designed a Cronus cascade classifier and achieved good results. The above methods all design cascade classifiers from the perspective of lower computational complexity. Compared with the DF-guided method, they have achieved good results in detection speed and detection performance. However, most of the methods have problems such as training is too complex and local greedy.
参考文献:references:
[1]G.Gualdi,A.Prati,amdR.Cucchiara.MultistageParticleWindowsforFastandAccurateObjectDetection[J].IEEETranscationsonPatternAnalysisandMachineIntelligence,2012,34(8):1589-1604.[1] G. Gualdi, A. Prati, amd R. Cucchiara. Multistage Particle Windows for Fast and Accurate Object Detection [J]. IEEE Transcationson Pattern Analysis and Machine Intelligence, 2012, 34(8): 1589-1604.
[2]P.ViolaandM.Jones.RobustReal-TimeFaceDetection[J].InternationalJournalofComputerVision,2004,57(2):137-154.[2] P.Viola and M. Jones. Robust Real-Time Face Detection [J]. International Journal of Computer Vision, 2004, 57(2): 137-154.
[3]S.Brubaker,J.Wu,J.Sun,M.Mullin,andJ.Regh.OntheDesignofCascadesofBoostedEnsemblesforFaceDetection[J].InternationalJournalofComputerVision,2008,77(1-3):65-86.[3] S. Brubaker, J. Wu, J. Sun, M. Mullin, and J. Regh. On the Design of Cascades of Boosted Ensembles for Face Detection [J]. International Journal of Computer Vision, 2008, 77 (1-3): 65-86.
[4]L.BourdevandJ.Brandt.RobustObjectDetectionviaSoftCascade[C].InProceedingsofIEEEInternationalconferenceonComputerVisionandPatternRecognition,2005.[4] L. Bourdevand J. Brandt. Robust Object Detection via Soft Cascade [C]. In Proceedings of IEEE International conference on Computer Vision and Pattern Recognition, 2005.
[5]X.ChenandA.Yuille.ATime-EfficientCascadeforReal-TimeObjectDetection:WithApplicationsfortheVisuallyImpaired[C].InProceedingsofIEEEInternationalConferenceonComputerVisionandPatternRecognition,2005.[5] X. Chen and A. Yuille. A Time-Efficient Cascade for Real-Time Object Detection: With Applications for the Visually Impaired [C]. In Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition, 2005.
[6]X.ChenandA.L.Yuille.DetectingandReadingTextinNaturalScenes[C].InProceedingsofIEEEConferenceonComputerVisionandPatternRecognition,2004.[6] X. Chen and A. L. Yuille. Detecting and Reading Text in Natural Scenes [C]. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2004.
[7]M.SaberianandN.Vasconcelos.BoostingClassifierCascades[C].InProceedingsofAdvancesinNeuralInformationProcessingSystems,2010.[7] M. Saberian and N. Vasconcelos. Boosting Classifier Cascades [C]. In Proceedings of Advances in Neural Information Processing Systems, 2010.
[8]M.Chen,Z.Xu,K.Weinberger,O.Chapelle,andD.Kedem.ClassifierCascadeforMinimizingFeatureEvaluationCostMinmin[C].InProceedingsofInternationalConferenceonArtificialIntelligenceandStatistics,2012.[8] M. Chen, Z. Xu, K. Weinberger, O. Chapelle, and D. Kedem. Classifier Cascade for Minimizing Feature Evaluation Cost Minmin [C]. In Proceedings of International Conference on Artificial Intelligence and Statistics, 2012.
发明内容Contents of the invention
本发明的目的是克服现有物体检测过程中级联分类器设计存在训练复杂、局部贪婪等不足,提出了一种快速物体检测方法,本发明提出的物体检测方法,能够在保证物体检测系统的检测性能不变的前提下,通过最小化计算消耗量,实现快速物体检测。本发明的技术方案如下:The purpose of the present invention is to overcome the deficiencies such as complex training and local greed in the design of cascaded classifiers in the existing object detection process, and propose a fast object detection method. The object detection method proposed in the present invention can ensure the accuracy of the object detection system. Under the premise of the same detection performance, fast object detection is realized by minimizing the calculation consumption. Technical scheme of the present invention is as follows:
一种基于迭代二分级联分类器的快速物体检测方法,首先,通过AdaBoost算法得到初始的强分类器;其次,以最小化计算消耗量为目标函数,不断迭代二分初始的强分类,当相邻两次迭代二分过程中分类器的计算消耗量差的绝对值小于给定的阈值时停止迭代,此时二分形成的级联分类器便是一个计算消耗量最小的全局最优级联分类器;最后,利用该级联分类器在图像或视频中进行物体检测。A fast object detection method based on an iterative binary cascade classifier. First, the initial strong classifier is obtained through the AdaBoost algorithm; secondly, with the objective function of minimizing the calculation consumption, the initial strong classification of the two points is continuously iterated. When adjacent Stop the iteration when the absolute value of the difference in the calculation consumption of the classifier during the two iterations of the binary division is less than a given threshold, and the cascade classifier formed by the bisection at this time is a globally optimal cascade classifier with the smallest calculation consumption; Finally, use this cascaded classifier for object detection in images or videos.
具体包括下列步骤:Specifically include the following steps:
步骤1:搜集大量有关检测物体的正例样本和负例样本,并设定训练过程需要达到的性能:检测率和虚检率。Step 1: Collect a large number of positive samples and negative samples about the detected object, and set the performance that needs to be achieved in the training process: detection rate and false detection rate.
步骤2:利用上述的正例样本、负例样本以及检测率和虚检率,使用AdaBoost算法训练得到一个由T个弱分类器构成的初始的强分类器及其分类阈值t,其中,x表示正负例样本,hi(x)表示第i个弱分类器,αi表示第i个弱分类器的权重;Step 2: Using the above positive samples, negative samples, detection rate and false detection rate, use the AdaBoost algorithm to train an initial strong classifier composed of T weak classifiers and its classification threshold t, where x represents positive and negative samples, h i (x) represents the i-th weak classifier, and α i represents the weight of the i-th weak classifier;
步骤3:根据上述的正例样本以及分类阈值t,依次计算强分类器中后T-r个弱分类器的响应值之和的最大值M(r),r=1,...,T-1;然后分别计算强分类器H(x)的分类阈值分类阈值t与各自相应的最大值M(r)之差,得到弱分类器r二分强分类器H(x)时的分类阈值tr,即tr=t-M(r),r=1,...,T-1;Step 3: According to the above positive samples and classification threshold t, sequentially calculate the maximum value M(r) of the sum of the response values of the last Tr weak classifiers in the strong classifier, r=1,...,T-1 ; Then calculate the difference between the classification threshold classification threshold t of the strong classifier H(x) and the corresponding maximum value M(r) respectively, and obtain the classification threshold t r when the weak classifier r dichotomizes the strong classifier H(x), That is, t r =tM(r), r=1,...,T-1;
步骤4:利用上述得到的分类阈值tr,寻求最优的r1,使在第r1个弱分类器处二分强分类器H(x)形成的二级级联分类器的计算消耗量f1最小;Step 4: Use the classification threshold t r obtained above to find the optimal r 1 , so that the calculation consumption f 1 minimum;
步骤5:固定r1,在r1之后寻求一个最优的r2,使在第r2个弱分类器处继续二分H(x)形成的三级级联分类器的计算消耗量f2最小;Step 5: Fix r 1 , seek an optimal r 2 after r 1 , and minimize the calculation consumption f 2 of the three-level cascaded classifier formed by dichotomizing H(x) at the r 2 weak classifier ;
步骤6:a)固定r2,在1到r2范围内更新r1,使三级级联分类器的计算消耗量f2最小;b)固定r1,在r1到T的范围内更新r2,使三级级联分类器的计算消耗量f2最小;c)重复过程a、b,不断迭代更新r1、r2,当二者不再变化时停止迭代更新;Step 6: a) fix r 2 , update r 1 within the range of 1 to r 2 , so as to minimize the calculation consumption f 2 of the three-level cascaded classifier; b) fix r 1 , and update r 1 within the range of r 1 to T r 2 , so that the calculation consumption f 2 of the three-level cascade classifier is the smallest; c) Repeat the process a, b, iteratively update r 1 , r 2 , and stop the iterative update when the two no longer change;
步骤7:固定r1、r2,在r2之后寻找一个最优弱分类器r3,使在第r3个弱分类器处二分形成的四级级联分类器的计算量f3最小;按照步骤6的思想,不断迭代更新r1、r2以及r3,当三者不再变化时停止迭代更新;Step 7: Fix r 1 and r 2 , and find an optimal weak classifier r 3 after r 2 , so as to minimize the calculation amount f 3 of the four-level cascade classifier formed by dichotomizing at the r 3rd weak classifier; According to the idea of step 6, iteratively update r 1 , r 2 and r 3 continuously, and stop the iterative update when the three no longer change;
步骤8:设变量i为3,a)固定之前得到的r1,…,ri,寻求一个最优的ri+1,使在ri+1处二分形成的级联分类器计算消耗量最小,b)按照步骤6的方式不断迭代更新r1,…,ri,ri+1,当相邻两次迭代更新中,r1,…,ri,ri+1都不再发生变化时停止迭代更新;c)若增加ri+1前后的计算消耗量之差的绝对值Δf小于给定阈值Δ时,停止二分H(x),否则将i加1,继续步骤8的过程a;Step 8: Set the variable i to 3, a) fix the previously obtained r 1 ,…,r i , seek an optimal r i+1 , and make the cascade classifier formed by dichotomy at r i+1 calculate the consumption Minimum, b) Continuously iteratively update r 1 ,...,ri ,r i +1 according to step 6. When two adjacent iterations are updated, r 1 ,...,ri ,r i +1 will no longer occur Stop the iterative update when it changes; c) If the absolute value Δf of the difference in calculation consumption before and after increasing r i+1 is less than the given threshold Δ, stop dividing H(x), otherwise, add 1 to i and continue the process of step 8 a;
步骤9:由r1,…,ri二分得到i+1级级联分类器便是一个计算消耗量最小的全局最优级联分类器;Step 9: The cascade classifier of level i+1 obtained by dichotomizing r 1 ,...,r i is a globally optimal cascade classifier with the least computational consumption;
步骤10:利用步骤9得到的级联分类器在图像或视频中进行物体检测。Step 10: Use the cascade classifier obtained in step 9 to perform object detection in images or videos.
其中,步骤4中,寻求最优的r1,使在第r1个弱分类器处二分强分类器H(x)形成的二级级联分类器的计算消耗量f1最小的方法为:其中,p表示负例样本的拒绝率,即被前r个弱分类器拒绝的负例样本个数占负例样本总数的百分比。Among them, in step 4, the method of seeking the optimal r 1 to minimize the calculation consumption f 1 of the second-level cascade classifier formed by the dichotomous strong classifier H(x) at the r 1th weak classifier is: Among them, p represents the rejection rate of negative samples, that is, the percentage of the number of negative samples rejected by the first r weak classifiers to the total number of negative samples.
采用本发明所述方法,通过不断迭代二分原始强分类器H(x)得到的级联分类器是一个基于计算消耗量最小化的全局最优级联分类器。相对于基于传统级联分类器的物体检测方法而言,基于迭代二分级联分类器的物体检测方法有效地减少了平均每个窗口使用的特征个数,进而减少了分类器的计算消耗量、加快物体检测速度。同时,该方法简单,不像传统级联分类器设计方法那样需要设定级联分类器的级数以及分配每一级的检测率和虚检率等。Using the method of the present invention, the cascade classifier obtained by continuously iterating the binary original strong classifier H(x) is a globally optimal cascade classifier based on the minimization of calculation consumption. Compared with the object detection method based on the traditional cascade classifier, the object detection method based on the iterative binary cascade classifier effectively reduces the average number of features used in each window, thereby reducing the computational consumption of the classifier, Speed up object detection. At the same time, the method is simple, unlike the traditional cascade classifier design method, which needs to set the number of cascade classifiers and assign the detection rate and false detection rate of each level.
附图说明Description of drawings
图1是本发明所提方法框图。Fig. 1 is a block diagram of the proposed method of the present invention.
具体实施方式detailed description
下面结合附图和对本发明进行说明:Below in conjunction with accompanying drawing and the present invention is described:
本发明假设所有弱分类有相同的计算量,且都为1。设H(x)为AdaBoost算法训练得到一个强分类器,t表示强分类器的分类阈值,则其可以表示为The present invention assumes that all weak classifications have the same amount of computation, and all of them are 1. Let H(x) be a strong classifier trained by AdaBoost algorithm, and t represents the classification threshold of the strong classifier, then it can be expressed as
其中,x表示检测窗口,hi(x)表示第i个弱分类器,αi表示第i个弱分类器的权重,T表示强分类器中弱分类器的总数。那么,当检测窗口x的响应值H(x)大于给定分类器阈值t时,该窗口便为正例窗口;否则,该窗口为负例窗口。Among them, x represents the detection window, h i (x) represents the i-th weak classifier, α i represents the weight of the i-th weak classifier, and T represents the total number of weak classifiers in the strong classifier. Then, when the response value H(x) of the detection window x is greater than the threshold t of the given classifier, the window is a positive example window; otherwise, the window is a negative example window.
假设H(x)在第r个弱分类器处被二分为HL(x)和HR(x)左右两部分,表示为Assuming that H(x) is divided into two parts at the rth weak classifier, H L (x) and HR (x), it is expressed as
假设我们有大量检测窗口x,那么对于每个弱分类器r,可以计算得到其HR(x,r)的最大值maxHR(x,r),表示为M(r)。Assuming we have a large number of detection windows x, then for each weak classifier r, the maximum value maxH R (x, r) of its HR ( x, r) can be calculated, denoted as M(r).
若一个检测窗口x满足不等式(3)If a detection window x satisfies inequality (3)
HL(x,r)+M(r)≤t,(3)H L (x, r) + M (r) ≤ t, (3)
则该检测窗口x不必计算剩余T-r个弱分类的响应值而直接可以判定为负例窗口。此时,HL(x,r)可以看作一级分类器,其分类阈值为t-M(r),HL(x,r)和HR(x,r)一起看作第二级分类器,其分类阈值为t。若检测窗口通过前r个弱分类器的响应值小于t-M(r),则直接判定为负例窗口;若其前r个弱分类器的响应值大于t-M(r),则该检测窗口需要进一步计算剩余T-r个弱分类的响应值,若这T个弱分类器响应值之和大于分类阈值t,则判定为正例窗口,否则为负例窗口。由此可见,由于前r个弱分类器的拒绝了一部分负例窗口,该二级级联分类器相对于一级强分类器而言减少了计算消耗量,加快了检测速度。Then the detection window x can be directly judged as a negative example window without calculating the response values of the remaining Tr weak classifications. At this time, HL (x, r) can be regarded as a first-level classifier, and its classification threshold is tM ( r ), and HL (x, r) and HR (x, r) can be regarded as a second-level classifier together , and its classification threshold is t. If the response value of the detection window passed by the first r weak classifiers is less than tM(r), it is directly judged as a negative example window; if the response value of the first r weak classifiers is greater than tM(r), the detection window needs further Calculate the response values of the remaining Tr weak classifiers. If the sum of the response values of these T weak classifiers is greater than the classification threshold t, it is judged as a positive window, otherwise it is a negative window. It can be seen that, because the first r weak classifiers reject some negative example windows, compared with the first-level strong classifier, the second-level cascaded classifier reduces the calculation consumption and speeds up the detection speed.
本发明从是否能够更早地用更少的弱分类器来拒绝检测窗口这一思想出发,提出了基于迭代二分级联分类器的快速物体检测方法。该方法以最小化计算消耗量为目标函数,不断迭代二分原始一级强分类器H(x),直到计算消耗量f收敛为止。参见图1,其具体步骤如下:The present invention starts from the idea of whether the detection window can be rejected earlier with fewer weak classifiers, and proposes a fast object detection method based on iterative binary cascading classifiers. In this method, the objective function is to minimize the calculation consumption, and iteratively iterates the binary original one-level strong classifier H(x) until the calculation consumption f converges. Referring to Figure 1, the specific steps are as follows:
步骤1:搜集大量有关检测物体的正例样本和负例样本,并设定训练过程需要达到的性能:检测率和虚检率;Step 1: Collect a large number of positive samples and negative samples about the detected object, and set the performance that needs to be achieved in the training process: detection rate and false detection rate;
步骤2:利用上述的正负例样本以及检测率和虚检率,使用AdaBoost算法训练得到一个由T个弱分类器构成的强分类器及其分类阈值t,其中,x表示正负例样本,hi(x)表示第i个弱分类器,αi表示第i个弱分类器的权重。Step 2: Using the above positive and negative samples, detection rate and false detection rate, use the AdaBoost algorithm to train a strong classifier composed of T weak classifiers and its classification threshold t, where x represents positive and negative samples, h i (x) represents the i-th weak classifier, and α i represents the weight of the i-th weak classifier.
步骤3:根据上述的正例样本集,依次计算强分类器中后T-r个弱分类器的响应值之和的最大值M(r),r=1,...,T-1;然后分别计算强分类器H(x)阈值t与这些最大值M(r)之差,得到弱分类器r二分强分类器H(x)时的分类阈值tr,即tr=t-M(r),r=1,...,T-1。Step 3: According to the above positive sample set, sequentially calculate the maximum value M(r) of the sum of the response values of the last Tr weak classifiers in the strong classifier, r=1,...,T-1; and then respectively Calculate the difference between the threshold t of the strong classifier H(x) and these maximum values M(r), and obtain the classification threshold t r when the weak classifier r dichotomizes the strong classifier H(x), that is, t r =tM(r), r=1,...,T-1.
步骤4:利用上述得到的分类阈值tr,寻求最优的r1,使在第r1个弱分类器处二分强分类器H(x)形成的二级级联分类器的计算消耗量f1最小,即Step 4: Use the classification threshold t r obtained above to find the optimal r 1 , so that the calculation consumption f 1 minimum, i.e.
其中,p表示负例样本的拒绝率,即被前r个弱分类器拒绝的负例样本个数占负例样本总数的百分比。Among them, p represents the rejection rate of negative samples, that is, the percentage of the number of negative samples rejected by the first r weak classifiers to the total number of negative samples.
步骤5:固定r1,在r1之后寻求一个最优的r2,使在第r2个弱分类器处继续二分H(x)形成的三级级联分类器的计算消耗量f2最小。Step 5: Fix r 1 , seek an optimal r 2 after r 1 , and minimize the calculation consumption f 2 of the three-level cascaded classifier formed by dichotomizing H(x) at the r 2 weak classifier .
步骤6:a)固定r2,在1到r2范围内更新r1,使三级级联分类器的计算消耗量f2最小;b)固定r1,在r1到T的范围内更新r2,使三级级联分类器的计算消耗量f2最小;c)重复过程a、b,不断迭代更新r1、r2,当二者不再变化时停止迭代更新。Step 6: a) fix r 2 , update r 1 within the range of 1 to r 2 , so as to minimize the calculation consumption f 2 of the three-level cascaded classifier; b) fix r 1 , and update r 1 within the range of r 1 to T r 2 , to minimize the calculation consumption f 2 of the three-level cascaded classifier; c) Repeat the process a and b, iteratively update r 1 and r 2 , and stop the iterative update when the two no longer change.
步骤7:固定r1、r2,在r2之后寻找一个最优弱分类器r3,使在第r3个弱分类器处二分形成的四级级联分类器的计算量f3最小;按照步骤6的思想,不断迭代更新r1、r2以及r3,当三者不再变化时停止迭代更新;Step 7: Fix r 1 and r 2 , and find an optimal weak classifier r 3 after r 2 , so as to minimize the calculation amount f 3 of the four-level cascade classifier formed by dichotomizing at the r 3rd weak classifier; According to the idea of step 6, iteratively update r 1 , r 2 and r 3 continuously, and stop the iterative update when the three no longer change;
步骤8:设变量i为3,a)固定之前得到的r1,…,ri,寻求一个最优的ri+1,使在ri+1处二分形成的级联分类器计算消耗量最小,b)按照步骤6的方式不断迭代更新r1,…,ri,ri+1,当相邻两次迭代更新中,r1,…,ri,ri+1都不再发生变化时停止迭代更新;c)若增加ri+1前后的计算消耗量之差的绝对值Δf小于给定阈值Δ时,停止二分H(x),否则将i加1,继续步骤8的过程a。Step 8: Set the variable i to 3, a) fix the previously obtained r 1 ,…,r i , seek an optimal r i+1 , and make the cascade classifier formed by dichotomy at r i+1 calculate the consumption Minimum, b) Continuously iteratively update r 1 ,...,ri ,r i +1 according to step 6. When two adjacent iterations are updated, r 1 ,...,ri ,r i +1 will no longer occur Stop the iterative update when it changes; c) If the absolute value Δf of the difference in calculation consumption before and after increasing r i+1 is less than the given threshold Δ, stop dividing H(x), otherwise, add 1 to i and continue the process of step 8 a.
步骤9:由r1,…,ri二分得到i+1级级联分类器便是一个计算消耗量最小的全局最优级联分类器。Step 9: The i+1 level cascade classifier obtained by dichotomizing r 1 ,...,r i is a globally optimal cascade classifier with the least computational consumption.
步骤10:利用步骤9得到的级联分类器在图像或视频中进行物体检测。Step 10: Use the cascade classifier obtained in step 9 to perform object detection in images or videos.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410145293.2A CN103942565B (en) | 2014-04-11 | 2014-04-11 | Based on the quick object detecting method of iteration two points of cascade classifiers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410145293.2A CN103942565B (en) | 2014-04-11 | 2014-04-11 | Based on the quick object detecting method of iteration two points of cascade classifiers |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103942565A CN103942565A (en) | 2014-07-23 |
CN103942565B true CN103942565B (en) | 2016-03-30 |
Family
ID=51190228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410145293.2A Expired - Fee Related CN103942565B (en) | 2014-04-11 | 2014-04-11 | Based on the quick object detecting method of iteration two points of cascade classifiers |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103942565B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102147866A (en) * | 2011-04-20 | 2011-08-10 | 上海交通大学 | Target identification method based on training Adaboost and support vector machine |
CN102163239A (en) * | 2011-05-11 | 2011-08-24 | 中科院成都信息技术有限公司 | Classifier integration method based on floating classification threshold |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7962428B2 (en) * | 2006-11-30 | 2011-06-14 | Siemens Medical Solutions Usa, Inc. | System and method for joint optimization of cascaded classifiers for computer aided detection |
-
2014
- 2014-04-11 CN CN201410145293.2A patent/CN103942565B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102147866A (en) * | 2011-04-20 | 2011-08-10 | 上海交通大学 | Target identification method based on training Adaboost and support vector machine |
CN102163239A (en) * | 2011-05-11 | 2011-08-24 | 中科院成都信息技术有限公司 | Classifier integration method based on floating classification threshold |
Also Published As
Publication number | Publication date |
---|---|
CN103942565A (en) | 2014-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | Gradient harmonized single-stage detector | |
CN111444821B (en) | Automatic identification method for urban road signs | |
Gao et al. | Cascaded boundary regression for temporal action detection | |
CN105488456B (en) | Face Detection Method Based on Adaptive Threshold Adjustment Rejection Subspace Learning | |
CN110097755A (en) | Freeway traffic flow amount state identification method based on deep neural network | |
CN108009509A (en) | Vehicle target detection method | |
WO2016107103A1 (en) | Method and device for recognizing main region of image | |
CN108229550B (en) | Cloud picture classification method based on multi-granularity cascade forest network | |
CN105512640A (en) | Method for acquiring people flow on the basis of video sequence | |
CN104156734A (en) | Fully-autonomous on-line study method based on random fern classifier | |
CN110826558B (en) | Image classification method, computer device, and storage medium | |
CN108804453A (en) | A kind of video and audio recognition methods and device | |
CN104778474A (en) | Classifier construction method for target detection and target detection method | |
CN104598924A (en) | Target matching detection method | |
CN105760472A (en) | Video retrieval method and system | |
Tavallali et al. | An efficient training procedure for viola-jones face detector | |
CN107895379A (en) | The innovatory algorithm of foreground extraction in a kind of video monitoring | |
CN114170426B (en) | A cost-sensitive method for small sample classification of rare tumor categories | |
CN104318208A (en) | Video scene detection method based on graph partitioning and instance learning | |
Liu et al. | Application of gcForest to visual tracking using UAV image sequences | |
CN111241987B (en) | Multi-target model visual tracking method based on cost-sensitive three-branch decision | |
CN108154172A (en) | Image-recognizing method based on three decisions | |
CN109685823B (en) | Target tracking method based on deep forest | |
CN109272036B (en) | Random fern target tracking method based on depth residual error network | |
Zhang et al. | Bus passenger flow statistics algorithm based on deep learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160330 Termination date: 20210411 |