tree: 6c529c1c651da5d66e1c1445fef754e0f870de81 [path history] [tgz]
  1. ImageTensorGenerator.cpp
  2. ImageTensorGenerator.hpp
  3. README.md
tests/ImageTensorGenerator/README.md

The ImageTensorGenerator

The ImageTensorGenerator is a program for pre-processing a .jpg image before generating a .raw tensor file from it.

Build option: To build ModelAccuracyTool, pass the following options to Cmake:

  • -DBUILD_ARMNN_QUANTIZER=1
Cmd:
-h--helpDisplay help messages
-f--model-formatFormat of the intended model file that uses the images.Different formats have different image normalization styles.Accepted values (caffe, tensorflow, tflite)
-i--infileInput image file to generate tensor from
-o--outfileOutput raw tensor file path
-z--output-typeThe data type of the output tensors.If unset, defaults to “float” for all defined inputs. Accepted values (float, int or qasymm8)
--new-widthResize image to new width. Keep original width if unspecified
--new-heightResize image to new height. Keep original height if unspecified
-l--layoutOutput data layout, “NHWC” or “NCHW”. Default value: NHWC

Example usage:
./ImageTensorGenerator -i /path/to/image/dog.jpg -o /output/path/dog.raw --new-width 224 --new-height 224