Skip to content
Advertisement

OpenVINO API 2.0 cannot read dynamic input batch with YOLOv4

I develop a Qt app to let user choose a DICOM file, then it will show the inference result.

enter image description here

I use dcmread to read a DICOM image as many slices of images.

For example, single DICOM image can convert to 60 JPG images.

The following is how I input a DICOM file.

JavaScript

I use model.reshape to make my YOLOv4 model fit with the batch, heigh, width of my input file.

But the below error seems like I can’t let my batch more than 1.

JavaScript

How can I use dynamic input in API 2.0 correctly?

My environment is Windows 11 with openvino_2022.1.0.643 version.

Advertisement

Answer

The ov::InferRequest::get_output_tensor method without arguments can be used for model with only one output.

Use ov::InferRequest::get_output_tensor method with argument (index: int) as your model has three outputs.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement