Toybrick

标题: 单目标跟踪siamrpn++模型测试问题 [打印本页]

作者: iamjianliu    时间: 2023-9-11 17:31
标题: 单目标跟踪siamrpn++模型测试问题
请教一下各位大神:
我这边现在在将pysot中的siamrpn++模型转换到RK3588的平台,在转换完成rpn_head.onnx模型后对比rpn_head.rknn和rpn_head.onnx的结果,发现差距比较大。通过调试后发现是rpn_head中的互相关操作结果对不上了,具体函数是
def xcorr_depthwise(x, kernel):
    """depthwise cross correlation
    """
    batch = kernel.size(0)
    channel = kernel.size(1)
    x = x.view(1, batch*channel, x.size(2), x.size(3))
    kernel = kernel.view(batch*channel, 1, kernel.size(2), kernel.size(3))
    out = F.conv2d(x, kernel, groups=batch*channel)
    out = out.view(batch, channel, out.size(2), out.size(3))
    return out


结构图为

具体计算方式为该conv层接收上层的[256,1,5,5]维的数据初始化conv节点中的参数,然后对【1,256,29,29】维的数据进行卷积操作。
请问一下想要实现该计算方式应该如何操作?








欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3