mirror of
https://github.com/jomjol/AI-on-the-edge-device-docs.git
synced 2025-12-09 13:06:56 +03:00
Deployed 3b3421e with MkDocs version: 1.4.2
This commit is contained in:
@@ -92,29 +92,17 @@
|
||||
</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="../collect-new-images/">Collect images to improve the models</a>
|
||||
</li>
|
||||
<li class="toctree-l1 current"><a class="reference internal current" href="./">Learn a model with your own images</a>
|
||||
<ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="#before-you-start">Before you start</a>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#dig-class11-models-digits">dig-class11 models (digits)</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#collecting-images">Collecting images</a>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#dig-class100-dig-cont-models-digits">dig-class100 / dig-cont models (digits)</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#collecting-images-for-dig-class100dig-contana-class100">Collecting images for dig-class100/dig-cont/ana-class100</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#train-the-model-by-yourself-optional">Train the model by yourself (optional)</a>
|
||||
<ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#dig-class11-models-digits">dig-class11 models (digits)</a>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#dig-class100-dig-cont-models-digits">dig-class100 / dig-cont models (digits)</a>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#ana-class100ana-cont-models-analog-pointers">ana-class100/ana-cont models (analog pointers)</a>
|
||||
</li>
|
||||
</ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#ana-class100ana-cont-models-analog-pointers">ana-class100/ana-cont models (analog pointers)</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#share-your-images">Share your images</a>
|
||||
<ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#images-can-be-rejected-if">Images can be rejected if</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -196,24 +184,9 @@
|
||||
<div class="section" itemprop="articleBody">
|
||||
|
||||
<h1 id="learn-a-model-with-your-own-images">Learn a model with your own images</h1>
|
||||
<p>If your device has new, different digits and the existing models don't recognize them well, you can collect your own images and so we can train the model better. This helps you and also others as the models get more accurate. this also applies if you have a model that is already known, but the neural models do not produce good results.</p>
|
||||
<p>For experienced users, the training can also done by yourself (see below). </p>
|
||||
<p>Before you go ahead, please check if your digits/pointers are not yet contained in the training data. A visual overview is available at <a href="https://jomjol.github.io/neural-network-digital-counter-readout">digits</a> resp. <a href="https://jomjol.github.io/neural-network-analog-needle-readout/">pointers</a>.</p>
|
||||
<h2 id="before-you-start">Before you start</h2>
|
||||
<p>Poor recognition is often caused by blurred images, low contrast or incorrect setting of the ROIs. Therefore, check these possibilities first, as additional training will bring little improvement here.</p>
|
||||
<p>You do not need train the models by yourself if you don't want (see section <a href="#share-your-images">Share your images</a>). In most cases we will integrate your images in the training dataset of the models. Only if we fear a degradation of the models or you need a different behaviour, we might not include the data in the standard models (see at bottom of page for reasons).</p>
|
||||
<h2 id="collecting-images">Collecting images</h2>
|
||||
<p>The neural network is trained based on a set of images that have already been collected over time. If your digits are included or at least very similar to included images, the chance is very high that the neural network is working fine for you as well.</p>
|
||||
<p>The neural network configuration is stored in the TensorFlow Lite format as <code>*.tfl</code> or <code>*.tflite</code> in the <code>/config</code> directory on the SD-Card. A model can be updated (or a new one added) by uploading the new file and activating it on the configuration page or in the config file <code>/config/config.ini</code>.</p>
|
||||
<p>In order to incorporate new digits a training set of images is required. The training images needs to be collected in the final setup with the help of the <code>Digits</code> or <code>Analog</code> log settings (not to be confused with the <code>Data</code> or <code>Debug</code> log). Enable the logging of the images on the configuration page or in the config file <code>/config/config.ini</code>:</p>
|
||||
<p><img alt="" src="../img/enable_log_image.jpg" /></p>
|
||||
<p>Now be patient! You have to wait until it has collected an image of each digit of every type. They wil lbe placed on the SD-Card inthe folder <code>/log/digit/</code> resp. <code>/log/anaolog/</code>. The fastest way to get the images to your PC is to remove the SD-card from the ESP32 module and insert it into the card reader of yur PC.
|
||||
Then search for two..three images of each digit (<strong>not more! :-)</strong>). We provide programs which will sort out duplicate images for you, see below.</p>
|
||||
<h2 id="collecting-images-for-dig-class100dig-contana-class100">Collecting images for dig-class100/dig-cont/ana-class100</h2>
|
||||
<p>For digits, <a href="https://github.com/haverland/collectmeterdigits">Collectmeterdigits</a> resp for pointers <a href="https://github.com/haverland/collectmeteranalog">collectmeteranalog</a> can be sused to collect the images easily. Read the project readme for detailed instructions.</p>
|
||||
<h2 id="train-the-model-by-yourself-optional">Train the model by yourself (optional)</h2>
|
||||
<p>For training the model you will need a python and Jupyter installation.
|
||||
<strong>This is optional and only suggested if you want to get into it deeper yourself!</strong></p>
|
||||
<p>Once you have collected and selected your own images (see <a href="../collect-new-images/">Collect images to improve the models</a>), you can train your very own model with them.</p>
|
||||
<p><strong>This is an optional step and only suggested for advances users!</strong></p>
|
||||
<p>For training the model you will need a python and Jupyter installation.</p>
|
||||
<p>All current labeled images you can find under <a href="https://github.com/jomjol/neural-network-digital-counter-readout/tree/master/ziffer_sortiert_raw">ziffer_sortiert_raw</a></p>
|
||||
<h3 id="dig-class11-models-digits">dig-class11 models (digits)</h3>
|
||||
<p>Fork and checkout <a href="https://github.com/jomjol/neural-network-digital-counter-readout">neural-network-digital-counter-readout</a>.</p>
|
||||
@@ -245,20 +218,12 @@ Then search for two..three images of each digit (<strong>not more! :-)</strong>)
|
||||
<p>Run <a href="https://github.com/jomjol/neural-network-analog-needle-readout/blob/main/Train_CNN_Analog-Readout_100-Small1_Dropout.ipynb">Train_CNN_Analog-Readout_100-Small1_Dropout.ipynb</a> and/or <a href="https://github.com/jomjol/neural-network-analog-needle-readout/blob/main/Train_CNN_Analog-Readout_Version-Small2.ipynb">Train_CNN_Analog-Readout_Version-Small2.ipynb</a>. The model to upload to your device you can find in the project folder.</p>
|
||||
<h2 id="share-your-images">Share your images</h2>
|
||||
<p>If the results are good you can share the images as pull-request. Please images only!</p>
|
||||
<p>If you not able to create a pull request or don't know what it is, open an <a href="https://github.com/jomjol/AI-on-the-edge-device/issues">issue</a> and put the zipped images in it.</p>
|
||||
<h3 id="images-can-be-rejected-if">Images can be rejected if</h3>
|
||||
<ul>
|
||||
<li>As same as dig-class11 collected, more than 1000 images of your device are really to much. </li>
|
||||
<li>images are not good configured (ROIs) will be rejected. It reduces the accuracy of the networks.</li>
|
||||
<li>Images with too little focus will be rejected. </li>
|
||||
<li>Images with too much blur are rejected.</li>
|
||||
</ul>
|
||||
<p>Our models are to small to recognize everything in any quality. So we use only images of medium or good quality.</p>
|
||||
<p>See <a href="../collect-new-images/#share-your-images">Share your images</a> for details.</p>
|
||||
|
||||
</div>
|
||||
</div><footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||||
<a href="../Watermeter-specific-analog---digital-transition/" class="btn btn-neutral float-left" title="Analog/Digital Transition on Watermeters"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||||
<a href="../collect-new-images/" class="btn btn-neutral float-left" title="Collect images to improve the models"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||||
<a href="../Correction%20Algorithm/" class="btn btn-neutral float-right" title="Correction Algorithm">Next <span class="icon icon-circle-arrow-right"></span></a>
|
||||
</div>
|
||||
|
||||
@@ -286,7 +251,7 @@ Then search for two..three images of each digit (<strong>not more! :-)</strong>)
|
||||
</span>
|
||||
|
||||
|
||||
<span><a href="../Watermeter-specific-analog---digital-transition/" style="color: #fcfcfc">« Previous</a></span>
|
||||
<span><a href="../collect-new-images/" style="color: #fcfcfc">« Previous</a></span>
|
||||
|
||||
|
||||
<span><a href="../Correction%20Algorithm/" style="color: #fcfcfc">Next »</a></span>
|
||||
|
||||
Reference in New Issue
Block a user