| <!-- HTML header for doxygen 1.8.15--> |
| <!-- Remember to use version doxygen 1.8.15 +--> |
| <!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.15"/> |
| <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
| <title>Compute Library: CPPDetectionOutputLayer Class Reference</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"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(document).ready(initResizable); |
| /* @license-end */</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" async="async" 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="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname"> |
|  <span id="projectnumber">19.08</span> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.15 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| /* @license-end */</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"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(document).ready(function(){initNavTree('classarm__compute_1_1_c_p_p_detection_output_layer.xhtml','');}); |
| /* @license-end */ |
| </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="summary"> |
| <a href="#pub-methods">Public Member Functions</a> | |
| <a href="#pub-static-methods">Static Public Member Functions</a> </div> |
| <div class="headertitle"> |
| <div class="title">CPPDetectionOutputLayer Class Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>CPP Function to generate the detection output based on location and confidence predictions by doing non maximum suppression. |
| <a href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml#details">More...</a></p> |
| |
| <p><code>#include <<a class="el" href="_c_p_p_detection_output_layer_8h_source.xhtml">CPPDetectionOutputLayer.h</a>></code></p> |
| <div class="dynheader"> |
| Collaboration diagram for CPPDetectionOutputLayer:</div> |
| <div class="dyncontent"> |
| <div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_c_p_p_detection_output_layer__coll__graph.svg" width="199" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe> |
| </div> |
| <center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| Public Member Functions</h2></td></tr> |
| <tr class="memitem:a0c04f240b8b260665440c161d9a7fae9"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml#a0c04f240b8b260665440c161d9a7fae9">CPPDetectionOutputLayer</a> ()</td></tr> |
| <tr class="memdesc:a0c04f240b8b260665440c161d9a7fae9"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a0c04f240b8b260665440c161d9a7fae9">More...</a><br /></td></tr> |
| <tr class="separator:a0c04f240b8b260665440c161d9a7fae9"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a4c87b215abac33e28e279fd7277e2126"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml#a4c87b215abac33e28e279fd7277e2126">configure</a> (const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *input_loc, const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *input_conf, const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *input_priorbox, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *output, <a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a> info=<a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a>())</td></tr> |
| <tr class="memdesc:a4c87b215abac33e28e279fd7277e2126"><td class="mdescLeft"> </td><td class="mdescRight">Configure the detection output layer CPP kernel. <a href="#a4c87b215abac33e28e279fd7277e2126">More...</a><br /></td></tr> |
| <tr class="separator:a4c87b215abac33e28e279fd7277e2126"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ad1717410afd0be936c6213a63c8005fb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml#ad1717410afd0be936c6213a63c8005fb">run</a> () override</td></tr> |
| <tr class="memdesc:ad1717410afd0be936c6213a63c8005fb"><td class="mdescLeft"> </td><td class="mdescRight">Run the kernels contained in the function. <a href="#ad1717410afd0be936c6213a63c8005fb">More...</a><br /></td></tr> |
| <tr class="separator:ad1717410afd0be936c6213a63c8005fb"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a48f2354fc7b04280d6b88ae2d56a1ba0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml#a48f2354fc7b04280d6b88ae2d56a1ba0">CPPDetectionOutputLayer</a> (const <a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a> &)=delete</td></tr> |
| <tr class="memdesc:a48f2354fc7b04280d6b88ae2d56a1ba0"><td class="mdescLeft"> </td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a48f2354fc7b04280d6b88ae2d56a1ba0">More...</a><br /></td></tr> |
| <tr class="separator:a48f2354fc7b04280d6b88ae2d56a1ba0"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a0bd6124f70adfa9b9436a0222fbc736d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml#a0bd6124f70adfa9b9436a0222fbc736d">operator=</a> (const <a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a> &)=delete</td></tr> |
| <tr class="memdesc:a0bd6124f70adfa9b9436a0222fbc736d"><td class="mdescLeft"> </td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a0bd6124f70adfa9b9436a0222fbc736d">More...</a><br /></td></tr> |
| <tr class="separator:a0bd6124f70adfa9b9436a0222fbc736d"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="inherit_header pub_methods_classarm__compute_1_1_i_function"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1_i_function')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarm__compute_1_1_i_function.xhtml">IFunction</a></td></tr> |
| <tr class="memitem:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_function.xhtml#ab921ecc3f3f6ae2b4bd61f3e1998d8c4">~IFunction</a> ()=default</td></tr> |
| <tr class="memdesc:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classarm__compute_1_1_i_function.xhtml#ab921ecc3f3f6ae2b4bd61f3e1998d8c4">More...</a><br /></td></tr> |
| <tr class="separator:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a820f7291c24155a2980512fae45aac26 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_function.xhtml#a820f7291c24155a2980512fae45aac26">prepare</a> ()</td></tr> |
| <tr class="memdesc:a820f7291c24155a2980512fae45aac26 inherit pub_methods_classarm__compute_1_1_i_function"><td class="mdescLeft"> </td><td class="mdescRight">Prepare the function for executing. <a href="classarm__compute_1_1_i_function.xhtml#a820f7291c24155a2980512fae45aac26">More...</a><br /></td></tr> |
| <tr class="separator:a820f7291c24155a2980512fae45aac26 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> |
| Static Public Member Functions</h2></td></tr> |
| <tr class="memitem:af1d5e758d546e837b9cabb5991d387e0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1_status.xhtml">Status</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml#af1d5e758d546e837b9cabb5991d387e0">validate</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input_loc, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input_conf, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input_priorbox, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *output, <a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a> info=<a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a>())</td></tr> |
| <tr class="memdesc:af1d5e758d546e837b9cabb5991d387e0"><td class="mdescLeft"> </td><td class="mdescRight">Static function to check if given info will lead to a valid configuration of <a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a>. <a href="#af1d5e758d546e837b9cabb5991d387e0">More...</a><br /></td></tr> |
| <tr class="separator:af1d5e758d546e837b9cabb5991d387e0"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>CPP Function to generate the detection output based on location and confidence predictions by doing non maximum suppression. </p> |
| <dl class="section note"><dt>Note</dt><dd>Intended for use with MultiBox detection method. </dd></dl> |
| |
| <p class="definition">Definition at line <a class="el" href="_c_p_p_detection_output_layer_8h_source.xhtml#l00040">40</a> of file <a class="el" href="_c_p_p_detection_output_layer_8h_source.xhtml">CPPDetectionOutputLayer.h</a>.</p> |
| </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| <a id="a0c04f240b8b260665440c161d9a7fae9"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a0c04f240b8b260665440c161d9a7fae9">◆ </a></span>CPPDetectionOutputLayer() <span class="overload">[1/2]</span></h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a> </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Default constructor. </p> |
| |
| <p class="definition">Definition at line <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml#l00385">385</a> of file <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml">CPPDetectionOutputLayer.cpp</a>.</p> |
| <div class="fragment"><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  : _input_loc(<span class="keyword">nullptr</span>), _input_conf(<span class="keyword">nullptr</span>), _input_priorbox(<span class="keyword">nullptr</span>), _output(<span class="keyword">nullptr</span>), _info(), _num_priors(), _num(), _all_location_predictions(), _all_confidence_scores(), _all_prior_bboxes(),</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  _all_prior_variances(), _all_decode_bboxes(), _all_indices()</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span> {</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span> }</div></div><!-- fragment --> |
| </div> |
| </div> |
| <a id="a48f2354fc7b04280d6b88ae2d56a1ba0"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a48f2354fc7b04280d6b88ae2d56a1ba0">◆ </a></span>CPPDetectionOutputLayer() <span class="overload">[2/2]</span></h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a> </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a> & </td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">delete</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Prevent instances of this class from being copied (As this class contains pointers) </p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Function Documentation</h2> |
| <a id="a4c87b215abac33e28e279fd7277e2126"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a4c87b215abac33e28e279fd7277e2126">◆ </a></span>configure()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void configure </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> * </td> |
| <td class="paramname"><em>input_loc</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> * </td> |
| <td class="paramname"><em>input_conf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> * </td> |
| <td class="paramname"><em>input_priorbox</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> * </td> |
| <td class="paramname"><em>output</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a> </td> |
| <td class="paramname"><em>info</em> = <code><a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a>()</code> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Configure the detection output layer CPP kernel. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">input_loc</td><td>The mbox location input tensor of size [C1, N]. Data types supported: F32. </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">input_conf</td><td>The mbox confidence input tensor of size [C2, N]. Data types supported: F32. </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">input_priorbox</td><td>The mbox prior box input tensor of size [C3, 2, N]. Data types supported: F32. </td></tr> |
| <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>The output tensor of size [7, M]. Data types supported: Same as <code>input</code> </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">info</td><td>(Optional) <a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml" title="Detection Output layer info.">DetectionOutputLayerInfo</a> information.</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section note"><dt>Note</dt><dd>Output contains all the detections. Of those, only the ones selected by the valid region are valid. </dd></dl> |
| |
| <p class="definition">Definition at line <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml#l00391">391</a> of file <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml">CPPDetectionOutputLayer.cpp</a>.</p> |
| <div class="fragment"><div class="line"><a name="l00392"></a><span class="lineno"> 392</span> {</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <a class="code" href="_validate_8h.xhtml#a921b705e9e3e0fe928928447869e62a5">ARM_COMPUTE_ERROR_ON_NULLPTR</a>(input_loc, input_conf, input_priorbox, output);</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="comment">// Output auto initialization if not yet initialized</span></div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <span class="comment">// Since the number of bboxes to kept is unknown before nms, the shape is set to the maximum</span></div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="comment">// The maximum is keep_top_k * input_loc_size[1]</span></div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <span class="comment">// Each row is a 7 dimension std::vector, which stores [image_id, label, confidence, xmin, ymin, xmax, ymax]</span></div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max_size = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.keep_top_k() * (input_loc->info()->num_dimensions() > 1 ? input_loc->info()->dimension(1) : 1);</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <a class="code" href="namespacearm__compute.xhtml#a47be6fa38308d0003c25b60b7dbc45ce">auto_init_if_empty</a>(*output->info(), input_loc->info()->clone()->set_tensor_shape(TensorShape(7<a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a>, max_size)));</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span> </div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <span class="comment">// Perform validation step</span></div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <a class="code" href="_error_8h.xhtml#a938dcd406ce611ef5345ad2531cdb948">ARM_COMPUTE_ERROR_THROW_ON</a>(validate_arguments(input_loc->info(), input_conf->info(), input_priorbox->info(), output->info(), <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>));</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span> </div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  _input_loc = input_loc;</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  _input_conf = input_conf;</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  _input_priorbox = input_priorbox;</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  _output = output;</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  _info = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>;</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  _num_priors = input_priorbox->info()->dimension(0) / 4;</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  _num = (_input_loc-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-><a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a1f4e725b8e1ea36b30e09dc08ae6961d">num_dimensions</a>() > 1 ? _input_loc-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-><a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">dimension</a>(1) : 1);</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span> </div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  _all_location_predictions.resize(_num);</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  _all_confidence_scores.resize(_num);</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  _all_prior_bboxes.resize(_num_priors);</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  _all_prior_variances.resize(_num_priors);</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  _all_decode_bboxes.resize(_num);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> </div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i < _num; ++i)</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  {</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> c = 0; c < _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#ae82a2ccc5739cb255a9a7679d6161399">num_loc_classes</a>(); ++c)</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  {</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> label = _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a7bc581f245390f063f02c3fcbb422320">share_location</a>() ? -1 : c;</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="keywordflow">if</span>(label == _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a158d49c7c1df3c6c6589b47d3de56cf0">background_label_id</a>())</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <span class="comment">// Ignore background class.</span></div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  }</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  _all_decode_bboxes[i][label].resize(_num_priors);</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  }</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  }</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  _all_indices.resize(_num);</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span> </div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  Coordinates coord;</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  coord.set_num_dimensions(output->info()->num_dimensions());</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  output->info()->set_valid_region(ValidRegion(coord, output->info()->tensor_shape()));</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span> }</div><div class="ttc" id="classarm__compute_1_1_i_tensor_info_xhtml_a1f4e725b8e1ea36b30e09dc08ae6961d"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_info.xhtml#a1f4e725b8e1ea36b30e09dc08ae6961d">arm_compute::ITensorInfo::num_dimensions</a></div><div class="ttdeci">virtual size_t num_dimensions() const =0</div><div class="ttdoc">The number of dimensions of the tensor (rank)</div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a7bc581f245390f063f02c3fcbb422320"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a7bc581f245390f063f02c3fcbb422320">arm_compute::DetectionOutputLayerInfo::share_location</a></div><div class="ttdeci">bool share_location() const</div><div class="ttdoc">Get share location.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01016">Types.h:1016</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_i_tensor_info_xhtml_a178f0d3d87f959e00a743328d95359d2"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">arm_compute::ITensorInfo::dimension</a></div><div class="ttdeci">virtual size_t dimension(size_t index) const =0</div><div class="ttdoc">Return the size of the requested dimension.</div></div> |
| <div class="ttc" id="_error_8h_xhtml_a938dcd406ce611ef5345ad2531cdb948"><div class="ttname"><a href="_error_8h.xhtml#a938dcd406ce611ef5345ad2531cdb948">ARM_COMPUTE_ERROR_THROW_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_THROW_ON(status)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00327">Error.h:327</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_a47be6fa38308d0003c25b60b7dbc45ce"><div class="ttname"><a href="namespacearm__compute.xhtml#a47be6fa38308d0003c25b60b7dbc45ce">arm_compute::auto_init_if_empty</a></div><div class="ttdeci">bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())</div><div class="ttdoc">Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00201">Helpers.inl:201</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::Channel::U</a></div><div class="ttdoc">Cb/U channel.</div></div> |
| <div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_a0e95dc1e53c361348314873b168ae237"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">arm_compute::ITensor::info</a></div><div class="ttdeci">virtual ITensorInfo * info() const =0</div><div class="ttdoc">Interface to be implemented by the child class to return the tensor's metadata.</div></div> |
| <div class="ttc" id="_validate_8h_xhtml_a921b705e9e3e0fe928928447869e62a5"><div class="ttname"><a href="_validate_8h.xhtml#a921b705e9e3e0fe928928447869e62a5">ARM_COMPUTE_ERROR_ON_NULLPTR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)</div><div class="ttdef"><b>Definition:</b> <a href="_validate_8h_source.xhtml#l00161">Validate.h:161</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a4f4125dba5283887b34f889b1c615c0c"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">arm_compute::test::validation::info</a></div><div class="ttdeci">info</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a158d49c7c1df3c6c6589b47d3de56cf0"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a158d49c7c1df3c6c6589b47d3de56cf0">arm_compute::DetectionOutputLayerInfo::background_label_id</a></div><div class="ttdeci">int background_label_id() const</div><div class="ttdoc">Get background label ID.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01046">Types.h:1046</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_ae82a2ccc5739cb255a9a7679d6161399"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#ae82a2ccc5739cb255a9a7679d6161399">arm_compute::DetectionOutputLayerInfo::num_loc_classes</a></div><div class="ttdeci">int num_loc_classes() const</div><div class="ttdoc">Get number of location classes.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01061">Types.h:1061</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="_validate_8h_source.xhtml#l00161">ARM_COMPUTE_ERROR_ON_NULLPTR</a>, <a class="el" href="_error_8h_source.xhtml#l00327">ARM_COMPUTE_ERROR_THROW_ON</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00201">arm_compute::auto_init_if_empty()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01046">DetectionOutputLayerInfo::background_label_id()</a>, <a class="el" href="classarm__compute_1_1misc_1_1_i_cloneable.xhtml#a4d10e5012a872e7f78f2b539b673049d">ICloneable< T >::clone()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::info</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a1f4e725b8e1ea36b30e09dc08ae6961d">ITensorInfo::num_dimensions()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01061">DetectionOutputLayerInfo::num_loc_classes()</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00128">Dimensions< T >::set_num_dimensions()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a9586081a29fceb532ab270bd843abee6">ITensorInfo::set_valid_region()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01016">DetectionOutputLayerInfo::share_location()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::U</a>.</p> |
| |
| </div> |
| </div> |
| <a id="a0bd6124f70adfa9b9436a0222fbc736d"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a0bd6124f70adfa9b9436a0222fbc736d">◆ </a></span>operator=()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a>& operator= </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a> & </td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">delete</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Prevent instances of this class from being copied (As this class contains pointers) </p> |
| |
| </div> |
| </div> |
| <a id="ad1717410afd0be936c6213a63c8005fb"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ad1717410afd0be936c6213a63c8005fb">◆ </a></span>run()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void run </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Run the kernels contained in the function. </p> |
| <p>For NEON kernels:</p><ul> |
| <li>Multi-threading is used for the kernels which are parallelisable.</li> |
| <li>By default std::thread::hardware_concurrency() threads are used.</li> |
| </ul> |
| <dl class="section note"><dt>Note</dt><dd><a class="el" href="classarm__compute_1_1_c_p_p_scheduler.xhtml#ae64eebaa07f4d2da6cc2ba538c3cb095">CPPScheduler::set_num_threads()</a> can be used to manually set the number of threads</dd></dl> |
| <p>For OpenCL kernels:</p><ul> |
| <li>All the kernels are enqueued on the queue associated with <a class="el" href="classarm__compute_1_1_c_l_scheduler.xhtml" title="Provides global access to a CL context and command queue.">CLScheduler</a>.</li> |
| <li>The queue is then flushed.</li> |
| </ul> |
| <dl class="section note"><dt>Note</dt><dd>The function will not block until the kernels are executed. It is the user's responsibility to wait. </dd> |
| <dd> |
| Will call <a class="el" href="classarm__compute_1_1_i_function.xhtml#a820f7291c24155a2980512fae45aac26" title="Prepare the function for executing.">prepare()</a> on first run if hasn't been done </dd></dl> |
| |
| <p>Implements <a class="el" href="classarm__compute_1_1_i_function.xhtml#a18954417d3124a8095783ea13dc6d00b">IFunction</a>.</p> |
| |
| <p class="definition">Definition at line <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml#l00444">444</a> of file <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml">CPPDetectionOutputLayer.cpp</a>.</p> |
| <div class="fragment"><div class="line"><a name="l00445"></a><span class="lineno"> 445</span> {</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="comment">// Retrieve all location predictions.</span></div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  retrieve_all_loc_predictions(_input_loc, _num, _num_priors, _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#ae82a2ccc5739cb255a9a7679d6161399">num_loc_classes</a>(), _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a7bc581f245390f063f02c3fcbb422320">share_location</a>(), _all_location_predictions);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span> </div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <span class="comment">// Retrieve all confidences.</span></div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  retrieve_all_conf_scores(_input_conf, _num, _num_priors, _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a2411dd5edb9ccb581d303f3396e9c14c">num_classes</a>(), _all_confidence_scores);</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span> </div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <span class="comment">// Retrieve all prior bboxes.</span></div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  retrieve_all_priorbox(_input_priorbox, _num_priors, _all_prior_bboxes, _all_prior_variances);</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span> </div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <span class="comment">// Decode all loc predictions to bboxes</span></div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> clip_bbox = <span class="keyword">false</span>;</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i < _num; ++i)</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  {</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> c = 0; c < _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#ae82a2ccc5739cb255a9a7679d6161399">num_loc_classes</a>(); ++c)</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  {</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> label = _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a7bc581f245390f063f02c3fcbb422320">share_location</a>() ? -1 : c;</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <span class="keywordflow">if</span>(label == _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a158d49c7c1df3c6c6589b47d3de56cf0">background_label_id</a>())</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  {</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="comment">// Ignore background class.</span></div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  }</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(_all_location_predictions[i].find(label) == _all_location_predictions[i].end(), <span class="stringliteral">"Could not find location predictions for label %d."</span>, label);</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span> </div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="keyword">const</span> std::vector<BBox> &label_loc_preds = _all_location_predictions[i].find(label)->second;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span> </div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> num_bboxes = _all_prior_bboxes.size();</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(_all_prior_variances[i].size() != 4);</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span> </div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 0; j < num_bboxes; ++j)</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  {</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  DecodeBBox(_all_prior_bboxes[j], _all_prior_variances[j], _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a025a49ad16e9d5d59d3919c25a17d1ae">code_type</a>(), _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#aa5081eb6d3f7bf20f32573af8a60f1f9">variance_encoded_in_target</a>(), clip_bbox, label_loc_preds[j], _all_decode_bboxes[i][label][j]);</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  }</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  }</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  }</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span> </div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  <span class="keywordtype">int</span> num_kept = 0;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span> </div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i < _num; ++i)</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  {</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ae6550ea34c33d2e943476386d6ba8bed">LabelBBox</a> &decode_bboxes = _all_decode_bboxes[i];</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <span class="keyword">const</span> std::map<int, std::vector<float>> &conf_scores = _all_confidence_scores[i];</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span> </div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  std::map<int, std::vector<int>> indices;</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  <span class="keywordtype">int</span> num_det = 0;</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> c = 0; c < _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a2411dd5edb9ccb581d303f3396e9c14c">num_classes</a>(); ++c)</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  {</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <span class="keywordflow">if</span>(c == _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a158d49c7c1df3c6c6589b47d3de56cf0">background_label_id</a>())</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  {</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <span class="comment">// Ignore background class</span></div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  }</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> label = _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a7bc581f245390f063f02c3fcbb422320">share_location</a>() ? -1 : c;</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <span class="keywordflow">if</span>(conf_scores.find(c) == conf_scores.end() || decode_bboxes.find(label) == decode_bboxes.end())</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  {</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">"Could not find predictions for label %d."</span>, label);</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  }</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <span class="keyword">const</span> std::vector<float> &scores = conf_scores.find(c)->second;</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  <span class="keyword">const</span> std::vector<BBox> &bboxes = decode_bboxes.find(label)->second;</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span> </div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  ApplyNMSFast(bboxes, scores, _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a47c941c24980e6f61a74986c4a16c16c">confidence_threshold</a>(), _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#af14fc4cf24dfb69a0f225a582ef01d54">nms_threshold</a>(), _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a206472366fc0981d36701fe46679fd8f">eta</a>(), _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#acf35ae15a9350f47bcba0d0cedeb3e7c">top_k</a>(), indices[c]);</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span> </div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  num_det += indices[c].size();</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  }</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span> </div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <span class="keywordtype">int</span> num_to_add = 0;</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="keywordflow">if</span>(_info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a381583deeb7c92f3b86d959c1e6c8185">keep_top_k</a>() > -1 && num_det > _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a381583deeb7c92f3b86d959c1e6c8185">keep_top_k</a>())</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  {</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  std::vector<std::pair<float, std::pair<int, int>>> score_index_pairs;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> <span class="keyword">const</span> &it : indices)</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  {</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> label = it.first;</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keyword">const</span> std::vector<int> &label_indices = it.second;</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span> </div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  <span class="keywordflow">if</span>(conf_scores.find(label) == conf_scores.end())</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  {</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">"Could not find predictions for label %d."</span>, label);</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  }</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span> </div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  <span class="keyword">const</span> std::vector<float> &scores = conf_scores.find(label)->second;</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> idx : label_indices)</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  {</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(idx > static_cast<int>(scores.size()));</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  score_index_pairs.emplace_back(std::make_pair(scores[idx], std::make_pair(label, idx)));</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  }</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  }</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span> </div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="comment">// Keep top k results per image.</span></div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  std::sort(score_index_pairs.begin(), score_index_pairs.end(), SortScorePairDescend<std::pair<int, int>>);</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  score_index_pairs.resize(_info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a381583deeb7c92f3b86d959c1e6c8185">keep_top_k</a>());</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span> </div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="comment">// Store the new indices.</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span> </div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  std::map<int, std::vector<int>> new_indices;</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> score_index_pair : score_index_pairs)</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  {</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  <span class="keywordtype">int</span> label = score_index_pair.second.first;</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <span class="keywordtype">int</span> idx = score_index_pair.second.second;</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  new_indices[label].push_back(idx);</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  }</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  _all_indices[i] = new_indices;</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  num_to_add = _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a381583deeb7c92f3b86d959c1e6c8185">keep_top_k</a>();</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  }</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  {</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  _all_indices[i] = indices;</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  num_to_add = num_det;</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  }</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  num_kept += num_to_add;</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  }</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span> </div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  <span class="comment">//Update the valid region of the ouput to mark the exact number of detection</span></div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  _output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-><a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a9586081a29fceb532ab270bd843abee6">set_valid_region</a>(ValidRegion(Coordinates(0, 0), TensorShape(7, num_kept)));</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span> </div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <span class="keywordtype">int</span> count = 0;</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i < _num; ++i)</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  {</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  <span class="keyword">const</span> std::map<int, std::vector<float>> &conf_scores = _all_confidence_scores[i];</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ae6550ea34c33d2e943476386d6ba8bed">LabelBBox</a> &decode_bboxes = _all_decode_bboxes[i];</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> &it : _all_indices[i])</div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  {</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> label = it.first;</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  <span class="keyword">const</span> std::vector<float> &scores = conf_scores.find(label)->second;</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> loc_label = _info.<a class="code" href="classarm__compute_1_1_detection_output_layer_info.xhtml#a7bc581f245390f063f02c3fcbb422320">share_location</a>() ? -1 : label;</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <span class="keywordflow">if</span>(conf_scores.find(label) == conf_scores.end() || decode_bboxes.find(loc_label) == decode_bboxes.end())</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  {</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  <span class="comment">// Either if there are no confidence predictions</span></div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  <span class="comment">// or there are no location predictions for current label.</span></div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">"Could not find predictions for the label %d."</span>, label);</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  }</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  <span class="keyword">const</span> std::vector<BBox> &bboxes = decode_bboxes.find(loc_label)->second;</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  <span class="keyword">const</span> std::vector<int> &indices = it.second;</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span> </div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> idx : indices)</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  {</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  *(reinterpret_cast<float *>(_output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">ptr_to_element</a>(Coordinates(count * 7)))) = i;</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  *(reinterpret_cast<float *>(_output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">ptr_to_element</a>(Coordinates(count * 7 + 1)))) = label;</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  *(reinterpret_cast<float *>(_output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">ptr_to_element</a>(Coordinates(count * 7 + 2)))) = scores[idx];</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  *(reinterpret_cast<float *>(_output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">ptr_to_element</a>(Coordinates(count * 7 + 3)))) = bboxes[idx][0];</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  *(reinterpret_cast<float *>(_output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">ptr_to_element</a>(Coordinates(count * 7 + 4)))) = bboxes[idx][1];</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  *(reinterpret_cast<float *>(_output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">ptr_to_element</a>(Coordinates(count * 7 + 5)))) = bboxes[idx][2];</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  *(reinterpret_cast<float *>(_output-><a class="code" href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">ptr_to_element</a>(Coordinates(count * 7 + 6)))) = bboxes[idx][3];</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span> </div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  ++count;</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  }</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  }</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  }</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span> }</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00261">Error.h:261</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a2411dd5edb9ccb581d303f3396e9c14c"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a2411dd5edb9ccb581d303f3396e9c14c">arm_compute::DetectionOutputLayerInfo::num_classes</a></div><div class="ttdeci">int num_classes() const</div><div class="ttdoc">Get num classes.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01011">Types.h:1011</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_adbd73147d41e8a640bc299d12613c31e"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#adbd73147d41e8a640bc299d12613c31e">arm_compute::ITensor::ptr_to_element</a></div><div class="ttdeci">uint8_t * ptr_to_element(const Coordinates &id) const</div><div class="ttdoc">Return a pointer to the element at the passed coordinates.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_8h_source.xhtml#l00063">ITensor.h:63</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a7bc581f245390f063f02c3fcbb422320"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a7bc581f245390f063f02c3fcbb422320">arm_compute::DetectionOutputLayerInfo::share_location</a></div><div class="ttdeci">bool share_location() const</div><div class="ttdoc">Get share location.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01016">Types.h:1016</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ae6550ea34c33d2e943476386d6ba8bed"><div class="ttname"><a href="namespacearm__compute.xhtml#ae6550ea34c33d2e943476386d6ba8bed">arm_compute::LabelBBox</a></div><div class="ttdeci">std::map< int, std::vector< BBox > > LabelBBox</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00950">Types.h:950</a></div></div> |
| <div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00337">Error.h:337</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a206472366fc0981d36701fe46679fd8f"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a206472366fc0981d36701fe46679fd8f">arm_compute::DetectionOutputLayerInfo::eta</a></div><div class="ttdeci">float eta() const</div><div class="ttdoc">Get eta.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01041">Types.h:1041</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_acf35ae15a9350f47bcba0d0cedeb3e7c"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#acf35ae15a9350f47bcba0d0cedeb3e7c">arm_compute::DetectionOutputLayerInfo::top_k</a></div><div class="ttdeci">int top_k() const</div><div class="ttdoc">Get top K.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01056">Types.h:1056</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_i_tensor_info_xhtml_a9586081a29fceb532ab270bd843abee6"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_info.xhtml#a9586081a29fceb532ab270bd843abee6">arm_compute::ITensorInfo::set_valid_region</a></div><div class="ttdeci">virtual void set_valid_region(const ValidRegion &valid_region)=0</div><div class="ttdoc">Set the valid region of the tensor.</div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_aa5081eb6d3f7bf20f32573af8a60f1f9"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#aa5081eb6d3f7bf20f32573af8a60f1f9">arm_compute::DetectionOutputLayerInfo::variance_encoded_in_target</a></div><div class="ttdeci">bool variance_encoded_in_target() const</div><div class="ttdoc">Get if variance encoded in target.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01026">Types.h:1026</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_af14fc4cf24dfb69a0f225a582ef01d54"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#af14fc4cf24dfb69a0f225a582ef01d54">arm_compute::DetectionOutputLayerInfo::nms_threshold</a></div><div class="ttdeci">float nms_threshold() const</div><div class="ttdoc">Get nms threshold.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01036">Types.h:1036</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_a0e95dc1e53c361348314873b168ae237"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">arm_compute::ITensor::info</a></div><div class="ttdeci">virtual ITensorInfo * info() const =0</div><div class="ttdoc">Interface to be implemented by the child class to return the tensor's metadata.</div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a025a49ad16e9d5d59d3919c25a17d1ae"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a025a49ad16e9d5d59d3919c25a17d1ae">arm_compute::DetectionOutputLayerInfo::code_type</a></div><div class="ttdeci">DetectionOutputLayerCodeType code_type() const</div><div class="ttdoc">Get detection output code type.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01021">Types.h:1021</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a381583deeb7c92f3b86d959c1e6c8185"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a381583deeb7c92f3b86d959c1e6c8185">arm_compute::DetectionOutputLayerInfo::keep_top_k</a></div><div class="ttdeci">int keep_top_k() const</div><div class="ttdoc">Get the number of total bounding boxes to be kept per image.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01031">Types.h:1031</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a158d49c7c1df3c6c6589b47d3de56cf0"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a158d49c7c1df3c6c6589b47d3de56cf0">arm_compute::DetectionOutputLayerInfo::background_label_id</a></div><div class="ttdeci">int background_label_id() const</div><div class="ttdoc">Get background label ID.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01046">Types.h:1046</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_a47c941c24980e6f61a74986c4a16c16c"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#a47c941c24980e6f61a74986c4a16c16c">arm_compute::DetectionOutputLayerInfo::confidence_threshold</a></div><div class="ttdeci">float confidence_threshold() const</div><div class="ttdoc">Get confidence threshold.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01051">Types.h:1051</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_detection_output_layer_info_xhtml_ae82a2ccc5739cb255a9a7679d6161399"><div class="ttname"><a href="classarm__compute_1_1_detection_output_layer_info.xhtml#ae82a2ccc5739cb255a9a7679d6161399">arm_compute::DetectionOutputLayerInfo::num_loc_classes</a></div><div class="ttdeci">int num_loc_classes() const</div><div class="ttdoc">Get number of location classes.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01061">Types.h:1061</a></div></div> |
| <div class="ttc" id="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00261">ARM_COMPUTE_ERROR</a>, <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01046">DetectionOutputLayerInfo::background_label_id()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01021">DetectionOutputLayerInfo::code_type()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01051">DetectionOutputLayerInfo::confidence_threshold()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01041">DetectionOutputLayerInfo::eta()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01031">DetectionOutputLayerInfo::keep_top_k()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01036">DetectionOutputLayerInfo::nms_threshold()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01011">DetectionOutputLayerInfo::num_classes()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01061">DetectionOutputLayerInfo::num_loc_classes()</a>, <a class="el" href="_i_tensor_8h_source.xhtml#l00063">ITensor::ptr_to_element()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a9586081a29fceb532ab270bd843abee6">ITensorInfo::set_valid_region()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01016">DetectionOutputLayerInfo::share_location()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01056">DetectionOutputLayerInfo::top_k()</a>, and <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01026">DetectionOutputLayerInfo::variance_encoded_in_target()</a>.</p> |
| |
| </div> |
| </div> |
| <a id="af1d5e758d546e837b9cabb5991d387e0"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#af1d5e758d546e837b9cabb5991d387e0">◆ </a></span>validate()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classarm__compute_1_1_status.xhtml">Status</a> validate </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> * </td> |
| <td class="paramname"><em>input_loc</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> * </td> |
| <td class="paramname"><em>input_conf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> * </td> |
| <td class="paramname"><em>input_priorbox</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> * </td> |
| <td class="paramname"><em>output</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a> </td> |
| <td class="paramname"><em>info</em> = <code><a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml">DetectionOutputLayerInfo</a>()</code> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Static function to check if given info will lead to a valid configuration of <a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a>. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">input_loc</td><td>The mbox location input tensor info. Data types supported: F32. </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">input_conf</td><td>The mbox confidence input tensor info. Data types supported: F32. </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">input_priorbox</td><td>The mbox prior box input tensor info. Data types supported: F32. </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">output</td><td>The output tensor info. Data types supported: Same as <code>input</code> </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">info</td><td>(Optional) <a class="el" href="classarm__compute_1_1_detection_output_layer_info.xhtml" title="Detection Output layer info.">DetectionOutputLayerInfo</a> information.</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>a status </dd></dl> |
| |
| <p class="definition">Definition at line <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml#l00438">438</a> of file <a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml">CPPDetectionOutputLayer.cpp</a>.</p> |
| <div class="fragment"><div class="line"><a name="l00439"></a><span class="lineno"> 439</span> {</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <a class="code" href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a>(validate_arguments(input_loc, input_conf, input_priorbox, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>));</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <span class="keywordflow">return</span> Status{};</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span> }</div><div class="ttc" id="_error_8h_xhtml_a8a1e1c105f0bdaf37db408c7cfcb77a4"><div class="ttname"><a href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_RETURN_ON_ERROR(status)</div><div class="ttdoc">Checks if a status contains an error and returns it.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00193">Error.h:193</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a4f4125dba5283887b34f889b1c615c0c"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">arm_compute::test::validation::info</a></div><div class="ttdeci">info</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00193">ARM_COMPUTE_RETURN_ON_ERROR</a>, and <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::info</a>.</p> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following files:<ul> |
| <li>arm_compute/runtime/CPP/functions/<a class="el" href="_c_p_p_detection_output_layer_8h_source.xhtml">CPPDetectionOutputLayer.h</a></li> |
| <li>src/runtime/CPP/functions/<a class="el" href="_c_p_p_detection_output_layer_8cpp_source.xhtml">CPPDetectionOutputLayer.cpp</a></li> |
| </ul> |
| </div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_c_p_p_detection_output_layer.xhtml">CPPDetectionOutputLayer</a></li> |
| <li class="footer">Generated on Mon Sep 2 2019 11:47:35 for Compute Library by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |