Esteban Gamez
Esteban Gamez

Reputation: 101

What is NCHW Format?

Can someone explain to me what is NHCW format? I am working with the Jenson Inference library and for object detection the first step is called "Pre-Process" and it converts the image to NCHW format, but I don't know what this format is.

Upvotes: 9

Views: 13374

Answers (2)

Mahmoud Maghrabi
Mahmoud Maghrabi

Reputation: 1021

NCHW is an acronym describing the order of the axes in a tensor containing image data samples.

  • N: Number of data samples.

    C: Image channels. A red-green-blue (RGB) image will have 3 channels.

    H: Image height.

    W: Image width.

Source

Upvotes: 3

mranvick
mranvick

Reputation: 389

NCHW stands for:

batch N, channels C, depth D, height H, width W

It is a way to store multidimensional arrays / data frames / matrix into memory, which can be considered as a 1-D array. You may have a look to this link for further information. There also exist variants of this format with different ways of "casting" the multidimensional data into one.

Upvotes: 13

Related Questions