aboutsummaryrefslogtreecommitdiff
path: root/tests/ImageTensorGenerator
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2019-07-11 12:02:45 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2019-07-16 16:37:41 +0000
commit90bb7ab20d2c3eb34266ae2ea81a23ae641219d3 (patch)
treecb6c53ce5161185d603d4a123710bc3fac89eedb /tests/ImageTensorGenerator
parentf54c9462415850a3e0f0159a619c4ee90fe3cfc9 (diff)
downloadarmnn-90bb7ab20d2c3eb34266ae2ea81a23ae641219d3.tar.gz
MLCE-103 Clean up ModelAccuracyTool and ImageTensorGenerator
* Fix ImageTensorGenerator command line options * Update ModelAccuracyTool README * Update ImageTensorGenerator README Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: I19e573f2b4aa0d7ecab63dc3886a66aa9d8724bc
Diffstat (limited to 'tests/ImageTensorGenerator')
-rw-r--r--tests/ImageTensorGenerator/ImageTensorGenerator.cpp8
-rw-r--r--tests/ImageTensorGenerator/README.md20
2 files changed, 19 insertions, 9 deletions
diff --git a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
index f391a27a4d..5bd8532cbd 100644
--- a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
+++ b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
@@ -114,16 +114,18 @@ public:
("infile,i", po::value<std::string>(&m_InputFileName)->required(),
"Input image file to generate tensor from")
("model-format,f", po::value<std::string>(&m_ModelFormat)->required(),
- "Format of the model file, Accepted values (caffe, tensorflow, tflite)")
+ "Format of the intended model file that uses the images."
+ "Different formats have different image normalization styles."
+ "Accepted values (caffe, tensorflow, tflite)")
("outfile,o", po::value<std::string>(&m_OutputFileName)->required(),
"Output raw tensor file path")
("output-type,z", po::value<std::string>(&m_OutputType)->default_value("float"),
"The data type of the output tensors."
"If unset, defaults to \"float\" for all defined inputs. "
"Accepted values (float, int or qasymm8)")
- ("new-width,w", po::value<std::string>(&m_NewWidth)->default_value("0"),
+ ("new-width", po::value<std::string>(&m_NewWidth)->default_value("0"),
"Resize image to new width. Keep original width if unspecified")
- ("new-height,h", po::value<std::string>(&m_NewHeight)->default_value("0"),
+ ("new-height", po::value<std::string>(&m_NewHeight)->default_value("0"),
"Resize image to new height. Keep original height if unspecified")
("layout,l", po::value<std::string>(&m_Layout)->default_value("NHWC"),
"Output data layout, \"NHWC\" or \"NCHW\", default value NHWC");
diff --git a/tests/ImageTensorGenerator/README.md b/tests/ImageTensorGenerator/README.md
index 50e68aa1e7..a7e149cc3a 100644
--- a/tests/ImageTensorGenerator/README.md
+++ b/tests/ImageTensorGenerator/README.md
@@ -1,13 +1,21 @@
# The ImageTensorGenerator
-The `ImageTensorGenerator` is a program for generating a .raw tensor file from a .jpg image.
+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 | --help | Display help messages |
-| -i | --infile | Input image file to generate tensor from |
-| -l | --layout | Output data layout, "NHWC" or "NCHW". Default value: NHWC |
-| -o | --outfile | Output raw tensor file path |
+| -h | --help | Display help messages |
+| -f | --model-format | Format of the intended model file that uses the images.Different formats have different image normalization styles.Accepted values (caffe, tensorflow, tflite) |
+| -i | --infile | Input image file to generate tensor from |
+| -o | --outfile | Output raw tensor file path |
+| -z | --output-type | The data type of the output tensors.If unset, defaults to "float" for all defined inputs. Accepted values (float, int or qasymm8)
+| | --new-width |Resize image to new width. Keep original width if unspecified |
+| | --new-height | Resize image to new height. Keep original height if unspecified |
+| -l | --layout | Output data layout, "NHWC" or "NCHW". Default value: NHWC |
Example usage: <br>
-<code>./ImageTensorGenerator -i /path/to/image/dog.jpg -l NHWC -o /output/path/dog.raw</code>
+<code>./ImageTensorGenerator -i /path/to/image/dog.jpg -o /output/path/dog.raw --new-width 224 --new-height 224</code> \ No newline at end of file