cw-zero / tensorrt_yolo3 Goto Github PK
View Code? Open in Web Editor NEWuse TensorRT accelerate yolo3
use TensorRT accelerate yolo3
你好,使用你的这个工程的方式helper.make_node(
'Upsample',
mode='nearest',
scales=[1.0, 1.0, 2, 2],
inputs=inputs,
outputs=[layer_name],
name=layer_name,
)
可以得到
onnx::Upsample[mode = 'nearest', scales = [1, 1, 2, 2]]....
但是如果使用:nn.Upsample(scale_factor=2, mode = 'nearest'),这种方式,之后用torch.onnx.export导出方式,只能得到:
onnx::Upsample[mode="nearest"].....
我该如何用导出方式得到还有 scales 属性的onnx::Upsample呢?
python yolov3_to_onnx.py
Layer of type yolo not supported, skipping ONNX node generation.
Layer of type yolo not supported, skipping ONNX node generation.
Layer of type yolo not supported, skipping ONNX node generation.
graph YOLOv3-608 (
%000_net[FLOAT, 64x3x608x608]
) initializers (
%001_convolutional_bn_scale[FLOAT, 32]
%001_convolutional_bn_bias[FLOAT, 32]
你好,请问项目中TensorRT版本用的是4.0还是5.0?
Layer of type yolo not supported, skipping ONNX node generation.
Layer of type yolo not supported, skipping ONNX node generation.
Layer of type yolo not supported, skipping ONNX node generation.
Traceback (most recent call last):
File "yolov3_to_onnx.py", line 672, in
main()
File "yolov3_to_onnx.py", line 660, in main
verbose=True)
File "yolov3_to_onnx.py", line 350, in build_onnx_graph
conv_params)
File "yolov3_to_onnx.py", line 212, in load_conv_weights
conv_params, 'bn', 'bias')
File "yolov3_to_onnx.py", line 261, in _create_param_tensors
param_name, TensorProto.FLOAT, param_data_shape, param_data)
File "/usr/local/lib/python2.7/dist-packages/onnx/helper.py", line 173, in make_tensor
getattr(tensor, field).extend(vals)
File "/usr/lib/python2.7/dist-packages/google/protobuf/internal/containers.py", line 123, in extend
if not elem_seq:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
系统环境ubuntu 16.04
tensorrt版本 5.1
pytorch版本 1.1.0
onnx 版本 1.3.0
硬件1080ti i7 8700k
输入图像608x608
对比主干的时间, 几乎没有差别。
你的时间对比是怎么得来的?
我看你代码中,并没有考虑到预处理的时间
Hi,
first of all, thanks for your great work and share the code.
When I try to run "yolov3_to_onnx.py",
in the beginning, it told me "Layer of type yolo not supported, skipping ONNX node generation
Layer of type yolo not supported, skipping ONNX node generation
Layer of type yolo not supported, skipping ONNX node generation
graph YOLOv3-608(%000_net[FLOAT, 64x3x608x608])......"
when the script go into the end, it told me"check_model(model.SerializeToString()
onnx.onnx_cpp2py_export.checker.ValidationError: Node (086_upsample) has input size 1 not in range [min=2, max=2]."
have you ever meet this issue?
python yolov3_to_onnx.py Error
I don't know how to solve it
whether the sample is the same as the official sample? Have you ever run official sample? I try with
different version of onnx=1.2.1 1.2.2 1.4.1. But all of them raise an error. "layer of type yolo not supported,skipping onnx node generation"
excuse me,I want to input 4 pictures at the same time, instead of testing only one at a time. How do I do this? Thank you
The sample is the same as the official sample. Have you ever run this sample? I try with onnx=1.2.1 1.2.2 1.4.1. But all of them raise an error. "layer of type yolo not supported,skipping onnx node generation"
Hi,
When I was trying to covert yolov3-spp model to onnx, I got the error at "buffer=self.weights_file.read(param_size * 4))" at the end of function of "def _load_one_param_type(self, conv_params, param_category, suffix)"
I use python2.7, and test the code on GTX2080TI,with cuda-10 and tensorrt 5.
have you ever meet this issue?
如题,感觉说明不够完整,希望将相关信息公布一下,谢谢
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.