YOLOv5 target counting | Draw counting results on the picture

Please add image description
Please add image description


Modification method:

Just need to changedetect.py

for path, im, im0s, vid_cap, s in dataset:Add a new line belowclass_counts = {}

Insert image description here

class_counts[int(c)] = class_counts.get(int(c

Guess you like

Origin blog.csdn.net/weixin_43694096/article/details/135197205