Open Single430 opened 3 years ago
我遇到了同样的问题,使用opset 11 转onnx -> tensorrt 之后,推理的结果,人脸边界框不准确,关键点也不对。这个啥情况呢?
怀疑是缩放那出了问题
resize_x = round(float(x_size) / float(im_shape[1]), 2)
resize_y = round(float(y_size) / float(im_shape[0]), 3)
改成
resize_x = round(float(x_size) / float(im_shape[1]), 6)
resize_y = round(float(y_size) / float(im_shape[0]), 6)
The inference sample code detect.py
is not clear at all.It seems like does not resize input? It's hard to write own inference code.
The inference sample code
detect.py
is not clear at all.It seems like does not resize input? It's hard to write own inference code.
It just doing torch.Tensor to np.array and to torch.Tensor again and agin.
pytorch版本宽高是同比例缩放的,是否是因为你都缩放成320*320的原因,导致人脸变形检测不准
@biubug6
您好,最近看了您的项目,在过程中遇到一些问题,测试了很多,依旧没有解决
在转成onnx后,我验证了 onnx 的推理结果,发现有些不一样的地方
可以看到box不准,landmark 应该也有问题,由于onnx输入的是固定 320x320 的图像,怀疑是对结果比例回放不对,但是测试了许多次依旧没有解决
onnx推理代码如下