libeblearntools
ebl::bootstrapping< T, Tstate > Class Template Reference

A class for driven sample extraction for retraining. More...

#include <bootstrapping.h>

List of all members.

Public Member Functions

 bootstrapping (configuration &conf)
void fprop (detector< T, Tstate > &detect, string &fname, bool reset=true, double scale=1.0)
void clear ()
 Clears all previous results.
bboxes & get_bbpos ()
 Returns a reference to positive bounding boxes.
bboxes & get_bbneg ()
 Returns a reference to negative bounding boxes.
bboxes & get_bball ()
 Returns a reference to positive+negative bounding boxes.
bboxes & get_gtall ()
 Returns a reference to all groundtruth bounding boxes.
bboxes & get_gtclean ()
 Returns a reference to cleaned up groundtruth bounding boxes.
bboxes & get_gtrest ()
 Returns a reference to rest of cleaned up groundtruth bounding boxes.
svector< midx< T > > & get_pos ()
 Returns a reference to positive samples last extracted.
svector< midx< T > > & get_neg ()
 Returns a reference to negative samples last extracted.
svector< midx< T > > & get_all ()
 Returns a reference to positive+negative samples last extracted.
bool activated ()
 Returns true if configuration variable 'bootstrapping' is set to 1.
bool extract_positives ()
 Returns true if extracting positive samples.
bool groundtruth_found (string &frame_name)
 Returns true if groundtruth exists for frame 'frame_name'.
bool skip_frame (string &frame_name)
intg max_size ()
void save_dataset (svector< midx< T > > &samples, bboxes &bb, string &outdir, idx< ubyte > &classes)
 Save samples into dataset-format files.

Protected Member Functions

string groundtruth_file (string &frame_name)
 Returns groundtruth filename given a frame name.
bboxes load_groundtruth (string &frame_name)
 Load groundtruth based on the image name.
bboxes load_clean_groundtruth (string &frame_name, configuration &conf, bboxes &rest)
bboxes get_positives (mstate< Tstate > &outputs, bboxes &groundtruth, mfidxdim &topleft, mfidxdim &topright, mfidxdim &bottomleft, mfidxdim &bottomright, float matching, float min_context)
bboxes get_negatives (mstate< Tstate > &answers, bboxes &filtered, bboxes &nonfiltered, mfidxdim &topleft, mfidxdim &topright, mfidxdim &bottomleft, mfidxdim &bottomright, float matching, uint nmax, int neg_id, T threshold)
void add_mirrors (svector< midx< T > > &samples, bboxes &boxes)

Protected Attributes

configurationconf
bool silent
string gt_path
 Path of groundtruth files.
bboxes gt_all
 All groundtruth boxes.
bboxes gt_clean
 Cleaned up groundtruth.
bboxes gt_rest
 Remaining of groundtruth after clean up.
bboxes bbpos
 Bounding boxes of positive samples.
bboxes bbneg
 Bounding boxes of negative samples.
bboxes bball
 Bounding boxes of all samples (pos + neg).
svector< midx< T > > spos
 Positive samples extracted for bootstrapping.
svector< midx< T > > sneg
 Negative samples extracted for bootstrapping.
svector< midx< T > > sall
 Positive + negative samples.
string xml_fullname
 Full path of last xml groundtruth.
bool extract_pos
 Extract positive samples or not.
bool extract_neg
 Extract negative samples or not.
bool _activated
intg _max_size
bool neg_gt_only
 Only extract negatives in images with groundtruth.
neg_threshold
 Threshold for negatives extraction.
mfidxdim bbox_scalings
 Scaling bboxes for each scale.
bool mirror_pos
 Mirror positive samples.

Detailed Description

template<typename T, class Tstate = fstate_idx<T>>
class ebl::bootstrapping< T, Tstate >

A class for driven sample extraction for retraining.


Member Function Documentation

template<typename T, class Tstate >
void ebl::bootstrapping< T, Tstate >::add_mirrors ( svector< midx< T > > &  samples,
bboxes &  boxes 
) [protected]

Push mirror versions of all samples and their corresponding boxes at the end of 'samples' and 'boxes'.

template<typename T, class Tstate>
void ebl::bootstrapping< T, Tstate >::fprop ( detector< T, Tstate > &  detect,
string &  fname,
bool  reset = true,
double  scale = 1.0 
)

Extract bootstrapping samples for frame 'fname' into internal buffers. See accessors to retrieve data.

Parameters:
resetIf true, clears previous results, otherwise accumulate.
scaleScale groundtruth boxes by this factor.
template<typename T , class Tstate >
bboxes ebl::bootstrapping< T, Tstate >::load_clean_groundtruth ( string &  frame_name,
configuration conf,
bboxes &  rest 
) [protected]

Load groundtruth based on the image name, and filter it based on various criteria.

template<typename T , class Tstate >
intg ebl::bootstrapping< T, Tstate >::max_size ( )

Returns the maximum number of bootstrapping to be extracted (min of max limit of intg and value of "bootstrapping_max").

template<typename T , class Tstate >
bool ebl::bootstrapping< T, Tstate >::skip_frame ( string &  frame_name)

Returns true if frame 'frame_name' should be ignored, i.e. if bootstrapping is activated, negatives are not extracted and no groundtruth was found for this frame.


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