Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.

Error when convert onnx to openvino

Nguyen__Son
Beginner
229 Views

 

 

 

 

 

 

 

 

I'm running human pose estimation experiments from source code(https://github.com/opencv/openvino_training_extensions/blob/develop/pytorch_toolkit/human_pose_estimation/README_single.md).

I trained according to the author's instructions. The process of converting to onnx format also has no errors. However, when converting from onnx to openvino format, the following error occurs:

> Unexpected exception happened during extracting attributes for node 386.
Original exception message: Upsample mode bilinear for node 387 is not supported. Only nearest is supported.

> %387 : Float(1, 290, 16, 16) = onnx::Upsample[mode="bilinear"](%385, %386), scope: SinglePersonPoseEstimationWithMobileNet/RefinementStage/Sequential[trunk]/UShapedContextBlock[0]

I think the error is in the following code:
`        d2 = self.decoder2(torch.cat([e1, F.interpolate(e2, size=(16, 16),
                                                        mode='bilinear', align_corners=False)], 1))`
`        d1 = self.decoder1(torch.cat([x, F.interpolate(d2, size=(32, 32),
                                                       mode='bilinear', align_corners=False)], 1))`

I changed mode to `nearest` but Pytorch support only: `linear`, `bilinear`, `trilinear`.

0 Kudos
1 Reply
Shubha_R_Intel
Employee
229 Views

Dear Nguyen, Son,

We have made some fixes to ONNX upsample in OpenVIno 2019R2. However bilinear mode is not supported, as you've observed. This github post also discusses the same issue.

I have filed a feature request to include bilinear mode to ONNX Upsample.

Sorry for the inconvenience !

Shubha

 

Reply