Dragon - C++ API
A Computation Graph Virtual Machine Based Deep Learning Framework
Functions
dragon::rcnn Namespace Reference

Functions

template<typename T >
IoU (const T A[], const T B[])
 
template<>
void ApplyNMS< float, CPUContext > (const int num_boxes, const int max_keeps, const float thresh, const float *boxes, int64_t *keep_indices, int &num_keep, CPUContext *ctx)
 
template<typename T >
int BBoxTransform (const T dx, const T dy, const T d_log_w, const T d_log_h, const T im_w, const T im_h, const T min_box_w, const T min_box_h, T *bbox)
 
template<typename T >
void BBoxTransform (const T dx, const T dy, const T d_log_w, const T d_log_h, const T im_w, const T im_h, const T im_scale, T *bbox)
 
template<typename T >
void GenerateAnchors (int base_size, const int num_ratios, const int num_scales, const T *ratios, const T *scales, T *anchors)
 
template<typename T >
void GenerateGridAnchors (const int num_proposals, const int num_anchors, const int feat_h, const int feat_w, const int stride, const int base_offset, const T *anchors, const int64_t *indices, T *proposals)
 
template<typename T >
void GenerateGridAnchors (const int num_proposals, const int num_classes, const int num_anchors, const int feat_h, const int feat_w, const int stride, const int base_offset, const T *anchors, const int64_t *indices, T *proposals)
 
template<typename T >
void GenerateSSProposals (const int K, const int num_proposals, const float im_h, const float im_w, const float min_box_h, const float min_box_w, const T *scores, const T *deltas, const int64_t *indices, T *proposals)
 
template<typename T >
void GenerateMSProposals (const int num_candidates, const int num_proposals, const float im_h, const float im_w, const float min_box_h, const float min_box_w, const T *scores, const T *deltas, const int64_t *indices, T *proposals)
 
template<typename T >
void GenerateMCProposals (const int num_proposals, const int num_boxes, const int num_classes, const int im_idx, const float im_h, const float im_w, const float im_scale, const T *scores, const T *deltas, const int64_t *indices, T *proposals)
 
template<typename T >
void SortProposals (const int start, const int end, const int num_top, T *proposals)
 
template<typename T >
void RetrieveRoIs (const int num_rois, const int roi_batch_ind, const T *proposals, const int64_t *roi_indices, T *rois)
 
template<typename T >
int roi_level (const int min_level, const int max_level, const int canonical_level, const int canonical_scale, T *roi)
 
template<typename T >
void CollectRoIs (const int num_rois, const int min_level, const int max_level, const int canonical_level, const int canonical_scale, const T *rois, vector< vec64_t > &roi_bins)
 
template<typename T >
void DistributeRoIs (const vector< vec64_t > &roi_bins, const T *rois, vector< T * > outputs)
 
template<typename T , class Context >
void ApplyNMS (const int num_boxes, const int max_keeps, const T thresh, const T *boxes, int64_t *keep_indices, int &num_keep, Context *ctx)
 

Function Documentation

◆ ApplyNMS()

template<typename T , class Context >
void dragon::rcnn::ApplyNMS ( const int  num_boxes,
const int  max_keeps,
const T  thresh,
const T *  boxes,
int64_t *  keep_indices,
int &  num_keep,
Context *  ctx 
)

◆ ApplyNMS< float, CPUContext >()

template<>
void dragon::rcnn::ApplyNMS< float, CPUContext > ( const int  num_boxes,
const int  max_keeps,
const float  thresh,
const float *  boxes,
int64_t *  keep_indices,
int &  num_keep,
CPUContext ctx 
)

◆ BBoxTransform() [1/2]

template<typename T >
int dragon::rcnn::BBoxTransform ( const T  dx,
const T  dy,
const T  d_log_w,
const T  d_log_h,
const T  im_w,
const T  im_h,
const T  min_box_w,
const T  min_box_h,
T *  bbox 
)
inline

◆ BBoxTransform() [2/2]

template<typename T >
void dragon::rcnn::BBoxTransform ( const T  dx,
const T  dy,
const T  d_log_w,
const T  d_log_h,
const T  im_w,
const T  im_h,
const T  im_scale,
T *  bbox 
)
inline

◆ CollectRoIs()

template<typename T >
void dragon::rcnn::CollectRoIs ( const int  num_rois,
const int  min_level,
const int  max_level,
const int  canonical_level,
const int  canonical_scale,
const T *  rois,
vector< vec64_t > &  roi_bins 
)
inline

◆ DistributeRoIs()

template<typename T >
void dragon::rcnn::DistributeRoIs ( const vector< vec64_t > &  roi_bins,
const T *  rois,
vector< T * >  outputs 
)
inline

◆ GenerateAnchors()

template<typename T >
void dragon::rcnn::GenerateAnchors ( int  base_size,
const int  num_ratios,
const int  num_scales,
const T *  ratios,
const T *  scales,
T *  anchors 
)
inline

◆ GenerateGridAnchors() [1/2]

template<typename T >
void dragon::rcnn::GenerateGridAnchors ( const int  num_proposals,
const int  num_anchors,
const int  feat_h,
const int  feat_w,
const int  stride,
const int  base_offset,
const T *  anchors,
const int64_t *  indices,
T *  proposals 
)
inline

◆ GenerateGridAnchors() [2/2]

template<typename T >
void dragon::rcnn::GenerateGridAnchors ( const int  num_proposals,
const int  num_classes,
const int  num_anchors,
const int  feat_h,
const int  feat_w,
const int  stride,
const int  base_offset,
const T *  anchors,
const int64_t *  indices,
T *  proposals 
)
inline

◆ GenerateMCProposals()

template<typename T >
void dragon::rcnn::GenerateMCProposals ( const int  num_proposals,
const int  num_boxes,
const int  num_classes,
const int  im_idx,
const float  im_h,
const float  im_w,
const float  im_scale,
const T *  scores,
const T *  deltas,
const int64_t *  indices,
T *  proposals 
)

◆ GenerateMSProposals()

template<typename T >
void dragon::rcnn::GenerateMSProposals ( const int  num_candidates,
const int  num_proposals,
const float  im_h,
const float  im_w,
const float  min_box_h,
const float  min_box_w,
const T *  scores,
const T *  deltas,
const int64_t *  indices,
T *  proposals 
)

◆ GenerateSSProposals()

template<typename T >
void dragon::rcnn::GenerateSSProposals ( const int  K,
const int  num_proposals,
const float  im_h,
const float  im_w,
const float  min_box_h,
const float  min_box_w,
const T *  scores,
const T *  deltas,
const int64_t *  indices,
T *  proposals 
)

◆ IoU()

template<typename T >
T dragon::rcnn::IoU ( const T  A[],
const T  B[] 
)

◆ RetrieveRoIs()

template<typename T >
void dragon::rcnn::RetrieveRoIs ( const int  num_rois,
const int  roi_batch_ind,
const T *  proposals,
const int64_t *  roi_indices,
T *  rois 
)
inline

◆ roi_level()

template<typename T >
int dragon::rcnn::roi_level ( const int  min_level,
const int  max_level,
const int  canonical_level,
const int  canonical_scale,
T *  roi 
)
inline

◆ SortProposals()

template<typename T >
void dragon::rcnn::SortProposals ( const int  start,
const int  end,
const int  num_top,
T *  proposals 
)
inline