Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 28 to 28 | ||||||||
Michael O'Cleirigh has started a project on github trying to port these examples to MicroPython (https://github.com/mocleiri/tensorflow-micropython-examples![]() The hardware | ||||||||
Changed: | ||||||||
< < | For the person detection example several esp32-cam boards integrating a camera with the ESP32 CPU are available. Some provide an SD card interface, such that photos or videos from the camera can be recorded onto an SD card. Some of these boards have only 16 output pins and are therefore very limited in the number of GPIO lines available to interface external devices and others use 40 output pins. None of them has a microphone and/or an accelerometer on board. To my knowledge there is only one such board using the ESP32S3 chip with vector instructions speeding up neural network operations and that one is a 40 pin device. I therefore selected this device for my studies. | |||||||
> > | For the person detection example several esp32-cam boards integrating a camera with the ESP32 CPU are available. Some provide an SD card interface, such that photos or videos from the camera can be recorded onto an SD card. Some of these boards have only 16 output pins and are therefore very limited in the number of GPIO lines available to interface external devices and others use 40 output pins. Only the ESP32-S3-FN8 has a camera and a microphone and none have an accelerometer on board. | |||||||
Changed: | ||||||||
< < | ![]() | |||||||
> > | For all demos except the magic wand example I therefore use the ESP32-S3-FN8 | |||||||
Changed: | ||||||||
< < | Of course it is possible to interface the microphone and/or the accelerometer to the above board, but in this case a bread board and quite a bit of external cabling is needed. I therefore prefer to use the WeMos D1 mini eco-system with an ESP32S3 CPU, a triple base and prototype boards onto which the microphone and the accelerometer are mounted. | |||||||
> > | ![]() | |||||||
The photos below show the CPU and the backplane board.
| ||||||||
Line: 85 to 87 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 36 to 36 | ||||||||
The photos below show the CPU and the backplane board.
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
The pinout of the ESP32S3 CPU looks as follows:
![]() | ||||||||
Changed: | ||||||||
< < | https://iotworkshop.africa/pub/IoT_Course_English/TinyML/sch_s3_mini_v1.0.0.pdf | |||||||
> > | https://iotworkshop.africa/pub/IoT_Course_English/TinyML/sch_s3_mini_v1.0.0.pdf | |||||||
in addition we need the microphone and the accelerometer. The I2S driver in MicroPython support the MH-ET Live and the SPH0645 microphones. There are many accelerometers on the market and I selected the LSM6DS3 because this is also used in the TinyML book.
| ||||||||
Line: 65 to 65 | ||||||||
Deleted: | ||||||||
< < | ||||||||
Deleted: | ||||||||
< < | ||||||||
-- ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 63 to 63 | ||||||||
Added: | ||||||||
> > | ||||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 19 to 19 | ||||||||
| ||||||||
Changed: | ||||||||
< < | In the meantime the examples have been ported to the ESP32 and the ESP32S3 as well. These examples are written in C++ using the Espressif development environment esp-idf. The magic wand demo is not available for the ESP32. | |||||||
> > | In the meantime the examples have been ported to the ESP32 and the ESP32S3 as well. These examples are written in C++ using either the Espressif development environment esp-idf or the Arduino SDK. Unfortunately the ESP32 TensorFlow library for the Arduino SDK is already a little outdated but I was able to create a TensorFlow Lite Micro source tree from the latest TFLM repository, which can be used with the ESP32 Arduino SDK. The magic wand demo is only available for the Arduino Nano 33 sense module. | |||||||
Here we go through the ESP32 C++ examples | ||||||||
Line: 41 to 43 | ||||||||
and the circuit diagram can be found here: | ||||||||
Changed: | ||||||||
< < | https://iotworkshop.africa/pub/IoT_Course_English/TinyML/sch_s3_mini_v1.0.0.pdf | |||||||
> > | https://iotworkshop.africa/pub/IoT_Course_English/TinyML/sch_s3_mini_v1.0.0.pdf | |||||||
in addition we need the microphone and the accelerometer. The I2S driver in MicroPython support the MH-ET Live and the SPH0645 microphones. There are many accelerometers on the market and I selected the LSM6DS3 because this is also used in the TinyML book.
| ||||||||
Line: 50 to 52 | ||||||||
The photo below shows the MH-ET Live microphone mounted on a prototype board. The connections are made with small cables on the back. The prototype board can then simply be plugged onto the base board.
| ||||||||
Changed: | ||||||||
< < | Setting up the PC and MicroPython for TensorFlow | |||||||
> > | Setting up the PC and MicroPython for TensorFlow | |||||||
The following pages show how to set up the PC to run TensorFlow, how to create models and how to down-scale them for use on the ESP32. Then a custom version of MicroPython must be created including the esp32-camera driver and its MicroPython interface as well as ulab, a stripped down version of numpy and scipy as well as the tflm library and its MicroPython access routines. | ||||||||
Line: 71 to 72 | ||||||||
Comments | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 35 to 35 | ||||||||
The photos below show the CPU and the backplane board.
| ||||||||
Added: | ||||||||
> > | The pinout of the ESP32S3 CPU looks as follows: | |||||||
Changed: | ||||||||
< < | in addition we need the microphone and the accelerometer. The I2S driver in MicroPython support the MH-ET Live and the SPH0645 microphones. There are many accelerometers on the market and I selected the LSM6DS3 because this is also used in the TinyML book. | |||||||
> > | ![]() | |||||||
| ||||||||
Line: 77 to 83 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | |||||||||||||||||
Line: 23 to 23 | |||||||||||||||||
Here we go through the ESP32 C++ examples | |||||||||||||||||
Changed: | |||||||||||||||||
< < | Michael O'Cleirigh has started a project on github trying to port these examples to MicroPython (https://github.com/mocleiri/tensorflow-micropython-examples![]() ![]() | ||||||||||||||||
> > | Michael O'Cleirigh has started a project on github trying to port these examples to MicroPython (https://github.com/mocleiri/tensorflow-micropython-examples![]() | ||||||||||||||||
The hardware | |||||||||||||||||
Changed: | |||||||||||||||||
< < | There are several esp32-cam boards integrating a camera with the ESP32 CPU. Some also provide an SD card interface, such that photos or videos from the camera can be recorded onto an SD card. Some of these boards have only 16 output pin and are therefore very limited in the number of GPIO lines available to interface external devices and others use 40 output pins. None of them has a microphone and/or an accelerometer on board. To my knowledge there is only one such board using the ESP32S3 chip with vector instructions speeding up neural network operations and that one is a 40 pin device. I therefore selected this device for my studies. | ||||||||||||||||
> > | For the person detection example several esp32-cam boards integrating a camera with the ESP32 CPU are available. Some provide an SD card interface, such that photos or videos from the camera can be recorded onto an SD card. Some of these boards have only 16 output pins and are therefore very limited in the number of GPIO lines available to interface external devices and others use 40 output pins. None of them has a microphone and/or an accelerometer on board. To my knowledge there is only one such board using the ESP32S3 chip with vector instructions speeding up neural network operations and that one is a 40 pin device. I therefore selected this device for my studies. | ||||||||||||||||
![]() | |||||||||||||||||
Added: | |||||||||||||||||
> > | Of course it is possible to interface the microphone and/or the accelerometer to the above board, but in this case a bread board and quite a bit of external cabling is needed. I therefore prefer to use the WeMos D1 mini eco-system with an ESP32S3 CPU, a triple base and prototype boards onto which the microphone and the accelerometer are mounted.
The photos below show the CPU and the backplane board.
| ||||||||||||||||
Setting up the PC and MicroPython for TensorFlow The following pages show how to set up the PC to run TensorFlow, how to create models and how to down-scale them for use on the ESP32. Then a custom version of MicroPython must be created including the esp32-camera driver and its MicroPython interface as well as ulab, a stripped down version of numpy and scipy as well as the tflm library and its MicroPython access routines. | |||||||||||||||||
Line: 54 to 69 | |||||||||||||||||
| |||||||||||||||||
Added: | |||||||||||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 43 to 43 | ||||||||
Added: | ||||||||
> > | ||||||||
-- ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 24 to 24 | ||||||||
Here we go through the ESP32 C++ examples
Michael O'Cleirigh has started a project on github trying to port these examples to MicroPython (https://github.com/mocleiri/tensorflow-micropython-examples![]() ![]() | ||||||||
Changed: | ||||||||
< < | Setting up the PC and MicroPython for TensorFlow | |||||||
> > | The hardwareThere are several esp32-cam boards integrating a camera with the ESP32 CPU. Some also provide an SD card interface, such that photos or videos from the camera can be recorded onto an SD card. Some of these boards have only 16 output pin and are therefore very limited in the number of GPIO lines available to interface external devices and others use 40 output pins. None of them has a microphone and/or an accelerometer on board. To my knowledge there is only one such board using the ESP32S3 chip with vector instructions speeding up neural network operations and that one is a 40 pin device. I therefore selected this device for my studies.![]() | |||||||
The following pages show how to set up the PC to run TensorFlow, how to create models and how to down-scale them for use on the ESP32. Then a custom version of MicroPython must be created including the esp32-camera driver and its MicroPython interface as well as ulab, a stripped down version of numpy and scipy as well as the tflm library and its MicroPython access routines. | ||||||||
Line: 36 to 42 | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
-- ![]() Comments | ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 19 to 19 | ||||||||
| ||||||||
Added: | ||||||||
> > | In the meantime the examples have been ported to the ESP32 and the ESP32S3 as well. These examples are written in C++ using the Espressif development environment esp-idf. The magic wand demo is not available for the ESP32. Here we go through the ESP32 C++ examples | |||||||
Michael O'Cleirigh has started a project on github trying to port these examples to MicroPython (https://github.com/mocleiri/tensorflow-micropython-examples![]() ![]() Setting up the PC and MicroPython for TensorFlow |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 32 to 32 | ||||||||
Added: | ||||||||
> > | ||||||||
-- ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 19 to 19 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Michael O'Cleirigh has started a project on github trying to port these examples to MicroPython (https://github.com/mocleiri/tensorflow-micropython-examples![]() ![]() ![]() | |||||||
> > | Michael O'Cleirigh has started a project on github trying to port these examples to MicroPython (https://github.com/mocleiri/tensorflow-micropython-examples![]() ![]() | |||||||
Setting up the PC and MicroPython for TensorFlowThe following pages show how to set up the PC to run TensorFlow, how to create models and how to down-scale them for use on the ESP32. Then a custom version of MicroPython must be created including the esp32-camera driver and its MicroPython interface as well as ulab, a stripped down version of numpy and scipy as well as the tflm library and its MicroPython access routines. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
TinyMLIntroduction | ||||||||
Line: 17 to 17 | ||||||||
It describes 4 different projects:
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
![]() ![]() ![]() Setting up the PC and MicroPython for TensorFlow |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
TinyMLIntroductionMachine learning (ML) algorithms usually work on huge datasets and require an enormous amount of resources. On the other hand many mobile phone use face recognition to improve photographs or speech recognition for natural language translation. This can be achieved by training machine learning models, in particular neural networks, on the big computer, which may use a GPU (Graphical Procession Unit) available on many of them, while the trained model is scaled down and used on the mobile phone. Not long ago Google has released TensorFlow,![]() TinyML with MicroPython on the ESP32The TinyML library is described in a book published by O'Reilly.![]()
![]() ![]() ![]() Setting up the PC and MicroPython for TensorFlowThe following pages show how to set up the PC to run TensorFlow, how to create models and how to down-scale them for use on the ESP32. Then a custom version of MicroPython must be created including the esp32-camera driver and its MicroPython interface as well as ulab, a stripped down version of numpy and scipy as well as the tflm library and its MicroPython access routines. Finally the installation of the TinyML examples on the ESP32 is explained.
![]() Comments |