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

Reshape YOLOV3 Input dims error

Gao__Jack
Beginner
786 Views

HI everyone,

    I'm using the sample code "object_detection_demo_yolov3_async" and trying to reshape the input size of the network by adding the code below.

		SizeVector input_dims = input->getInputData()->getTensorDesc().getDims();

		printf("input dims[%d,%d,%d,%d]\n", input_dims[0], input_dims[1], input_dims[2], input_dims[3]);

		std::map<std::string, SizeVector> input_shapes;

		input_shapes[inputName] = input_dims;

		netReader.getNetwork().reshape(input_shapes);

I just take the input size from the network and reshape the "same" shape. I got the error [ ERROR ] Dims and format are inconsistent.

The model is convert by following the steps from Openvino documentation.

Anyone can help me to solve this error?

0 Kudos
4 Replies
Shubha_R_Intel
Employee
786 Views

Dear Jack, may I know what device you're running inference on ? Also I assume that you have not loaded the network anywhere in code yet ? According to this forum post reshapes should always occur BEFORE  the network is loaded to the plugin. 

https://software.intel.com/en-us/forums/computer-vision/topic/797651

Thanks,

Shubha

0 Kudos
Gao__Jack
Beginner
786 Views

Dear Shubha,

    The attachment is my code. I have tried to use CPU, GPU, Movidius to run inference on but all of them have the same error if I use reshape function. I reshape the input size with reference to the sample code Smart Classroom demo.

 

Thanks,

Jack

0 Kudos
Shubha_R_Intel
Employee
786 Views

Dear Jack,  Thanks for attaching your code !

let me debug this for you and I will report back here. Thanks for using OpenVino !

Shubha

0 Kudos
Shubha_R_Intel
Employee
786 Views

Dear Jack, you will be happy to know that I reproduced your issue. I will keep you posted !

Thanks,

Shubha

0 Kudos
Reply