image-processing - 检测窗口上的非最大抑制

标签 image-processing object-detection sliding-window

在对象检测文献中,通常使用分类器和滑动窗口方法来检测图像中对象的存在,该方法返回一组检测窗口,并且使用非最大抑制来解决检测重叠问题。

有人可以解释在这些检测窗口上执行非最大抑制的算法吗?

谢谢

最佳答案

引自 http://www.di.ens.fr/willow/events/cvml2012/materials/practical-detection/

Scanning-window style classification of image patches typically results in multiple responses around the target object. A standard practice to deal with this is to remove any detector responses in the neighborhood of detections with the locally maximal confidence score (non-maxima suppression or NMS). NMS is usually applied to all detections in the image with confidence above a certain threshold. Try NMS face detection for different threshold values and in different images:



也在这里 http://www.ens-lyon.fr/LIP/Arenaire/ERVision/detection_exercise_solution.m你可以找到一个可以做所有事情的 matlab 程序 - 检测窗口上的检测和 NMS

对检测窗口进行非最大抑制的代码是
%%%%%%%%%%%%%%% **************************************************************
%%%%%%%%%%%%%%% **************************************************************
%%%%%%%%%%%%%%% *                                                            *
%%%%%%%%%%%%%%% *                       EXERCISE 3:                          *
%%%%%%%%%%%%%%% *                                                            *
%%%%%%%%%%%%%%% *        Non-maxima suppression of multiple responses        *
%%%%%%%%%%%%%%% *                                                            *
%%%%%%%%%%%%%%% **************************************************************
%%%%%%%%%%%%%%% **************************************************************
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% Scanning-window style classification of image patches typically
%%%%%%%%%%%%%%% results in many multiple responses around the target object.
%%%%%%%%%%%%%%% A standard practice to deal with this is to remove any detector
%%%%%%%%%%%%%%% responses in the neighborhood of detections with locally maximal
%%%%%%%%%%%%%%% confidence scores (non-maxima suppression or NMS). NMS is
%%%%%%%%%%%%%%% usually applied to all detections in the image with confidence
%%%%%%%%%%%%%%% above certain threshold.
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% TODO:
%%%%%%%%%%%%%%% 3.1 Try out different threshold values to pre-selected windows
%%%%%%%%%%%%%%%     passed to the NMS stage, see parameter 'confthresh' below.
%%%%%%%%%%%%%%% 3.2 Try out different threshold values for NMS detections,
%%%%%%%%%%%%%%%     see parameter 'confthreshnms'
%%%%%%%%%%%%%%% 3.3 Try detection and with different thresholds for different
%%%%%%%%%%%%%%%     included images: 'img1.jpg', 'img2.jpg', 'img3.jpg', 'img4.jpg'
%%%%%%%%%%%%%%% 
confthresh=0;
indsel=find(conf>confthresh);
[nmsbbox,nmsconf]=prunebboxes(bbox(indsel,:),conf(indsel),0.2);


%%%%%%%%%%%%%%% display detections above threshold after non-max suppression
%%%%%%%%%%%%%%% 
confthreshnms=1;
clf, showimage(img)
indsel=find(nmsconf>confthreshnms);
showbbox(nmsbbox(indsel,:),[1 1 0],regexp(num2str(nmsconf(indsel)'),'\d+\.\d+','match'));
title(sprintf('%d NMS detections above threshold %1.3f',size(nmsbbox,1),confthreshnms),'FontSize',14)
fprintf('press a key...'), pause, fprintf('\n')

您可以在第一个链接中找到所有相关功能。

关于image-processing - 检测窗口上的非最大抑制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15785350/

相关文章:

algorithm - 从散点评估/拟合椭圆

python - 如何广播或矢量化使用 scipy.ndimage map_coordinates 的 2D 数组的线性插值?

python - Numpy where() 创建与定义颜色不同的点

python - 如何获取数组滑动窗口 View 中最大元素的矩阵位置?

sql - SQL Server 中的滑动窗口函数,高级计算

iphone - 从 iPhone(或消费类相机)拍摄深度图像

tensorflow - 如何在tensorboard中看到更多的评估步骤

Tensorflow 对象检测 API RCNN 在 CPU : 1 frame per min 上运行缓慢

c++ - OpenCV - 仅在绘制单应性时打印对象名称

compression - zlib lz77滑动窗口和最大匹配长度