// 常用工具 #ifndef __COMMON_UTILITY_H__ #define __COMMON_UTILITY_H__ #include #include #include #include #include #include #include #include #include using namespace std; namespace migraphxSamples { string GetCurrentTimeString(); std::vector SplitString(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); migraphx::parameter_map CreateParameterMap(migraphx::program & p); } #endif //