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.

[MTCNN] Variable input size

Wu__David
Beginner
437 Views

Hi,

The MTCNN P-net will change input size several times, but the OpenVINO model didn't accept different input size in early release.

In R3 version, I see some posts said that we should change input shape before load into plugin like this:

net = IENetwork.from_ir(model=path_to_the_xml, weights=path_to_the_bin)
input_layer = next(iter(net.inputs))
n, c, h, w = net.inputs[input_layer]
net.reshape({input_layer: (n, c, h*2, w*2)}]

But if it does this every time, it should spend much time.

Is there another way to to this?

 

Thanks.

David

 

 

 

0 Kudos
1 Solution
Yury_G_Intel
Employee
437 Views

Hi,

 One way to solve this is to create multiple networks with different size. AFAIK MTCNN has about 6 different scales, that would mean about 6 networks.

/Yury

View solution in original post

0 Kudos
1 Reply
Yury_G_Intel
Employee
438 Views

Hi,

 One way to solve this is to create multiple networks with different size. AFAIK MTCNN has about 6 different scales, that would mean about 6 networks.

/Yury

0 Kudos
Reply