// 常用工具 #ifndef __COMMON_UTILITY_H__ #define __COMMON_UTILITY_H__ #include namespace migraphxSamples { // 排序规则: 按照置信度或者按照面积排序 bool CompareConfidence(const ResultOfDetection &L,const ResultOfDetection &R); bool CompareArea(const ResultOfDetection &L,const ResultOfDetection &R); // 非极大抑制 void NMS(std::vector &detections, float IOUThreshold); } #endif