blob: 48a78b09ad6a943e08e43fadc5b7502e3d6a0459 [file] [log] [blame]
<!-- Copyright (c) 2020 ARM Limited. -->
<!-- -->
<!-- SPDX-License-Identifier: MIT -->
<!-- -->
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ArmNN: Other Tools</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/>
<td style="padding-left: 0.5em;">
<div id="projectname">
&#160;<span id="projectnumber">20.02</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('other_tools.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Other Tools </div> </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#S14_image_csv_file_generator">The ImageCSVFileGenerator</a></li>
<li class="level1"><a href="#S15_image_tensor_generator">The ImageTensorGenerator</a></li>
<li class="level1"><a href="#S16_model_accuracy_tool_armnn">The ModelAccuracyTool-ArmNN</a></li>
</ul>
</div>
<div class="textblock"><h1><a class="anchor" id="S14_image_csv_file_generator"></a>
The ImageCSVFileGenerator</h1>
<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>
<table class="doxtable">
<tr>
<th>Cmd:</th><th></th><th></th></tr>
<tr>
<td>-h </td><td>&ndash;help </td><td>Display help messages </td></tr>
<tr>
<td>-i </td><td>&ndash;indir </td><td>Directory that .raw files are stored in </td></tr>
<tr>
<td>-o </td><td>&ndash;outfile </td><td>Output CSV file path </td></tr>
</table>
<p>Example usage: <br />
</p><div class="fragment"><div class="line">./ImageCSVFileGenerator -i /path/to/directory/ -o /output/path/csvfile.csv</div></div><!-- fragment --><p> <br />
<br />
<br />
<br />
</p>
<h1><a class="anchor" id="S15_image_tensor_generator"></a>
The ImageTensorGenerator</h1>
<p>The <code>ImageTensorGenerator</code> is a program for pre-processing a .jpg image before generating a .raw tensor file from it.</p>
<p>Build option: To build ModelAccuracyTool, pass the following options to Cmake: -DBUILD_ARMNN_QUANTIZER=1</p>
<table class="doxtable">
<tr>
<th>Cmd:</th><th></th><th></th></tr>
<tr>
<td>-h </td><td>&ndash;help </td><td>Display help messages </td></tr>
<tr>
<td>-f </td><td>&ndash;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>
<tr>
<td>-i </td><td>&ndash;infile </td><td>Input image file to generate tensor from </td></tr>
<tr>
<td>-o </td><td>&ndash;outfile </td><td>Output raw tensor file path </td></tr>
<tr>
<td>-z </td><td>&ndash;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>
<tr>
<td></td><td>&ndash;new-width </td><td>Resize image to new width. Keep original width if unspecified </td></tr>
<tr>
<td></td><td>&ndash;new-height </td><td>Resize image to new height. Keep original height if unspecified </td></tr>
<tr>
<td>-l </td><td>&ndash;layout </td><td>Output data layout, "NHWC" or "NCHW". Default value: NHWC </td></tr>
</table>
<p>Example usage: <br />
</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 />
<br />
<br />
<br />
</p>
<h1><a class="anchor" id="S16_model_accuracy_tool_armnn"></a>
The ModelAccuracyTool-ArmNN</h1>
<p>The <code>ModelAccuracyTool-Armnn</code> is a program for measuring the Top 5 accuracy results of a model against an image dataset.</p>
<p>Prerequisites:</p><ol type="1">
<li>The model is in .armnn format model file. The <code>ArmnnConverter</code> can be used to convert a model to this format.</li>
</ol>
<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>
<table class="doxtable">
<tr>
<th>Cmd:</th><th></th><th></th></tr>
<tr>
<td>-h </td><td>&ndash;help </td><td>Display help messages </td></tr>
<tr>
<td>-m </td><td>&ndash;model-path </td><td>Path to armnn format model file </td></tr>
<tr>
<td>-f </td><td>&ndash;model-format </td><td>The model format. Supported values: caffe, tensorflow, tflite </td></tr>
<tr>
<td>-i </td><td>&ndash;input-name </td><td>Identifier of the input tensors in the network separated by comma </td></tr>
<tr>
<td>-o </td><td>&ndash;output-name </td><td>Identifier of the output tensors in the network separated by comma </td></tr>
<tr>
<td>-d </td><td>&ndash;data-dir </td><td>Path to directory containing the ImageNet test data </td></tr>
<tr>
<td>-p </td><td>&ndash;model-output-labels </td><td>Path to model output labels file. </td></tr>
<tr>
<td>-v </td><td>&ndash;validation-labels-path </td><td>Path to ImageNet Validation Label file </td></tr>
<tr>
<td>-l </td><td>&ndash;data-layout ] </td><td>Data layout. Supported value: NHWC, NCHW. Default: NHWC </td></tr>
<tr>
<td>-c </td><td>&ndash;compute </td><td>Which device to run layers on by default. Possible choices: CpuRef, CpuAcc, GpuAcc. Default: CpuAcc, CpuRef </td></tr>
<tr>
<td>-r </td><td>&ndash;validation-range </td><td>The range of the images to be evaluated. Specified in the form &lt;begin index&gt;=""&gt;:&lt;end index&gt;=""&gt;. The index starts at 1 and the range is inclusive. By default the evaluation will be performed on all images. </td></tr>
<tr>
<td>-b </td><td>&ndash;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>
</table>
<p>Example usage: <br />
</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 />
<br />
</p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Fri Mar 13 2020 16:09:16 for ArmNN by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>