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.

Why NCHW as input type in examples?

Deblauwe__Tom
Beginner
1,230 Views

Hi,

Out of curiosity, why are the openvino samples all setting the NCHW layout and not NHWC layout as opencv provides by default when you read an image? Now every example has to convert the image itself to the correct format... and loop over all the pixels for this conversion...

Best regards,

Tom,

0 Kudos
1 Solution
Shubha_R_Intel
Employee
1,229 Views

Dearest Tom,

The reason for this is that Tensorflow is the only network out there who uses NHWC. All other networks use NCHW. Thus OpenVino's Inference Engine satisfies the majority so it also uses NCHW layout. Models of all network flavors must be converted to NCHW layout in order to work with Inference Engine.

Hope this explains it !

Thanks,

Shubha

View solution in original post

0 Kudos
1 Reply
Shubha_R_Intel
Employee
1,230 Views

Dearest Tom,

The reason for this is that Tensorflow is the only network out there who uses NHWC. All other networks use NCHW. Thus OpenVino's Inference Engine satisfies the majority so it also uses NCHW layout. Models of all network flavors must be converted to NCHW layout in order to work with Inference Engine.

Hope this explains it !

Thanks,

Shubha

0 Kudos
Reply