给输出框编号

给输出框编号

rect_id = 1
for *xyxy, conf, cls in reversed(det):

    label = f'{names[int(cls)]} {rect_id}'
    plot_one_box(xyxy, im0, label=label, color=colors[int(cls)], line_thickness=3)

    rect_id=rect_id+1

 

 

#####################

posted @ 2022-05-13 17:04  西北逍遥  阅读(50)  评论(0编辑  收藏  举报