Closed ZHEQIUSHUI closed 4 years ago
西大普泵,我用qt编译成功了....但是还是没结果唉
只要改动一下CMakeLists.txt就可以编译成动态库,我是为了方便测试才编译成可执行文件的.另外关于没有结果这个问题, 你有更多的信息吗?
我自己在本地测试fp16和fp32都是可以产生正确结果的.大概长这样
我把doInfence里的注释解开了,下面是输出。然后现在用的trt是6.0.1.5 cudnn7.6.3
[2019-12-24 11:28:55.425] [info] create plugin factory
[2019-12-24 11:28:55.425] [info] yolo3 params: class: 1, netSize: 416
[2019-12-24 11:28:55.425] [info] upsample params: scale: 2
[2019-12-24 11:28:55.426] [info] prototxt: /home/arno/lib/openpose/openpose/models/pose/body_25/pose_deploy.prototxt
[2019-12-24 11:28:55.426] [info] caffeModel: /home/arno/lib/openpose/openpose/models/pose/body_25/pose_iter_584000.caffemodel
[2019-12-24 11:28:55.426] [info] engineFile: /home/arno/baidunetdiskdownload/tensorrt-zoo/bin/body_25_fp16.engine
[2019-12-24 11:28:55.426] [info] outputBlobName:
net_output
[2019-12-24 11:28:55.426] [info] deserialize engine from /home/arno/baidunetdiskdownload/tensorrt-zoo/bin/body_25_fp16.engine
[2019-12-24 11:28:57.362] [info] max batch size of deserialized engine: 1
[2019-12-24 11:28:57.363] [info] create execute context and malloc device memory...
[2019-12-24 11:28:57.363] [info] init engine...
[2019-12-24 11:28:57.364] [info] malloc device memory
nbBingdings: 2
[2019-12-24 11:28:57.364] [info] input:
[2019-12-24 11:28:57.364] [info] binding bindIndex: 0, name: image, size in byte: 3072
[2019-12-24 11:28:57.364] [info] binding dims with 3 dimemsion
3 x 16 x 16
[2019-12-24 11:28:57.364] [info] output:
[2019-12-24 11:28:57.364] [info] binding bindIndex: 1, name: net_output, size in byte: 1248
[2019-12-24 11:28:57.364] [info] binding dims with 3 dimemsion
78 x 2 x 2
=====>malloc extra memory for openpose...
heatmap Dims3
heatmap size: 1 78 2 2
allocate heatmap host and divice memory done
resize map size: 1 78 8 8
kernel size: 1 78 8 8
allocate kernel host and device memory done
peaks size: 1 25 128 3
allocate peaks host and device memory done
=====> malloc extra memory done
[2019-12-24 11:28:57.369] [info] net forward takes 4.93421 ms
for (int i =0;i< 10;i++) { std::cout << net_output[i] << " "; }
对应
0.000358858 0.000556114 8.63859e-05 0.000114613 0.00025778 0.000307868 0.000192473 0.000267894 0.00071007 0.00062031
std::cout << std::endl; for(int i=0;i<6080;i++) { std::cout << int(net_output[i]255/25); if((i+1)%80 == 0) { std::cout << std::endl; } }
对应
00000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000001010101000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 number of person: 0
看起来可能有点累眼睛哈....然后我的图片就是
你要修改prototxt里面的
name: "OpenPose - BODY_25"
input: "image"
input_dim: 1 # This value will be defined at runtime
input_dim: 3
input_dim: 480 # This value will be defined at runtime
input_dim: 640 # This value will be defined at runtime
input dim 为480和640,然后删除掉生成的引擎文件,应该可以出来正确的结果.
详细可以参考readme
啊 对不起 我的错 我记得我看了这个的 但是没太在意..太谢谢你啦
我 close啦 再次谢谢你!
我在xavier上试了 yolo是可以的 但是openpose没有结果,所以我又在我的电脑上试了,openpose还是没结果,但是yolo也是一样可以的。难道我用错模型了...
fp16和fp32这两个我都试过了。
我的电脑是2070 cuda10.0
还有一个很尴尬的请求,就是我想在我的qt项目用openpose,但是呢,我不是很懂cu文件在qt怎么编译(其实是完全不懂cuda编程),所以希望如果有空的话能不能把openpose弄成so这样.....当然如果没空就算了叭,我还学得动