Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for newer version of onnx for YOLO-v4 #505

Closed
DMLON opened this issue Nov 16, 2021 · 3 comments
Closed

Support for newer version of onnx for YOLO-v4 #505

DMLON opened this issue Nov 16, 2021 · 3 comments

Comments

@DMLON
Copy link

DMLON commented Nov 16, 2021

Hello!
We are trying to build the YOLO v4 model into tensorrt in a RTX 3070. The main issue we are having is that it needs at least TensorRT 7.2 but when installing onnx 1.4.1 says that needs an older version of protobuf compiler.

We are evaluation the possibility of upgrading onnx to a newer version but as you stated on the readme, it needs specifically 1.4.1. Do you have any ideas on how to face the issues of upgrading?

Thanks

@jkjung-avt
Copy link
Owner

The requirement of "onnx==1.4.1" (opset 9) is for implementation of the "Upsample" layers in the DarkNet models. Refer to #202 for more details.

I think there are at least 2 ways that you could solve this problem:

  1. Create a python virtual environment with "onnx==1.4.1", and only use this virtualenv to run "yolo_to_onnx.py". Once you have the ONNX file, you could switch back to your normal environment to build and run the TensorRT engine.

  2. Update the source code to support "Upsample" layers with newer ONNX opset. The most relevant code is here:

    def _make_upsample_node(self, layer_name, layer_dict):

@DMLON
Copy link
Author

DMLON commented Nov 18, 2021

Excelent! The first option worked like a charm. Thanks a lot! Will check the second for later.

@DMLON DMLON closed this as completed Nov 18, 2021
@jkjung-avt
Copy link
Owner

,Refer to: #539 (comment)

I've updated the code to use onnx=1.9.0 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants