mirror of
https://github.com/jomjol/AI-on-the-edge-device-docs.git
synced 2025-12-06 19:46:56 +03:00
317 lines
17 KiB
HTML
317 lines
17 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/Demo-Mode/" />
|
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
|
<title>Demo Mode - 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 = "Demo Mode";
|
|
var mkdocs_page_input_path = "Demo-Mode.md";
|
|
var mkdocs_page_url = "/AI-on-the-edge-device-docs/Demo-Mode/";
|
|
</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">
|
|
<img src=https://jomjol.github.io/AI-on-the-edge-device-docs//img/logo.png>
|
|
<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">
|
|
<p class="caption"><span class="caption-text">Getting Started</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="..">Welcome</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Installation/">Installation</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../inital-setup/">Initial Setup</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="../Best-Practice/">Best Practice</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../FAQs/">Frequently Asked Questions</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">External Links</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/releases">Releases</a>
|
|
</li>
|
|
<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">Configuration</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../ROI-Configuration/">ROI (Region of Interest)</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Choosing-the-Model/">Model Selection</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/">Over-The-Air (OTA) Update</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Advanced</span></p>
|
|
<ul>
|
|
<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="../External-LED/">External LED</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../rolling-installation/">Living on the edge</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Configuration-Parameter-Details/">Configuration Parameter Details</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Configuration/">Configuration</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Watermeter-specific-analog---digital-transition/">Analog/Digital Transition on Watermeters</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Learn-models-with-your-own-images/">Learn a model with your own images</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="../Additional-Information/">Additional Information</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../New-Releases-Notification/">Notification about new Releases</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Troubleshooting</span></p>
|
|
<ul class="current">
|
|
<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="../Frequent-Reboots/">Frequent Reboots</a>
|
|
</li>
|
|
<li class="toctree-l1 current"><a class="reference internal current" href="./">Demo Mode</a>
|
|
<ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="#sd-card-structure">SD-Card Structure</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#recoding">Recoding</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#installation">Installation</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#how-does-it-work">How does it work</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#example-data-of-a-watermeter">Example Data of a Watermeter</a>
|
|
<ul>
|
|
<li class="toctree-l3"><a class="reference internal" href="#all-images-843-images">All images (843 images)</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#selection-of-84-images">Selection of 84 images</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#selection-of-42-images">Selection of 42 images</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">API's</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../REST-API/">REST API</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../MQTT-API/">MQTT API</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Influx-DB/">Influx DB</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Development</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Build-Instructions/">Build the Project</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Upload-files-by-script/">Scripted File Upload</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Testing/">Testing</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Release-creation/">Preparing for Release</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Old Pages (no longer maintained)</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../outdated--Integrated-Functions/">Integrated Functions</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../outdated--Gasmeter-Log-Downloader/">Gasmeter Log-Downloader</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../outdated--Migrate-Old-Config-To-New-Config/">Migration from water-meter „old“ to water-meter “AI-on-the-edge-device”</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Asorted Pages</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../Graphical-Configuration/">Graphical Configuration</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> »</li>
|
|
<li>Troubleshooting »</li>
|
|
<li>Demo Mode</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs/edit/main/docs/Demo-Mode.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="demo-mode">Demo Mode</h1>
|
|
<p>For Demo and Testing Purpose, the device can use pre-recorded images.</p>
|
|
<p>You need to enable it in the configuration (<code>TakeImage > Demo</code>) and also provide the needed files on the SD-Card.</p>
|
|
<p>For each round one image gets used, starting with the first image for the first round.</p>
|
|
<p>For the reference image and the alignment also the first image gets used.</p>
|
|
<p>Once the last image got reached, it starts again with the first one.</p>
|
|
<h2 id="sd-card-structure">SD-Card Structure</h2>
|
|
<pre><code>demo/
|
|
├── 520.8983.jpg
|
|
├── 520.9086.jpg
|
|
├── 520.9351.jpg
|
|
├── ...
|
|
└── files.txt
|
|
</code></pre>
|
|
<ul>
|
|
<li>The jpg files can have any name</li>
|
|
<li>The jpg files must be smaller than 30'000 bytes</li>
|
|
<li>The <code>files.txt</code> must contains a list of those files, eg:<pre><code>520.8983.jpg
|
|
520.9086.jpg
|
|
520.9351.jpg
|
|
</code></pre>
|
|
</li>
|
|
</ul>
|
|
<h2 id="recoding">Recoding</h2>
|
|
<p>To record real images of a meter, you have to periodically fetch <code>http://<IP>/img_tmp/raw.jpg</code>.</p>
|
|
<p>To automate this, you can use the following shell script (Linux only):</p>
|
|
<pre><code class="language-bash">#!/bin/bash
|
|
|
|
while [[ true ]]; do
|
|
echo "fetching value..."
|
|
wget -q http://192.168.1.151/value -O value.txt
|
|
|
|
value=`cat value.txt`
|
|
echo "Value: $value"
|
|
|
|
diff=`diff value.txt value_previous.txt`
|
|
changed=$?
|
|
#echo "Diff: $diff"
|
|
|
|
if [[ $changed -ne 0 ]]; then
|
|
echo "Value changed:"
|
|
echo $diff
|
|
echo "fetching image..."
|
|
wget -q http://192.168.1.151/img_tmp/raw.jpg -O $value.jpg
|
|
else
|
|
echo "Value did not change, skipping image fetching!"
|
|
fi
|
|
|
|
cp value.txt value_previous.txt
|
|
|
|
echo "waiting 60s..."
|
|
sleep 60
|
|
done
|
|
</code></pre>
|
|
<h2 id="installation">Installation</h2>
|
|
<p>Just install the zip file using the OTA Update functionality.</p>
|
|
<h2 id="how-does-it-work">How does it work</h2>
|
|
<p>The Demo Mode tries to interfere as less as possible with the normal behavior. Whenever a Cam Framebuffer gets taken (<code>esp_camera_fb_get()</code>), it replaces the framebuffer with the image from the SD-Card.</p>
|
|
<h2 id="example-data-of-a-watermeter">Example Data of a Watermeter</h2>
|
|
<p>You can use the following demo images if you want:</p>
|
|
<p><img alt="530 00688" src="https://user-images.githubusercontent.com/1783586/211902363-1b8e4115-5f08-4e25-ace6-bb52e43b3741.jpg" style="width:200px" /></p>
|
|
<p>It covers a meter range from <code>530.00688</code> to <code>531.85882</code>.</p>
|
|
<h3 id="all-images-843-images">All images (843 images)</h3>
|
|
<p><a href="https://user-images.githubusercontent.com/1783586/211915731-9a2a3cd3-390b-4b1f-a064-5e7e443ab113.png"><img alt="grafik" src="https://user-images.githubusercontent.com/1783586/211915731-9a2a3cd3-390b-4b1f-a064-5e7e443ab113.png" style="width:400px" /></a></p>
|
|
<p><a href="https://github.com/jomjol/AI-on-the-edge-device-docs/files/10395941/Demo_Images_Watermeter_530.00688-532.08243_843_images.zip">Demo_Images_Watermeter_530.00688-532.08243_843_images.zip</a></p>
|
|
<p>Animation of it (186 MB!)</p>
|
|
<h3 id="selection-of-84-images">Selection of 84 images</h3>
|
|
<p><a href="https://user-images.githubusercontent.com/1783586/211915870-aa5c1342-c61c-4e1f-afe0-10e222f1499d.png"><img alt="grafik" src="https://user-images.githubusercontent.com/1783586/211915870-aa5c1342-c61c-4e1f-afe0-10e222f1499d.png" style="width:400px" /></a></p>
|
|
<p><a href="https://github.com/jomjol/AI-on-the-edge-device-docs/files/10395892/Demo_Images_Watermeter_530.00688-532.08243_84_images.zip">Demo_Images_Watermeter_530.00688-532.08243_84_images.zip</a></p>
|
|
<h3 id="selection-of-42-images">Selection of 42 images</h3>
|
|
<p><a href="https://user-images.githubusercontent.com/1783586/211915898-b499e109-7b63-4e21-ba5b-c0a370022f7a.png"><img alt="grafik" src="https://user-images.githubusercontent.com/1783586/211915898-b499e109-7b63-4e21-ba5b-c0a370022f7a.png" style="width:400px" /></a></p>
|
|
<p><a href="https://github.com/jomjol/AI-on-the-edge-device-docs/files/10395893/Demo_Images_Watermeter_530.00688-532.08243_42_images.zip">Demo_Images_Watermeter_530.00688-532.08243_42_images.zip</a></p>
|
|
|
|
</div>
|
|
</div><footer>
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
|
<a href="../Frequent-Reboots/" class="btn btn-neutral float-left" title="Frequent Reboots"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
|
<a href="../REST-API/" class="btn btn-neutral float-right" title="REST API">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="../Frequent-Reboots/" style="color: #fcfcfc">« Previous</a></span>
|
|
|
|
|
|
<span><a href="../REST-API/" style="color: #fcfcfc">Next »</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>
|