// image output
qsort(selected_detections, selected_detections_num, sizeof(*selected_detections), compare_by_probs);
//添加需要计数的标签
int count_Headup = 0;
int count_Headdown = 0;
int count_Computer = 0;
for (i = 0; i < selected_detections_num; ++i) {
int width = im.h * .002;
if (width < 1)
width = 1;
int offset = selected_detections[i].best_class * 123457 % classes;
float red = get_color(2, offset, classes);
float green = get_color(1, offset, classes);
float blue = get_color(0, offset, classes);
float rgb[3];
//width = prob*20+2;
rgb[0] = red;
rgb[1] = green;
rgb[2] = blue;
box b = selected_detections[i].det.bbox
yolov4对检测出来的标签计数(多个类别的标签)
最新推荐文章于 2024-07-07 21:26:44 发布
本文详细探讨了如何使用YoloV4在目标检测中对多个类别的标签进行计数,深入解析了在机器学习和深度学习框架下,特别是在C++和C语言实现中,如何处理并统计不同类别目标的数量。通过理解神经网络的输出,建立有效的计数策略,以优化目标检测的后处理步骤。
摘要由CSDN通过智能技术生成