// 常用工具 #ifndef __COMMON_UTILITY_H__ #define __COMMON_UTILITY_H__ #include #include #include #include using namespace std; namespace migraphxSamples { // 分割字符串 std::vector 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 &detections, float IOUThreshold); } #endif