Toybrick

标题: Caffe mobilenet-ssd 不支持转rknn [打印本页]

作者: ronyuzhang    时间: 2019-3-29 10:18
标题: Caffe mobilenet-ssd 不支持转rknn
训练了一下 https://github.com/chuanqi305/MobileNet-SSD, 但是转rknn模型的时候报错,
E Unsupport input tensor type "None" of layer "output_120".
E Catch exception when building RKNN model!

作者: ronyuzhang    时间: 2019-3-29 10:21
补充错误信息:


W Unhandle status: the input shape of reshape layer mbox_conf_reshape_116 is not 4-D
W Skip blobs of conv0/bn
W Skip blobs of conv0/scale
W Skip blobs of conv1/dw/bn
W Skip blobs of conv1/dw/scale
W Skip blobs of conv1/bn
W Skip blobs of conv1/scale
W Skip blobs of conv2/dw/bn
W Skip blobs of conv2/dw/scale
W Skip blobs of conv2/bn
W Skip blobs of conv2/scale
W Skip blobs of conv3/dw/bn
W Skip blobs of conv3/dw/scale
W Skip blobs of conv3/bn
W Skip blobs of conv3/scale
W Skip blobs of conv4/dw/bn
W Skip blobs of conv4/dw/scale
W Skip blobs of conv4/bn
W Skip blobs of conv4/scale
W Skip blobs of conv5/dw/bn
W Skip blobs of conv5/dw/scale
W Skip blobs of conv5/bn
W Skip blobs of conv5/scale
W Skip blobs of conv6/dw/bn
W Skip blobs of conv6/dw/scale
W Skip blobs of conv6/bn
W Skip blobs of conv6/scale
W Skip blobs of conv7/dw/bn
W Skip blobs of conv7/dw/scale
W Skip blobs of conv7/bn
W Skip blobs of conv7/scale
W Skip blobs of conv8/dw/bn
W Skip blobs of conv8/dw/scale
W Skip blobs of conv8/bn
W Skip blobs of conv8/scale
W Skip blobs of conv9/dw/bn
W Skip blobs of conv9/dw/scale
W Skip blobs of conv9/bn
W Skip blobs of conv9/scale
W Skip blobs of conv10/dw/bn
W Skip blobs of conv10/dw/scale
W Skip blobs of conv10/bn
W Skip blobs of conv10/scale
W Skip blobs of conv11/dw/bn
W Skip blobs of conv11/dw/scale
W Skip blobs of conv11/bn
W Skip blobs of conv11/scale
W Skip blobs of conv12/dw/bn
W Skip blobs of conv12/dw/scale
W Skip blobs of conv12/bn
W Skip blobs of conv12/scale
W Skip blobs of conv13/dw/bn
W Skip blobs of conv13/dw/scale
W Skip blobs of conv13/bn
W Skip blobs of conv13/scale
W Skip blobs of conv14_1/bn
W Skip blobs of conv14_1/scale
W Skip blobs of conv14_2/bn
W Skip blobs of conv14_2/scale
W Skip blobs of conv15_1/bn
W Skip blobs of conv15_1/scale
W Skip blobs of conv15_2/bn
W Skip blobs of conv15_2/scale
W Skip blobs of conv16_1/bn
W Skip blobs of conv16_1/scale
W Skip blobs of conv16_2/bn
W Skip blobs of conv16_2/scale
W Skip blobs of conv17_1/bn
W Skip blobs of conv17_1/scale
W Skip blobs of conv17_2/bn
W Skip blobs of conv17_2/scale
done
--> Building model
E Unsuport input tensor type "None" of layer "output_120".
E Catch exception when building RKNN model!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 459, in rknn.api.rknn_base.RKNNBase.build
T   File "rknn/api/rknn_base.py", line 950, in rknn.api.rknn_base.RKNNBase._quantize
T   File "rknn/base/RKNNlib/app/tensorzone/workspace.py", line 219, in rknn.base.RKNNlib.app.tensorzone.workspace.Workspace.load_net
T   File "rknn/base/RKNNlib/app/tensorzone/graph.py", line 26, in rknn.base.RKNNlib.app.tensorzone.graph.Graph.load_net
T   File "rknn/base/RKNNlib/RKNNnet.py", line 406, in rknn.base.RKNNlib.RKNNnet.RKNNNet.load
T   File "rknn/base/RKNNlib/RKNNnet.py", line 410, in rknn.base.RKNNlib.RKNNnet.RKNNNet.load
T   File "rknn/base/RKNNlib/RKNNnet.py", line 445, in rknn.base.RKNNlib.RKNNnet.RKNNNet.loads
T   File "rknn/base/RKNNlib/layer/RKNNlayer.py", line 150, in rknn.base.RKNNlib.layer.RKNNlayer.RKNNLayer.add_input
T   File "rknn/base/RKNNlib/RKNNlog.py", line 105, in rknn.base.RKNNlib.RKNNlog.RKNNLog.e
T ValueError: Unsuport input tensor type "None" of layer "output_120".
作者: hengk    时间: 2019-4-1 16:40
请问解决没有呀
作者: 771488533    时间: 2019-4-3 16:31
我也遇到这个问题,有人帮忙解决吗
作者: RK3399    时间: 2019-4-17 09:06
我也是,目前测试来看并不支持detectoutput层,但是删除该层仍然有问题,模型转换默认会删除prior box层,输出只有两个loc和conf,看他的例子应该是prior box需要用caffe预先运行出来,然后结合loc和conf自己去算。
作者: RK3399    时间: 2019-4-17 09:10
参考该贴 http://t.rock-chips.com/forum.ph ... &extra=page%3D3
作者: RK3399    时间: 2019-4-18 10:48
我解决了,哈哈,坑太多了
RK3399 Pro 的确不支持detectoutput层,需要删除,模型转换默认也会删除prior box层,输出只有两个loc和conf,prior box需要需要先用caffe预先运行出来,然后结合loc和conf自己去算。
作者: ronyuzhang    时间: 2019-4-18 15:32
RK3399 发表于 2019-4-18 10:48
我解决了,哈哈,坑太多了
RK3399 Pro 的确不支持detectoutput层,需要删除,模型转换默认也会删除prior bo ...

