![]()
https://github.com/ultralytics/yolov5/issues/242
比如计数人的个数。counting
How to write the detected number of people in the video
At this line, you can find the class and the bounding boxes coordinates.
Line 97 in 0a08375
| for *xyxy, conf, cls in det: |
If you just want to count the num of classes per frame, this line would do as well.
Line 93 in 0a08375
| n = (det[:, -1] == c).sum() # detections per class |
glenn-jocher commented on 5 Oct •
edited
|
@swethabethireddy see python code in detect.py: # Print results
for c in det[:, -1].unique():
n = (det[:, -1] == c).sum() # detections per class
s += '%g %ss, ' % (n, names[int(c)]) # add to string
|
版权声明:本文为CSDN博主「jack_201316888」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u010451780/article/details/109679951
![]()

暂无评论