Current Issue Cover
基于改进的非极大值抑制算法的目标检测

赵文清,严海,邵绪强(华北电力大学)

摘 要
目的 作为目标检测的后置处理算法,非极大值抑制(Non-Maximum Suppression,NMS)算法被用于移除多余的检测框。然而,NMS算法在每轮迭代中抑制所有与预选取检测框Intersection-over-Union(IoU)值大于给定阈值的检测框,容易造成目标的漏检和误检。此外,阈值的选取对整个算法的效果有着至关重要的影响。方法 针对这个问题,本文提出了改进的NMS算法,分别为分段比例惩罚因子NMS算法和连续比例惩罚因子NMS算法。其中,在连续比例惩罚因子NMS算法中,阈值对算法的运行效果仅有轻微的影响。改进的NMS算法首先根据检测框与预选取检测框的IoU值大小计算出检测框对应的比例惩罚因子;然后将检测框置信度分数乘以比例惩罚因子,通过比例惩罚因子逐轮降低检测框的分数;最后经过多轮迭代后移除分数低于阈值的检测框。结果 基于分段比例惩罚因子NMS算法和连续比例惩罚因子NMS算法的Faster RCNN目标检测模型在PASCAL VOC 2007数据集下,Faster RCNN的检测平均精度均值(mean Average Precision, mAP)相较于传统的NMS算法分别提高了1.5%和1.6%。其中,以火车类为例,当准确率和召回率均为80%时,火车类检测的漏检率和误检率分别降低了1.8%和1.2%。与传统的NMS算法相比,本文所提出的改进的NMS算法可以有效的保留目标检测框和移除目标的假正例检测框,从而降低NMS算法的漏检率和误检率。结论 在时间复杂度相同和运行效率一致的情况下,与传统的NMS算法相比,本文所提出的改进NMS算法mAP值得到了显著的提升,同时本文所提算法为其它目标检测模型提供了一个通用的解决方法。
关键词
Object Detection Based on Improved Non-Maximum Suppression Algorithm

Zhao Wenqing,Yan Hai,Shao Xuqiang(North China Electric Power University,Baoding)

Abstract
Objective Object detection has always been a hot research topic in the field of computer vision, and it is an essential component for security video surveillance system and other computer vision applications. Image recognition which based on Convolutional Neural Network has fulfilled remarkable achievements. A lot of current object detection pipelines on account of the deep learning could be divided into three stages:1)extracts region proposals, 2) classifies and refines each region proposal, 3)removes extra detection boxes that might belong to the same object. NMS is often used in stage 3) as an essential part of object detection and obtains impressive effect. Despite that the NMS algorithm is a core part of object detection, a large number of researches are focused on feature design, classifier design, and object proposals in the past. Surprisingly, there are few studies on NMS algorithms. As a post-processing step of object detection, Non-Maximum Suppression algorithm is used to remove the redundant detection boxes. However, it suppresses all detection boxes which have a higher Intersection-over-Union (IoU) overlap than threshold with pre-selected detection box. It may remove the positive detection box, if the positive detection box is adjacent to pre-selected with a higher IoU value. It may also preserve the negative detection box because the negative detection box with the pre-selected detection box have a lower IoU value. Mean Average Precision would drop as a result of the missing positives and false positives, thus, traditional NMS could also be named as GreedyNMS. Thus it is easy to cause missed detection and false detection.Method To overcome these shortages, this paper proposes an improved NMS algorithm which according to the different IoU value to assign proportional penalty coefficient to reduce detections scores. The improved NMS algorithm are the piecewise proportional penalty factor NMS algorithm and the continuous proportional penalty factor NMS algorithm. The piecewise proportional penalty factor NMS algorithm reduce detection boxes’ scores which has a higher IoU than threshold T and the detection boxes with a IoU less than threshold T keep its original score. After a number of iterations it will remove the detection boxes whose scores are lower than another threshold σ. The performance of this algorithm is still limited by the threshold T. The continuous proportional penalty factor NMS algorithm no longer use threshold T, but directly reduce all detection boxes except detection box with maximum score in each iteration. In the continuous proportional penalty factor NMS algorithm, the threshold has only a slight effect on the performance of the algorithm. The improved NMS algorithm first calculates the proportional penalty factors corresponding to the detection boxes according to the IoU value of the detection boxes with the pre-selection detection box. Then the improved NMS algorithm multiplies the detection boxes confidence scores by the proportional penalty factors, and reduces the detection boxes scores through the proportional penalty factor after many rounds of iteration. At last, after a number of iterations it removes the detection boxes with a score below the threshold. The piecewise proportional penalty factor NMS algorithm and the continuous proportional penalty factor NMS algorithm are used in each iteration in a post-processing step of object detection rather than in Region Proposal Network. Compared with the influence of the threshold in GreedyNMS, the threshold in the continuous proportional penalty factor is less sensitive to the performance of the algorithm. Besides, the computational complexity for the improved NMS algorithm is O(n2) which is the same as GreedyNMS, the n is the number of detection boxes.Result This paper’s experiment is based on Faster RCNN on PASCAL VOC 2007 that has 20 object categories and basic network is VGG16. We train the models on the union set of VOC 2007 trainval and evaluate on VOC 2007 test set. Object detection accuracy is measured by mean Average Precision (mAP). Using the piecewise proportional penalty factor NMS algorithm and the continuous proportional penalty factor NMS algorithm in a basic Faster RCNN, the improved NMS algorithm obtains significant improvements on standard datasets like PASCAL VOC(1.5% for the piecewise proportional penalty factor NMS algorithm and 1.6% for the continuous proportional penalty factor NMS algorithm).When the threshold is 0.3 or 0.4, compared with GreedyNMS, the piecewise proportional penalty factor NMS algorithm has a significant improvement up to 1.5% in mAP. However, the performance of the piecewise proportional penalty factor NMS algorithm is still limited by the selection of the threshold. Therefore, the influence of the threshold on the performance of the algorithm is weakened in the continuous proportional penalty NMS algorithm. Compared with GreedyNMS algorithm, the continuous proportional penalty NMS algorithm obtains a significant improvement up to 1.6% in mAP and the threshold is less sensitive to the performance of the algorithm. when the precision rate and recall rate are both 80%, the missed rate and misdetection rate of train decreased by 1.8% and 1.2% respectively.Conclusion The traditional NMS algorithm is easy to miss the positive detection boxes and preserve the negative detection boxes, this paper proposes an improved NMS algorithm, which is the piecewise proportional penalty NMS algorithm and the continuous proportional penalty NMS algorithm. Compared with the traditional NMS algorithm, the improved NMS algorithm proposed in this paper can effectively preserve the object detection boxes and remove the false positive detection boxes. It also can reduce the missed detection rate and false detection rate of the NMS algorithm. In addition, both the improved NMS algorithm and the traditional NMS algorithm in this paper have the same time complexity and similar operating efficiency. The experiments show that using the improved NMS algorithm presented in this paper, the detection performance of the Faster RCNN has been significantly improved. The next step in this article is to continue to improve the algorithm so that it has better generalization capabilities in a single stage detection model. At the same time, the algorithm is still applicable to other object detection models.
Keywords
QQ在线


订阅号|日报