libeblearn
ebl::nms Class Reference

#include <nms.h>

Inheritance diagram for ebl::nms:
ebl::voting_nms

List of all members.

Public Member Functions

 nms (float threshold, float max_overlap, float max_hcenter_dist, float max_wcenter_dist, float pre_hfact, float pre_wfact, float post_hfact, float post_wfact, float woverh, std::ostream &out=std::cout, std::ostream &err=std::cerr)
virtual ~nms ()
 Destructor.
virtual void fprop (bboxes &in, bboxes &out)
 Applies nms processing on 'in' boxes and puts results into 'out'.
virtual string describe ()
 Returns a string decribing this nms.

Protected Member Functions

virtual void process (bboxes &in, bboxes &out)
 Apply nms on 'in' into 'out'.
virtual void traditional_nms (bboxes &in, bboxes &out)
void prune_overlap (bboxes &raw_bboxes, bboxes &prune_bboxes, float max_match, bool same_class_only=false, float min_hcenter_dist=0.0, float min_wcenter_dist=0.0, float threshold=0.0, float same_scale_mhd=0.0, float same_scale_mwd=0.0)

Protected Attributes

std::ostream & mout
std::ostream & merr
 output stream.
float threshold
 error output stream.
float max_overlap
 Maximum ratio of overlap authorized.
float max_hcenter_dist
 Max dist to center for matching.
float max_wcenter_dist
 Max dist to center for matching.
float pre_hfact
 Height bbox preprocessing factor.
float pre_wfact
 Width bbox preprocessing factor.
float post_hfact
 Height bbox postprocessing factor.
float post_wfact
 Width bbox postprocessing factor.
float woverh
 Width / height factor.
bool same_class_matching_only
 Only match same classes.

Friends

class voting_nms

Detailed Description

A non-maximum suppression class for suppressing overlapping non-maximum answers in a detection task.


Constructor & Destructor Documentation

ebl::nms::nms ( float  threshold,
float  max_overlap,
float  max_hcenter_dist,
float  max_wcenter_dist,
float  pre_hfact,
float  pre_wfact,
float  post_hfact,
float  post_wfact,
float  woverh,
std::ostream &  out = std::cout,
std::ostream &  err = std::cerr 
)

Construct an NMS that suppresses non-maximum bounding boxes, i.e. retaining only highest confidence boxes among all matching boxes. Matching criterion depends on parameters defined below.

Parameters:
max_overlapBoxes with lower overlap are considered matching.
max_hcenter_distIf distance between center heights of boxes is below this, boxes are considered matching.
max_wcenter_distIf distance between center widths of boxes is below this, boxes are considered matching.
pre_hfactPre-processing height scaling.
pre_wfactPre-processing width scaling.
post_hfactPost-processing height scaling.
post_wfactPost-processing width scaling.
woverhNormalize width to be height * woverh.

Member Function Documentation

void ebl::nms::prune_overlap ( bboxes raw_bboxes,
bboxes prune_bboxes,
float  max_match,
bool  same_class_only = false,
float  min_hcenter_dist = 0.0,
float  min_wcenter_dist = 0.0,
float  threshold = 0.0,
float  same_scale_mhd = 0.0,
float  same_scale_mwd = 0.0 
) [protected]

Prune bounding boxes between scales into prune_bboxes.

Parameters:
same_class_onlyIf true, only classes from the same class can prune each other, otherwise any bb can cancel any other bb.
void ebl::nms::traditional_nms ( bboxes in,
bboxes out 
) [protected, virtual]

A traditional nms, pruning 'matching' boxes and keeping only the one with highest confidence. The matching criterion is based on several factors (see constructor parameters).


Member Data Documentation

float ebl::nms::threshold [protected]

error output stream.

Ignore confidences below threshold.


The documentation for this class was generated from the following files: