CommonUtility.h 603 Bytes
Newer Older
Your Name's avatar
Your Name committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 常用工具

#ifndef __COMMON_UTILITY_H__
#define __COMMON_UTILITY_H__

#include <mutex>
#include <string>
#include <vector>
#include <CommonDefinition.h>

using namespace std;

namespace migraphxSamples
{

// 分割字符串
std::vector<std::string> SplitString(std::string str,std::string separator);

// 排序规则: 按照置信度或者按照面积排序
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