Files
AI-on-the-edge-device-docs/Configuration-Parameter-Details/index.html
2023-01-02 23:05:54 +00:00

604 lines
21 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><link rel="canonical" href="https://jomjol.github.io/AI-on-the-edge-device-docs/Configuration-Parameter-Details/" />
<link rel="shortcut icon" href="../img/favicon.ico" />
<title>Configuration Parameter Details - AI on the Edge Device</title>
<link rel="stylesheet" href="../css/theme.css" />
<link rel="stylesheet" href="../css/theme_extra.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
<script>
// Current page data
var mkdocs_page_name = "Configuration Parameter Details";
var mkdocs_page_input_path = "Configuration-Parameter-Details.md";
var mkdocs_page_url = "/AI-on-the-edge-device-docs/Configuration-Parameter-Details/";
</script>
<script src="../js/jquery-3.6.0.min.js" defer></script>
<!--[if lt IE 9]>
<script src="../js/html5shiv.min.js"></script>
<![endif]-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> AI on the Edge Device
</a><div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Home/">Welcome to the AI-on-the-edge-device!</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Links</span></p>
<ul>
<li class="toctree-l1"><a class="" href="https://jomjol.github.io/AI-on-the-edge-device/index.html">Web Installer/Console</a>
</li>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/issues">Place an Issues</a>
</li>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/discussions">Join a Discussions</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Asorted Pages</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../AI-on-the-edge/">Welcome to the AI-on-the-edge-device wiki!</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Addditional-Information/">Addditional Information</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Best-Practice/">Best Practice</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Build-Instructions/">New</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Choosing-the-Model/">Which model should I use?</a>
</li>
<li class="toctree-l1 current"><a class="reference internal current" href="./">Configuration Parameter Details</a>
<ul class="current">
<li class="toctree-l2"><a class="reference internal" href="#makeimage">[MakeImage]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#alignment">[Alignment]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#digits">[Digits]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#analog">[Analog]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#postprocessing">[PostProcessing]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#mqtt">[MQTT]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#autotimer">[AutoTimer]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#debug">[Debug]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#system">[System]</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#ende">[Ende]</a>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Configuration/">Configuration</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Correction%20Algorithm/">Correction Algorithm</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Demo-Mode/">Demo Mode</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Error-Codes/">Error Codes</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Error-Debugging/">Error Debugging</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../External-LED/">External LED</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../FAQs/">Frequently Asked Questions</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Frequent%20Reboots/">Frequent reboots</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Gasmeter-Log-Downloader/">Gasmeter Log Downloader</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Graphical-configuration/">Graphical configuration</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Hardware-Compatibility/">Hardware Compatibility</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Install-a-rolling-%28unstable%29-release/">:bangbang: Living on the edge :bangbang:</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Installation/">Installation</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Integrated%20Functions/">Integrated Functions</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Integration-Home-Assistant/">Integration into Home Assistant</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Learn-models-with-your-own-images/">Learn models with your own images</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../MQTT-API/">General Information</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Migrate-Old-Config-To-New-Config/">Migration from water-meter „old“ to water-meter “AI-on-the-edge-device”</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Neural-Network-Types/">Neural Network Types</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../OTA---Update-Firmware-and-Web-Interface/">Over-The-Air (OTA) Update</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../REST-API/">REST API</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ROI-Configuration/">ROI (Region of Interest) Configuration</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Release-creation/">Release creation</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Testing/">Testing</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Watermeter-specific-analog---digital-transition/">Understanding the problem</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">AI on the Edge Device</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href=".." class="icon icon-home" alt="Docs"></a> &raquo;</li>
<li>Asorted Pages &raquo;</li>
<li>Configuration Parameter Details</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs/edit/main/doc/Configuration-Parameter-Details.md" class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="section" itemprop="articleBody">
<h1 id="configuration-parameter-details">Configuration Parameter Details</h1>
<h3 id="makeimage">[MakeImage]</h3>
<pre><code>[MakeImage]
LogImageLocation = /log/source
WaitBeforeTakingPicture = 5
LogfileRetentionInDays = 15
Brightness = -2
;Contrast = 0
;Saturation = 0
ImageQuality = 5
ImageSize = VGA
FixedExposure = true
</code></pre>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>LogImageLocation</td>
<td>location for storing a copy of the image</td>
<td></td>
</tr>
<tr>
<td>WaitBeforeTakingPicture</td>
<td>waiting time between switch on the flash-light and taking the image in seconds</td>
<td></td>
</tr>
<tr>
<td>LogfileRetentionInDays</td>
<td>Number of days, for which the log files should be stored</td>
<td>0 = keep forever</td>
</tr>
<tr>
<td>Brightness</td>
<td>Adjustment of the camera brightness (-2 ... 2)</td>
<td></td>
</tr>
<tr>
<td>Contrast</td>
<td>NOT IMPLEMENTED</td>
<td></td>
</tr>
<tr>
<td>Saturation</td>
<td>NOT IMPLEMENTED</td>
<td></td>
</tr>
<tr>
<td>ImageQuality</td>
<td>Input image jpg-compression quality 0 (best) to 100 (lowest)</td>
<td>5 = default</td>
</tr>
<tr>
<td>ImageSize</td>
<td>Input Image Size from Camera</td>
<td>only VGA, QVGA</td>
</tr>
<tr>
<td>FixedExposure</td>
<td>If enabled, the exposure settings are fixed at the beginning and the waiting time after switching on the illumination will be skipped</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="alignment">[Alignment]</h3>
<pre><code>[Alignment]
InitialRotate = 179
InitialMirror = false
SearchFieldX = 20
SearchFieldY = 20
AlignmentAlgo = Default
FlipImageSize = false
/config/ref0.jpg 104 271
/config/ref1.jpg 442 142
</code></pre>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>InitialMirror</td>
<td>Option for initially mirroring the image on the original x-axis</td>
<td></td>
</tr>
<tr>
<td>InitialRotate</td>
<td>Initial rotation of image before alignment in degree (1...359)</td>
<td></td>
</tr>
<tr>
<td>FlipImageSize</td>
<td>Changes the aspect ratio after the image rotation to avoid cropping of the rotated imaged</td>
<td></td>
</tr>
<tr>
<td>/config/refx.jpg 98, 257</td>
<td>Link to reference image and corresponding target coordinates</td>
<td>file link is relative to sd-card root</td>
</tr>
<tr>
<td>SearchFieldX/Y</td>
<td>Search field size in X/Y for finding the reference images [pixel]</td>
<td></td>
</tr>
</tbody>
</table>
<p>Here two reference images are needed. Therefore rotation and shifting can be compensated. As the alignment is one of the most computing time using part, the search field needs to be limited. The calculation time goes quadratic with the search field size.</p>
<h3 id="digits">[Digits]</h3>
<pre><code>[Digits]
Model=/config/digits.tfl
ModelInputSize 20, 32
LogImageLocation = /log/digit
LogfileRetentionInDays = 2
number1.digit1 292 120 37 67
number1.digit2 340 120 37 67
number1.digit3 389 120 37 67
number2.digit1 292 180 37 67
number2.digit2 340 180 37 67
</code></pre>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>Model</td>
<td>Link to the CNN-tflite file used for AI-image recognition</td>
<td></td>
</tr>
<tr>
<td>ModelInputSize</td>
<td>Image input size for the CNN-Network [pixel]</td>
<td>needed to resize the ROI to the input size</td>
</tr>
<tr>
<td>LogImageLocation</td>
<td>storage location for the recognized images, including the CNN-results in the file name/location</td>
<td></td>
</tr>
<tr>
<td>numberX.digitY</td>
<td>ROI for the corresponding digit in the aligned image. <br />More than one number can be specified. Therefore the name consists of a naming of the number (<code>numberX</code>) and the region of interest (<code>digitY</code>) - separated by <code>.</code></td>
<td></td>
</tr>
<tr>
<td>LogfileRetentionInDays</td>
<td>Number of days, for which the log files should be stored</td>
<td>0 = keep forever</td>
</tr>
<tr>
<td>LogImageLocation</td>
<td>location for storing a copy of the image</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="analog">[Analog]</h3>
<pre><code>[Analog]
Model=/config/analog.tfl
ModelInputSize 32, 32
LogImageLocation = /log/analog
LogfileRetentionInDays = 2
number1.analog1, 433, 207, 99, 99
number1.analog2, 378, 313, 99, 99
number1.analog3, 280, 356, 99, 99
number1.analog4, 149, 313, 99, 99
number2.analog1, 280, 456, 99, 99
number2.analog2, 149, 413, 99, 99
</code></pre>
<p>Same as for [digit], here only for the analog pointers</p>
<h3 id="postprocessing">[PostProcessing]</h3>
<pre><code>[PostProcessing]
number1.DecimalShift = 0
number2.DecimalShift = -1
PreValueUse = true
PreValueAgeStartup = 720
AllowNegativeRates = false
number1.MaxRateValue = 0.1
number2.MaxRateValue = 0.1
ErrorMessage = true
CheckDigitIncreaseConsistency = false
</code></pre>
<p>Here the post processing and consistency check for the readout can be adjusted</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>PreValueUse</td>
<td>Use the previous value for consistency check and substitution for NaN (True / False)</td>
<td></td>
</tr>
<tr>
<td>PreValueAgeStartup</td>
<td>Max age of PreValue after a reboot (downtime)</td>
<td></td>
</tr>
<tr>
<td>AllowNegativeRates</td>
<td>Allow decrease of the readout value</td>
<td></td>
</tr>
<tr>
<td>numberX.MaxRateValue</td>
<td>Maximum chance rate from one to the next readout.<br />This can be specified for each number individual.</td>
<td></td>
</tr>
<tr>
<td>ErrorMessage</td>
<td>Show error messages</td>
<td></td>
</tr>
<tr>
<td>numberX.DecimalShift</td>
<td>Shifting of the decimal separator from the default position between digital and analog.<br />This can be specified for each number individual.</td>
<td>DecimalShift = 2: 123.456 --&gt; 12345.6<br />DecimalShift = -1: 123.456 --&gt; 12.3456<br/></td>
</tr>
<tr>
<td>CheckDigitIncreaseConsistency</td>
<td>This parameter controls, if the digits are checked for a consistent change in comparison to the previous value. This only makes sense, if the last digit is changing very slowly and every single digit is visible (e.g. 4.7 --&gt; 4.8 --&gt; 4.9 --&gt; 5.0 --&gt; 5.1). If single digits are skipped, for example because the digits changes to fast, this should be disabled (e.g. 4.7 --&gt; 5.0 --&gt; 5.1).</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="mqtt">[MQTT]</h3>
<pre><code>[MQTT]
Uri = mqtt://IP-ADRESS:1883
MainTopic = wasserzaehler
ClientID = wasser
user = USERNAME
password = PASSWORD
</code></pre>
<p>Here the post processing and consistency check for the readout can be adjusted</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>Uri</td>
<td>URI to the MQTT broker including port e.g.: mqtt://IP-Address:Port</td>
<td></td>
</tr>
<tr>
<td>MainTopic</td>
<td>MQTT main topic, under which the counters are published. <br />The single value will be published with the following key: <code>MainTopic/number/PARAMETER</code> where parameters are: value, rate, timestamp, error and json<br/>The general connection status can be found in <code>MainTopic/connection</code></td>
<td></td>
</tr>
<tr>
<td>ClientID</td>
<td>ClientID to connect to the MQTT broker</td>
<td></td>
</tr>
<tr>
<td>user</td>
<td>user for MQTT authentication</td>
<td>(optional)</td>
</tr>
<tr>
<td>password</td>
<td>password for MQTT authentication</td>
<td>(optional)</td>
</tr>
</tbody>
</table>
<h3 id="autotimer">[AutoTimer]</h3>
<pre><code>[AutoTimer]
AutoStart= true
Intervall = 4.85
</code></pre>
<p>This paragraph is used to automatically trigger the periodic automated readout.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>AutoStart</td>
<td>Automatically trigger the readout after startup</td>
<td></td>
</tr>
<tr>
<td>Intervall</td>
<td>Readout interval in minutes</td>
<td>Values smaller than 2 minutes do not make sense, as this is the time for one detection</td>
</tr>
</tbody>
</table>
<h3 id="debug">[Debug]</h3>
<pre><code>[Debug]
Logfile = true
LogfileRetentionInDays = 2
</code></pre>
<p>This paragraph is used to switch on an extended logging. It is optional and by default only a minimum logging is enabled.
<strong>Attention:</strong> in case of extended logging the size of the log file (<code>/log.txt</code>, <code>/alignment.txt</code>) might increase rapidly, therefore manually deletion from time to time is recommended</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>Logfile</td>
<td>Turn on (true) or off (false) the extended logging</td>
<td>parameter and section optional</td>
</tr>
<tr>
<td>LogfileRetentionInDays</td>
<td>Number of days, for which the log files should be stored</td>
<td>0 = keep forever</td>
</tr>
</tbody>
</table>
<h3 id="system">[System]</h3>
<pre><code>[System]
TimeZone = CET-1CEST,M3.5.0,M10.5.0/3
;TimeServer = TIMESERVER
;Hostname = undefined
SetupMode = false
</code></pre>
<p>This paragraph is used to switch on an extended logging. It is optional and by default only a minimum logging is enabled.
<strong>Attention:</strong> in case of extended logging the size of the log file (<code>/log.txt</code>, <code>/alignment.txt</code>) might increase rapidly, therefore manually deletion from time to time is recommended</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
<th>Options/Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>TimeZone</td>
<td>TimeZone of the system can be specified</td>
<td>Central european, with summertime adjustement: <code>CET-1CEST,M3.5.0,M10.5.0/3</code></td>
</tr>
<tr>
<td>TimeServer</td>
<td>An dedicated time server can be specified.</td>
<td>default = <code>pool.ntp.org</code></td>
</tr>
<tr>
<td>Hostname</td>
<td>Additionally to the <code>wlan.ini</code> the hostname can be specified. It will be transferred to the <code>wlan.ini</code> and initiate a reboot</td>
<td></td>
</tr>
<tr>
<td>SetupMode</td>
<td>If enabled, the server starts in an initial setup mode. This is automatically disabled at the end of the setup</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="ende">[Ende]</h3>
<p>No function, just to mark, that the config is done!</p>
</div>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../Choosing-the-Model/" class="btn btn-neutral float-left" title="Which model should I use?"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../Configuration/" class="btn btn-neutral float-right" title="Configuration">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" aria-label="Versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span>
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
</span>
<span><a href="../Choosing-the-Model/" style="color: #fcfcfc">&laquo; Previous</a></span>
<span><a href="../Configuration/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '..';</script>
<script src="../js/theme_extra.js" defer></script>
<script src="../js/theme.js" defer></script>
<script src="../search/main.js" defer></script>
<script defer>
window.onload = function () {
SphinxRtdTheme.Navigation.enable(true);
};
</script>
</body>
</html>