oreo-lp / alphapose_trt Goto Github PK
View Code? Open in Web Editor NEW基于AlphaPose的TensorRT加速
License: Other
基于AlphaPose的TensorRT加速
License: Other
你好,可以重新上传一下百度网盘的链接么
make[1]: *** No rule to make target 'obj/AppBasic.o', needed by 'AppBasic'. Stop.
你好,我在用python darknet2onnx.py --cfg ./detector/yolo/cfg/yolov3-spp.cfg --weight ./detector/yolo/data/yolov3-spp.weights
的时候报错了,能不能帮我看下
Hi, oreo-lp
I have compiled plugins as you guided. But when I convert an onnx model to tensorrt, it meets the problem.
I used two plugins "scatterND" and "GridSampler". But maybe only one is recognized. Can you tell me how to solve this?
`
/usr/src/tensorrt/bin/trtexec --onnx=adcp_1248_384_dynamic.onnx --saveEngine=adcp_engine.trt --explicitBatch --plugins=/home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/GridSamplerPlugin.so --plugins=/home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/ScatterND.so
[10/25/2021-19:44:29] [I] [TRT] builtin_op_importers.cpp:3676: Successfully created plugin: ScatterND
[10/25/2021-19:44:29] [I] [TRT] ModelImporter.cpp:135: No importer registered for op: GridSampler. Attempting to import as plugin.
[10/25/2021-19:44:29] [I] [TRT] builtin_op_importers.cpp:3659: Searching for plugin: GridSampler, plugin_version: 1, plugin_namespace:
[10/25/2021-19:44:29] [E] [TRT] INVALID_ARGUMENT: getPluginCreator could not find plugin GridSampler version 1
ERROR: builtin_op_importers.cpp:3661 In function importFallbackPluginImporter:
[8] Assertion failed: creator && "Plugin not found, are the plugin name, version, and namespace correct?"
[10/25/2021-19:44:29] [E] Failed to parse onnx file
[10/25/2021-19:44:29] [E] Parsing model failed
[10/25/2021-19:44:29] [E] Engine creation failed
[10/25/2021-19:44:29] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec # /usr/src/tensorrt/bin/trtexec --onnx=adcp_1248_384_dynamic.onnx --saveEngine=adcp_engine.trt --explicitBatch --plugins=/home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/GridSamplerPlugin.so --plugins=/home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/ScatterND.so
`
您好:
看了您的转换,很厉害,如果我直接在alphapose代码中导出yolov3-spp加了convcat等操作报错,请帮忙指导一下
def load_yolo_model(args):
print('loading yolo model ...')
det_model = Darknet("yolo/cfg/yolov3-spp.cfg")
det_model.load_weights('models/yolo/yolov3-spp.weights')
det_model.net_info['height'] = args.inp_dim
det_inp_dim = int(det_model.net_info['height'])
assert det_inp_dim % 32 == 0
assert det_inp_dim > 32
det_model.cuda()
det_model.eval()
dummy_input = torch.randn(1, 3, 608, 608, device='cuda')
torch.onnx.export(det_model, dummy_input, './yolov3-spp-cat.onnx', verbose=True, opset_version=11)
报错:
Loading pose model from ./models/sppe/duc_se.pth
loading yolo model ...
/home/trq/wanda/AlphaPose_wanda/yolo/util.py:53: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
grid_len = np.arange(grid_size)
/home/trq/wanda/AlphaPose_wanda/yolo/util.py:53: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
grid_len = np.arange(grid_size)
/home/trq/wanda/AlphaPose_wanda/yolo/util.py:68: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
anchors = torch.FloatTensor(anchors)
Traceback (most recent call last):
File "/home/trq/wanda/AlphaPose_wanda/demo.py", line 191, in
Pose_model=Pose(opt)
File "/home/trq/wanda/AlphaPose_wanda/demo.py", line 61, in init
self.det_model,self.det_inp_dim=load_yolo_model(self.args)
File "/home/trq/wanda/AlphaPose_wanda/demo.py", line 48, in load_yolo_model
torch.onnx.export(det_model, dummy_input, './yolov3-spp-cat.onnx', verbose=True, opset_version=11)
File "/home/trq/anaconda3/lib/python3.6/site-packages/torch/onnx/init.py", line 230, in export
custom_opsets, enable_onnx_checker, use_external_data_format)
File "/home/trq/anaconda3/lib/python3.6/site-packages/torch/onnx/utils.py", line 91, in export
use_external_data_format=use_external_data_format)
File "/home/trq/anaconda3/lib/python3.6/site-packages/torch/onnx/utils.py", line 639, in _export
dynamic_axes=dynamic_axes)
File "/home/trq/anaconda3/lib/python3.6/site-packages/torch/onnx/utils.py", line 450, in _model_to_graph
_export_onnx_opset_version)
RuntimeError: Tensors must have same number of dimensions: got 2 and 1
Hello, Thanks in advance for sharing the method of alphapose acceleration. I follow the repo and get the trt engine successfully. However, when I use the trt engine for the real pictures, the engine does not work. would you encount similar problems?
the red points are the result of torch model, the green ones are from trt engine, fp32 and fp16 has the same issue.
你好。
我在你的代码中将this repository 下的plugins文件夹以及Makifile文件已经放到当前目录下,之后make Makefile中出现了以下报错:
make: 对“Makefile”无需做任何事。
之后经过代码查看,发现build文件中貌似需要一些文件,请问需要什么文件?
您好,我不太明白这个库如何安装使用,我是git clone alphapose 源码,基于这个源码进行搭建环境(python3.6,torch1.1),还是先搭建python3.8.5 ,torch1.8.1 ,再git alphapose 源码进行编译alphapose。我使用python3.8.5 torch1.8.1,编译alphapose没有成功,使用python3.6 torch1.1 可以成功但是运行时候出现问题#6的错误,希望您指点一下,谢谢
When I use this command line ,
python pytorch2onnx.py --cfg ./configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint ./pretrained_models/fast_res50_256x192.pth
I can not found pytorch2onnx.py in this repositor,did you forget to upload this file?
I am using your repo. But I don't know how to build ScatterND.so of tensorrt 7.2. Do you have any specific instructions? Thanks very much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.