- 对检测到的结果进行解析
#----------------------------目标检测*解析字典result-------------------------------------------
from numpy import array
from numpy import float32
res = {'boxes': array([[0., 0.98908037, 122.45497, 51.784943, 495.46906, 479.],
[1., 0.9906026 , 201.24075, 85.98496 , 284.39273, 106.8657]], dtype=float32)}
covers = []
huximos = []
for re in res['boxes']:
print('re',re)
print('re[0]', re[0])
if re[0] == 0:
covers.append(re)
elif re[0] == 1:
huximos.append(re)
print(len(covers))
print(len(huximos))
版权声明:本文为CSDN博主「凡先生的笔」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_46604911/article/details/122439717
暂无评论