Difference between revisions of "SBCX-TN-005: Using TensorFlow to implement a Deep Learning image classifier based on Azure Custom Vision-generated model"

From DAVE Developer's Wiki
Jump to: navigation, search
Line 25: Line 25:
 
The testbed consists of an [[:Category:SBC-AXEL|SBCX Single Board Computer]] equipped with an i.MX6Q-powered [[:Category:AxelLite|Axel Lite]] system-on-module (SoM).
 
The testbed consists of an [[:Category:SBC-AXEL|SBCX Single Board Computer]] equipped with an i.MX6Q-powered [[:Category:AxelLite|Axel Lite]] system-on-module (SoM).
  
Regarding the software, the board runs Armbian Buster GNU/Linux distribution, which is described in [[SBCX-TN-004:_Running_Armbian_Buster_(Debian_10)|this TN].
+
Regarding the software, the board runs Armbian Buster GNU/Linux distribution, which is described in [[SBCX-TN-004:_Running_Armbian_Buster_(Debian_10)|this TN]].
  
 
TensorFlow release is 2.0.0. TensorFlow was built with the proper configuration for the i.MX6 SoC. For more details, please refer to [https://github.com/lhelontra/tensorflow-on-arm this project] by [https://github.com/lhelontra Leonardo Lontra].
 
TensorFlow release is 2.0.0. TensorFlow was built with the proper configuration for the i.MX6 SoC. For more details, please refer to [https://github.com/lhelontra/tensorflow-on-arm this project] by [https://github.com/lhelontra Leonardo Lontra].
  
 
==Test application==
 
==Test application==
 +
The test application is a classical image classifier. The following classes are supported:
 +
<pre>
 +
Avocado
 +
Banana
 +
Green Apple
 +
Hand
 +
Orange
 +
Red Apple
 +
</pre>
 +
 +
 +
The following image shows the application's architecture.
 +
TBD
 +
 +
It mainly consists of the following blocks:
 +
* The top-level application code (Python)
 +
* The TensorFlow platform
 +
* The TensorFlow model
 +
* The OpenCV library.
 +
 +
As stated in the introduction, the classifier is based on a model that was generated with Azure Custom Vision. In particular, the model was retrieved from [https://dev.to/azure/creating-an-image-recognition-solution-with-azure-iot-edge-and-azure-cognitive-services-4n5i this project] by [https://dev.to/gloveboxes Dave Glover]. Glover's project is extremely useful to understand how Custom Vision—and, in general, Azure Cognitive Services—work.
 +
 +
Glover followed the approach suggested by Azure, which makes use of containers. For the sake of simplicity, this Technical Note is based on a simpler strategy, which is closer to the usual approach used in the embedded world. As such, it doesn't make use of any container.
 +
 +
  
  
 
==Performances==
 
==Performances==
 
<pre class="board-terminal">
 
<pre class="board-terminal">
 +
 
</pre>
 
</pre>

Revision as of 14:42, 26 October 2019

Info Box
SBC-AXEL-02.png Applies to SBC AXEL
Axel-04.png Applies to Axel Ultra
Axel-lite 02.png Applies to Axel Lite
Axel-02.png Applies to AXEL ESATTA
Warning-icon.png This technical note was validated against specific versions of hardware and software. It may not work with other versions. Warning-icon.png

History[edit | edit source]

Version Date Notes
1.0.0 Ocotber 2019 First public release

Introduction[edit | edit source]

Nowadays, Machine Learning (ML) and Deep Learning (DL) technologies are getting popular in the embedded world as well.

Several different approaches are available to deploy such technologies on embedded devices. This Technical Note (TN) describes such an approach, which makes use of a Tensor Flow model generated with Microsoft Azure Custom Vision service.

Testbed configuration[edit | edit source]

The testbed consists of an SBCX Single Board Computer equipped with an i.MX6Q-powered Axel Lite system-on-module (SoM).

Regarding the software, the board runs Armbian Buster GNU/Linux distribution, which is described in this TN.

TensorFlow release is 2.0.0. TensorFlow was built with the proper configuration for the i.MX6 SoC. For more details, please refer to this project by Leonardo Lontra.

Test application[edit | edit source]

The test application is a classical image classifier. The following classes are supported:

Avocado
Banana
Green Apple
Hand
Orange
Red Apple


The following image shows the application's architecture. TBD

It mainly consists of the following blocks:

  • The top-level application code (Python)
  • The TensorFlow platform
  • The TensorFlow model
  • The OpenCV library.

As stated in the introduction, the classifier is based on a model that was generated with Azure Custom Vision. In particular, the model was retrieved from this project by Dave Glover. Glover's project is extremely useful to understand how Custom Vision—and, in general, Azure Cognitive Services—work.

Glover followed the approach suggested by Azure, which makes use of containers. For the sake of simplicity, this Technical Note is based on a simpler strategy, which is closer to the usual approach used in the embedded world. As such, it doesn't make use of any container.



Performances[edit | edit source]