Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!-- Copyright (c) 2020 ARM Limited. --> |
| 2 | <!-- --> |
| 3 | <!-- SPDX-License-Identifier: MIT --> |
| 4 | <!-- --> |
| 5 | <!-- HTML header for doxygen 1.8.13--> |
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 8 | <head> |
| 9 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 11 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 12 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> |
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 14 | <title>ArmNN: Other Tools</title> |
| 15 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 16 | <script type="text/javascript" src="jquery.js"></script> |
| 17 | <script type="text/javascript" src="dynsections.js"></script> |
| 18 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 19 | <script type="text/javascript" src="resize.js"></script> |
| 20 | <script type="text/javascript" src="navtreedata.js"></script> |
| 21 | <script type="text/javascript" src="navtree.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(initResizable); |
| 24 | </script> |
| 25 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 26 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 27 | <script type="text/javascript" src="search/search.js"></script> |
| 28 | <script type="text/x-mathjax-config"> |
| 29 | MathJax.Hub.Config({ |
| 30 | extensions: ["tex2jax.js"], |
| 31 | jax: ["input/TeX","output/HTML-CSS"], |
| 32 | }); |
| 33 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 34 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 35 | <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| 36 | </head> |
| 37 | <body> |
| 38 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 39 | <div id="titlearea"> |
| 40 | <table cellspacing="0" cellpadding="0"> |
| 41 | <tbody> |
| 42 | <tr style="height: 56px;"> |
| 43 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/> |
| 44 | <td style="padding-left: 0.5em;"> |
| 45 | <div id="projectname"> |
| 46 |  <span id="projectnumber">20.02</span> |
| 47 | </div> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | <!-- end header part --> |
| 54 | <!-- Generated by Doxygen 1.8.13 --> |
| 55 | <script type="text/javascript"> |
| 56 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 57 | </script> |
| 58 | <script type="text/javascript" src="menudata.js"></script> |
| 59 | <script type="text/javascript" src="menu.js"></script> |
| 60 | <script type="text/javascript"> |
| 61 | $(function() { |
| 62 | initMenu('',true,false,'search.php','Search'); |
| 63 | $(document).ready(function() { init_search(); }); |
| 64 | }); |
| 65 | </script> |
| 66 | <div id="main-nav"></div> |
| 67 | </div><!-- top --> |
| 68 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 69 | <div id="nav-tree"> |
| 70 | <div id="nav-tree-contents"> |
| 71 | <div id="nav-sync" class="sync"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="splitbar" style="-moz-user-select:none;" |
| 75 | class="ui-resizable-handle"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <script type="text/javascript"> |
| 79 | $(document).ready(function(){initNavTree('other_tools.xhtml','');}); |
| 80 | </script> |
| 81 | <div id="doc-content"> |
| 82 | <!-- window showing the filter options --> |
| 83 | <div id="MSearchSelectWindow" |
| 84 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 85 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 86 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 87 | </div> |
| 88 | |
| 89 | <!-- iframe showing the search results (closed by default) --> |
| 90 | <div id="MSearchResultsWindow"> |
| 91 | <iframe src="javascript:void(0)" frameborder="0" |
| 92 | name="MSearchResults" id="MSearchResults"> |
| 93 | </iframe> |
| 94 | </div> |
| 95 | |
| 96 | <div class="header"> |
| 97 | <div class="headertitle"> |
| 98 | <div class="title">Other Tools </div> </div> |
| 99 | </div><!--header--> |
| 100 | <div class="contents"> |
| 101 | <div class="toc"><h3>Table of Contents</h3> |
| 102 | <ul><li class="level1"><a href="#S14_image_csv_file_generator">The ImageCSVFileGenerator</a></li> |
| 103 | <li class="level1"><a href="#S15_image_tensor_generator">The ImageTensorGenerator</a></li> |
| 104 | <li class="level1"><a href="#S16_model_accuracy_tool_armnn">The ModelAccuracyTool-ArmNN</a></li> |
| 105 | </ul> |
| 106 | </div> |
| 107 | <div class="textblock"><h1><a class="anchor" id="S14_image_csv_file_generator"></a> |
| 108 | The ImageCSVFileGenerator</h1> |
| 109 | <p>The <code>ImageCSVFileGenerator</code> is a program for creating a CSV file that contains a list of .raw tensor files. These .raw tensor files can be generated using the<code>ImageTensorGenerator</code>.</p> |
| 110 | <table class="doxtable"> |
| 111 | <tr> |
| 112 | <th>Cmd:</th><th></th><th></th></tr> |
| 113 | <tr> |
| 114 | <td>-h </td><td>–help </td><td>Display help messages </td></tr> |
| 115 | <tr> |
| 116 | <td>-i </td><td>–indir </td><td>Directory that .raw files are stored in </td></tr> |
| 117 | <tr> |
| 118 | <td>-o </td><td>–outfile </td><td>Output CSV file path </td></tr> |
| 119 | </table> |
| 120 | <p>Example usage: <br /> |
| 121 | </p><div class="fragment"><div class="line">./ImageCSVFileGenerator -i /path/to/directory/ -o /output/path/csvfile.csv</div></div><!-- fragment --><p> <br /> |
| 122 | <br /> |
| 123 | <br /> |
| 124 | <br /> |
| 125 | </p> |
| 126 | <h1><a class="anchor" id="S15_image_tensor_generator"></a> |
| 127 | The ImageTensorGenerator</h1> |
| 128 | <p>The <code>ImageTensorGenerator</code> is a program for pre-processing a .jpg image before generating a .raw tensor file from it.</p> |
| 129 | <p>Build option: To build ModelAccuracyTool, pass the following options to Cmake: -DBUILD_ARMNN_QUANTIZER=1</p> |
| 130 | <table class="doxtable"> |
| 131 | <tr> |
| 132 | <th>Cmd:</th><th></th><th></th></tr> |
| 133 | <tr> |
| 134 | <td>-h </td><td>–help </td><td>Display help messages </td></tr> |
| 135 | <tr> |
| 136 | <td>-f </td><td>–model-format </td><td>Format of the intended model file that uses the images.Different formats have different image normalization styles.Accepted values (caffe, tensorflow, tflite) </td></tr> |
| 137 | <tr> |
| 138 | <td>-i </td><td>–infile </td><td>Input image file to generate tensor from </td></tr> |
| 139 | <tr> |
| 140 | <td>-o </td><td>–outfile </td><td>Output raw tensor file path </td></tr> |
| 141 | <tr> |
| 142 | <td>-z </td><td>–output-type </td><td>The data type of the output tensors.If unset, defaults to "float" for all defined inputs. Accepted values (float, int or qasymm8) </td></tr> |
| 143 | <tr> |
| 144 | <td></td><td>–new-width </td><td>Resize image to new width. Keep original width if unspecified </td></tr> |
| 145 | <tr> |
| 146 | <td></td><td>–new-height </td><td>Resize image to new height. Keep original height if unspecified </td></tr> |
| 147 | <tr> |
| 148 | <td>-l </td><td>–layout </td><td>Output data layout, "NHWC" or "NCHW". Default value: NHWC </td></tr> |
| 149 | </table> |
| 150 | <p>Example usage: <br /> |
| 151 | </p><div class="fragment"><div class="line">.sh ./ImageTensorGenerator -i /path/to/image/dog.jpg -o /output/path/dog.raw --new-width 224 --new-height 224</div></div><!-- fragment --><p> <br /> |
| 152 | <br /> |
| 153 | <br /> |
| 154 | <br /> |
| 155 | </p> |
| 156 | <h1><a class="anchor" id="S16_model_accuracy_tool_armnn"></a> |
| 157 | The ModelAccuracyTool-ArmNN</h1> |
| 158 | <p>The <code>ModelAccuracyTool-Armnn</code> is a program for measuring the Top 5 accuracy results of a model against an image dataset.</p> |
| 159 | <p>Prerequisites:</p><ol type="1"> |
| 160 | <li>The model is in .armnn format model file. The <code>ArmnnConverter</code> can be used to convert a model to this format.</li> |
| 161 | </ol> |
| 162 | <p>Build option: To build ModelAccuracyTool, pass the following options to Cmake: -DFLATC_DIR=/path/to/flatbuffers/x86build/ -DBUILD_ACCURACY_TOOL=1 -DBUILD_ARMNN_SERIALIZER=1</p> |
| 163 | <table class="doxtable"> |
| 164 | <tr> |
| 165 | <th>Cmd:</th><th></th><th></th></tr> |
| 166 | <tr> |
| 167 | <td>-h </td><td>–help </td><td>Display help messages </td></tr> |
| 168 | <tr> |
| 169 | <td>-m </td><td>–model-path </td><td>Path to armnn format model file </td></tr> |
| 170 | <tr> |
| 171 | <td>-f </td><td>–model-format </td><td>The model format. Supported values: caffe, tensorflow, tflite </td></tr> |
| 172 | <tr> |
| 173 | <td>-i </td><td>–input-name </td><td>Identifier of the input tensors in the network separated by comma </td></tr> |
| 174 | <tr> |
| 175 | <td>-o </td><td>–output-name </td><td>Identifier of the output tensors in the network separated by comma </td></tr> |
| 176 | <tr> |
| 177 | <td>-d </td><td>–data-dir </td><td>Path to directory containing the ImageNet test data </td></tr> |
| 178 | <tr> |
| 179 | <td>-p </td><td>–model-output-labels </td><td>Path to model output labels file. </td></tr> |
| 180 | <tr> |
| 181 | <td>-v </td><td>–validation-labels-path </td><td>Path to ImageNet Validation Label file </td></tr> |
| 182 | <tr> |
| 183 | <td>-l </td><td>–data-layout ] </td><td>Data layout. Supported value: NHWC, NCHW. Default: NHWC </td></tr> |
| 184 | <tr> |
| 185 | <td>-c </td><td>–compute </td><td>Which device to run layers on by default. Possible choices: CpuRef, CpuAcc, GpuAcc. Default: CpuAcc, CpuRef </td></tr> |
| 186 | <tr> |
| 187 | <td>-r </td><td>–validation-range </td><td>The range of the images to be evaluated. Specified in the form <begin index>="">:<end index>="">. The index starts at 1 and the range is inclusive. By default the evaluation will be performed on all images. </td></tr> |
| 188 | <tr> |
| 189 | <td>-b </td><td>–blacklist-path </td><td>Path to a blacklist file where each line denotes the index of an image to be excluded from evaluation. </td></tr> |
| 190 | </table> |
| 191 | <p>Example usage: <br /> |
| 192 | </p><div class="fragment"><div class="line">./ModelAccuracyTool -m /path/to/model/model.armnn -f tflite -i input -o output -d /path/to/test/directory/ -p /path/to/model-output-labels -v /path/to/file/val.txt -c CpuRef -r 1:100</div></div><!-- fragment --><p> <br /> |
| 193 | <br /> |
| 194 | </p> |
| 195 | </div></div><!-- contents --> |
| 196 | </div><!-- doc-content --> |
| 197 | <!-- start footer part --> |
| 198 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 199 | <ul> |
| 200 | <li class="footer">Generated on Fri Mar 13 2020 16:09:16 for ArmNN by |
| 201 | <a href="http://www.doxygen.org/index.html"> |
| 202 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 203 | </ul> |
| 204 | </div> |
| 205 | </body> |
| 206 | </html> |