Coder Social home page Coder Social logo

alphapose_trt's Issues

can't make it

make[1]: *** No rule to make target 'obj/AppBasic.o', needed by 'AppBasic'. Stop.

Issue about plugins when converting onnx to tensorrt

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

&&&& RUNNING 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
[10/25/2021-19:44:21] [I] === Model Options ===
[10/25/2021-19:44:21] [I] Format: ONNX
[10/25/2021-19:44:21] [I] Model: adcp_1248_384_dynamic.onnx
[10/25/2021-19:44:21] [I] Output:
[10/25/2021-19:44:21] [I] === Build Options ===
[10/25/2021-19:44:21] [I] Max batch: explicit
[10/25/2021-19:44:21] [I] Workspace: 16 MB
[10/25/2021-19:44:21] [I] minTiming: 1
[10/25/2021-19:44:21] [I] avgTiming: 8
[10/25/2021-19:44:21] [I] Precision: FP32
[10/25/2021-19:44:21] [I] Calibration:
[10/25/2021-19:44:21] [I] Safe mode: Disabled
[10/25/2021-19:44:21] [I] Save engine: adcp_engine.trt
[10/25/2021-19:44:21] [I] Load engine:
[10/25/2021-19:44:21] [I] Builder Cache: Enabled
[10/25/2021-19:44:21] [I] NVTX verbosity: 0
[10/25/2021-19:44:21] [I] Inputs format: fp32:CHW
[10/25/2021-19:44:21] [I] Outputs format: fp32:CHW
[10/25/2021-19:44:21] [I] Input build shapes: model
[10/25/2021-19:44:21] [I] Input calibration shapes: model
[10/25/2021-19:44:21] [I] === System Options ===
[10/25/2021-19:44:21] [I] Device: 0
[10/25/2021-19:44:21] [I] DLACore:
[10/25/2021-19:44:21] [I] Plugins: /home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/ScatterND.so /home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/GridSamplerPlugin.so
[10/25/2021-19:44:21] [I] === Inference Options ===
[10/25/2021-19:44:21] [I] Batch: Explicit
[10/25/2021-19:44:21] [I] Input inference shapes: model
[10/25/2021-19:44:21] [I] Iterations: 10
[10/25/2021-19:44:21] [I] Duration: 3s (+ 200ms warm up)
[10/25/2021-19:44:21] [I] Sleep time: 0ms
[10/25/2021-19:44:21] [I] Streams: 1
[10/25/2021-19:44:21] [I] ExposeDMA: Disabled
[10/25/2021-19:44:21] [I] Spin-wait: Disabled
[10/25/2021-19:44:21] [I] Multithreading: Disabled
[10/25/2021-19:44:21] [I] CUDA Graph: Disabled
[10/25/2021-19:44:21] [I] Skip inference: Disabled
[10/25/2021-19:44:21] [I] Inputs:
[10/25/2021-19:44:21] [I] === Reporting Options ===
[10/25/2021-19:44:21] [I] Verbose: Disabled
[10/25/2021-19:44:21] [I] Averages: 10 inferences
[10/25/2021-19:44:21] [I] Percentile: 99
[10/25/2021-19:44:21] [I] Dump output: Disabled
[10/25/2021-19:44:21] [I] Profile: Disabled
[10/25/2021-19:44:21] [I] Export timing to JSON file:
[10/25/2021-19:44:21] [I] Export output to JSON file:
[10/25/2021-19:44:21] [I] Export profile to JSON file:
[10/25/2021-19:44:21] [I]
[10/25/2021-19:44:21] [I] Loading supplied plugin library: /home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/ScatterND.so
[10/25/2021-19:44:21] [I] Loading supplied plugin library: /home/nvidia/Project/tensorrt_third/AlphaPose_TRT-master/build/GridSamplerPlugin.so

Input filename: adcp_1248_384_dynamic.onnx
ONNX IR version: 0.0.6
Opset version: 11
Producer name: pytorch
Producer version: 1.6
Domain:
Model version: 0
Doc string:

[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导出onnx

您好:
看了您的转换,很厉害,如果我直接在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

Low accuracy of trt model in demo pictures

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.
Screenshot_20210923_150844

关于步骤由onnx模型生成engine中编译出现的问题

你好。
我在你的代码中将this repository 下的plugins文件夹以及Makifile文件已经放到当前目录下,之后make Makefile中出现了以下报错:
make: 对“Makefile”无需做任何事。
之后经过代码查看,发现build文件中貌似需要一些文件,请问需要什么文件?

关于环境搭建:是使用python3.8.5 还是使用python3.6

您好,我不太明白这个库如何安装使用,我是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的错误,希望您指点一下,谢谢

Can not found pytorch2onnx.py in this repositor

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?

ScatterND.so plugin not found

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.