dog-qiuqiu / FastestDet

:zap: A newly designed ultra lightweight anchor free target detection algorithm, weight only 250K parameters, reduces the time consumption by 10% compared with yolo-fastest, and the post-processing is simpler
BSD 3-Clause "New" or "Revised" License
776 stars 133 forks source link

导出的onnx输出shape是 float32[1,85,22,22],如何转化成想要的 (x0,y0,x1,y1,class)的结果 #23

Closed iwanglian closed 2 years ago

iwanglian commented 2 years ago

按照说明,转出 onnx的模型,在 https://netron.app/导入查看到,输出是 float32[1,85,22,22] 但看到命令执行得到的结果形如 tensor([0.0814, 0.1866, 0.3560, 0.8782, 0.9012, 0.0000]) tensor([0.5778, 0.4236, 0.9649, 0.8865, 0.8948, 0.0000]) tensor([0.3183, 0.4065, 0.5119, 0.7926, 0.8064, 0.0000]) tensor([0.4625, 0.4142, 0.6451, 0.8280, 0.7805, 0.0000])

这里是如何转化的呢?

iwanglian commented 2 years ago

参考tool.py handle_preds 的实现