来个教程啊 。
作者: RK3399    时间: 2019-4-18 17:04
有空再写
作者: q5671229    时间: 2019-4-19 11:42
RK3399 发表于 2019-4-18 17:04
有空再写

写个教程吧。。git上贡献一下源码? 搞不定
作者: 771488533    时间: 2019-4-19 13:52
RK3399 发表于 2019-4-18 10:48
我解决了,哈哈,坑太多了
RK3399 Pro 的确不支持detectoutput层,需要删除,模型转换默认也会删除prior bo ...

把 detectoutput层 删除了那还要这模型干嘛。。。
作者: RK3399    时间: 2019-4-19 14:31
771488533 发表于 2019-4-19 13:52
把 detectoutput层 删除了那还要这模型干嘛。。。

detectoutput 删除了,但是可以根据loc, conf , priorbox的运行结果,自己写detectoutput 然后输出正确检测
作者: RK3399    时间: 2019-4-19 15:16
q5671229 发表于 2019-4-19 11:42
写个教程吧。。git上贡献一下源码?   搞不定

可以关注我的仓库
https://github.com/Pinnh/NPU_CaffeSSD
作者: q5671229    时间: 2019-4-19 17:11
RK3399 发表于 2019-4-19 15:16
可以关注我的仓库
https://github.com/Pinnh/NPU_CaffeSSD

谢了,已经抄了
作者: RK3399    时间: 2019-4-19 18:21
q5671229 发表于 2019-4-19 17:11
谢了,已经抄了

记得star哦
作者: lipandeng    时间: 2019-12-26 16:19
RK3399 发表于 2019-4-19 15:16
可以关注我的仓库
https://github.com/Pinnh/NPU_CaffeSSD

你好,按照这个是可以跑通的,推动过程是比较快的但在结合priorbox_flatten计算的时候很慢,是推动的3倍左右,请问有什么好的办法没有
作者: RK用户    时间: 2019-12-26 17:04
lipandeng 发表于 2019-12-26 16:19
你好,按照这个是可以跑通的,推动过程是比较快的但在结合priorbox_flatten计算的时候很慢,是推动的3倍 ...

你的是多少秒,我在板子上跑一帧的推理要130ms ,获取结果要将近4秒
作者: ylc123    时间: 2020-6-2 10:29
RK3399 发表于 2019-4-18 17:04
有空再写

大佬,写个教程呗。搞不定啊




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