From 75d3be9959216af08966b684e85436036ca0a5fb Mon Sep 17 00:00:00 2001 From: kayvandenaker <34678030+kayvandenaker@users.noreply.github.com> Date: Wed, 22 Jun 2022 11:45:00 +0200 Subject: [PATCH 1/6] Update content.md --- .../tutorials/image-classification/content.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md b/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md index df131444e7..8bb5e922ac 100644 --- a/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md +++ b/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md @@ -147,7 +147,7 @@ Deploying the ML model to your board requires a few steps. The Edge Impulse Stud  -Since the Nicla Vision doesn't have any on-board SRAM we need to build the machine learning model into the firmware and load it from the flash. To do so, go to https://github.com/openmv/openmv and fork the repository. In your fork click on "Actions" and enable the workflows by clicking on the green button. +Since the Nicla Vision doesn't have any on-board SRAM we need to build the machine learning model into the firmware and load it from the flash. To do so, go to https://github.com/openmv/openmv and [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repository. In your fork click on "Actions" and enable the workflows by clicking on the green button. Rename the machine learning model and the label file to fruit_detection.tflite and fruit_detection.txt respectively. In your fork, replace the built-in machine learning model under `src/lib/libtf/models` with the model you downloaded from Edge Impulse Studio. Commit the files and push the commit to the repository. It will build a new firmware automatically. @@ -157,7 +157,7 @@ You can inspect the build process under "Actions".  -Once the firmware has been built you can download it from the releases section that you can find in the "Code" tab. Put the board in bootloader mode and click on the connect symbol in the OpenMV IDE. In the dialog select "Load a specific firmware". Select the firmware that you just created and flash it to the board. +Once the firmware has been built you can download it from the releases section that you can find in the "Code" tab. Put the board in bootloader mode and click on the connect symbol in the OpenMV IDE. In the dialog select "Load a specific firmware". Select firmware.bin in the folder that you just created and flash it to the board.  @@ -228,3 +228,9 @@ while(True): ## Conclusion You have learned about classification as a machine learning concept which categorizes a set of data into classes. You have also learned how supervised learning works and what quantization of a model means. Furthermore you have learned to train a custom TFLite machine learning model and deploy it to your board. + +## Troubleshooting + +### GitHub Workflow + +If you’re encountering difficulties while using the GitHub workflow in your forked repository, make sure that your `MobileNetV2 96x96 0.1` as model type. Also make sure you are changing the files in your forked repository and not in the original OpenMV repository. From bc25addcdaa0e634e012f91c95c347910d9abe08 Mon Sep 17 00:00:00 2001 From: kayvandenaker <34678030+kayvandenaker@users.noreply.github.com> Date: Wed, 22 Jun 2022 11:52:13 +0200 Subject: [PATCH 2/6] Update content.md --- .../boards/nicla-vision/tutorials/getting-started/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/05.nicla/boards/nicla-vision/tutorials/getting-started/content.md b/content/hardware/05.nicla/boards/nicla-vision/tutorials/getting-started/content.md index 0848b90e13..2413f984b1 100644 --- a/content/hardware/05.nicla/boards/nicla-vision/tutorials/getting-started/content.md +++ b/content/hardware/05.nicla/boards/nicla-vision/tutorials/getting-started/content.md @@ -35,7 +35,7 @@ The OpenMV IDE is meant to provide an Arduino like experience for simple machine Using the OpenMV IDE you can run [MicroPython](http://docs.MicroPython.org/en/latest/) scripts on the Nicla Vision board. MicroPython provides a lot of classes and modules that make it easy to quickly explore the features of the Nicla Vision. In this tutorial you will first download the OpenMV IDE and set up the development environment. [Here](https://openmv.io/) you can read more about the OpenMV IDE. OpenMV comes with its own firmware that is built on MicroPython. You will then learn to write a simple script that will blink the on-board RGB LED using some basic MicroPython commands. -***Before proceeding with the tutorial please update the board's bootloader. You can do this by first downloading the latest version of the "Mbed OS Nicla core" in the Arduino IDE. Then go to "File > Examples > STM32H747_System > STM32H747_updateBootloader" and upload this sketch to your board. After the sketch is uploaded follow the instructions in the serial monitor.*** +***Before proceeding with the tutorial please update the board's bootloader. You can do this by first downloading the latest version of the "Mbed OS Nicla core" in the Arduino IDE. Then go to "File > Examples > STM32H747_System > STM32H747_manageBootloader" and upload this sketch to your board. After the sketch is uploaded follow the instructions in the serial monitor.*** ### 1. Downloading the OpenMV IDE From d519f87e9ca38db9aeb55d925bc0afe7eabbfed2 Mon Sep 17 00:00:00 2001 From: kayvandenaker <34678030+kayvandenaker@users.noreply.github.com> Date: Wed, 22 Jun 2022 11:56:57 +0200 Subject: [PATCH 3/6] Update content.md --- .../nicla-vision/tutorials/image-classification/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md b/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md index 8bb5e922ac..e87eb0fedd 100644 --- a/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md +++ b/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md @@ -50,7 +50,7 @@ To find the right configuration for your application often requires trial and er The first step is to create a representative dataset of the objects that the ML model is supposed to identify. The key is to have as much diversity in the models as possible. If we show it for example only one specific apple that has a certain size, shape and peel, then it won't be very good at recognizing other apples that look different. This is referred to as a bias and should be avoided as much as possible. In addition you need to teach the model what an apple is not. For that purpose you feed it random image data of things that are not an apple. You could name that class of image data "unknown". If you don't have such a class and the model has only ever seen an apple, it won't know what to do if there is no apple in the image. -Creating data sets in OpenMV is simple as there is a built-in function to create them. Before you proceed, connect your Nicla Vision board. Click on the connect button in the OpenMV IDE. If you haven't set up your board for OpenMV please consult the [getting started tutorial](.\tutorials\getting-started). +Creating data sets in OpenMV is simple as there is a built-in function to create them. Before you proceed, connect your Nicla Vision board. Click on the connect button in the OpenMV IDE. If you haven't set up your board for OpenMV please consult the [getting started tutorial](.\tutorials\nicla-vision\getting-started). Create a new dataset by using the menu command **Tools > Dataset Editor > New Dataset** and name it `Dataset-Fruits`. From 5cdcf2f4c810c5eca2dd323b5c8f0b347a3b0632 Mon Sep 17 00:00:00 2001 From: kayvandenaker <34678030+kayvandenaker@users.noreply.github.com> Date: Wed, 22 Jun 2022 12:01:21 +0200 Subject: [PATCH 4/6] Update content.md --- .../nicla-vision/tutorials/image-classification/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md b/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md index e87eb0fedd..dae52caeb1 100644 --- a/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md +++ b/content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md @@ -233,4 +233,4 @@ You have learned about classification as a machine learning concept which catego ### GitHub Workflow -If you’re encountering difficulties while using the GitHub workflow in your forked repository, make sure that your `MobileNetV2 96x96 0.1` as model type. Also make sure you are changing the files in your forked repository and not in the original OpenMV repository. +If you’re encountering difficulties while using the GitHub workflow in your forked repository, make sure that your `MobileNetV2 96x96 0.1` as model type, otherwise the model will likely be too big and not work. Also make sure you are changing the files in your forked repository and not in the original OpenMV repository. From 2c4b51613b5715ed3cb7e219a14ee11ac04bc220 Mon Sep 17 00:00:00 2001 From: kayvandenaker <34678030+kayvandenaker@users.noreply.github.com> Date: Wed, 22 Jun 2022 13:55:55 +0200 Subject: [PATCH 5/6] Update content/hardware/05.nicla/boards/nicla-vision/tutorials/image-classification/content.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pablo Marquínez Ferrándiz