CommonUtility.h 450 Bytes
Newer Older
liucong's avatar
liucong committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 常用工具

#ifndef __COMMON_UTILITY_H__
#define __COMMON_UTILITY_H__

#include <CommonDefinition.h>

namespace migraphxSamples
{

// 排序规则: 按照置信度或者按照面积排序
bool CompareConfidence(const ResultOfDetection &L,const ResultOfDetection &R);
bool CompareArea(const ResultOfDetection &L,const ResultOfDetection &R);

// 非极大抑制
void NMS(std::vector<ResultOfDetection> &detections, float IOUThreshold);

}

#endif