修改方法:
只需要改 detect.py
detect.py
for path, im, im0s, vid_cap, s in dataset: 下新增一行 class_counts = {}
for path, im, im0s, vid_cap, s in dataset:
class_counts = {}
class_counts[int(c)] = class_counts.get(int(c