Can not convert yolact model to TensorRT

Hi,I’m trying to convert yolact model from this repository and facing number of issues.

Here is my working environment :

  1. pytorch == 1.4.0
  2. TensorRT == 7.0.0(official docker release 20.01)

There are links to yolact model in onnx format version == 9),

The Error is :
UNSUPPORTED_NODE: Assertion failed: scales_input.is_weights() (opset version == 11).
The Error is :
INVALID_GRAPH: Assertion failed: ctx->tensors().count(inputName)

Thank you in advance for your help,


If you build the TensorRT OSS components on top of the 20.01 docker container, you’ll get this error instead which is the real issue:

While parsing node number 410 [Resize]:
ERROR: /mnt/TensorRT/parsers/onnx/builtin_op_importers.cpp:2452 In function importResize:
[8] Assertion failed: (transformationMode == "asymmetric") && "This version of TensorRT only supports asymmetric resize!"
[03/03/2020-06:43:51] [E] Failed to parse onnx file
[03/03/2020-06:43:51] [E] Parsing model failed
[03/03/2020-06:43:51] [E] Engine creation failed
[03/03/2020-06:43:51] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec # trtexec --explicitBatch --onnx=yolact_opset11.onnx

There is a similar post here:

Unfortunately, this type of padding/resize isn’t supported at the moment.

Thanks for prompt reply, what kind of padding/resize supporting in TensorRT ? I’ll adjust my model accordingly.


You can probably refer to this code snippet for guidance:

I’m not sure how this maps exactly from framework -> ONNX. But these statements are comparing against the ops created in the ONNX graph.

This might also help: