Skip to content

Conversation

@uraich
Copy link

@uraich uraich commented Aug 31, 2023

I started to play with the tinyML examples for the ESP32 in C and MicroPython.
I have an ESP32S3-WROOM with camera on board. 2 days ago I managed to get the MicroPython firmware going for the board with u-lab, the camera driver and microlite installed. It uses esp-idf-v5.1 (latest stable version) and the latest MicroPython from github.
When trying to find the jupyter notebook for the hello world example I had quite some trouble because the links from the TinyML book do not work any longer.
It might be a good idea to these notebooks to the repository.

@vikramdattu
Copy link
Collaborator

@uraich thanks for the contribution.

The tflite_micro repo has some resources under each example here.

Do you think, adding a pointer to these material in each of examples here would be sufficient for developers to get started on training and quantisation?

@uraich
Copy link
Author

uraich commented Aug 31, 2023

Adding the link is certainly helpful. However, finding the create_sine_model.ipynb is pretty difficult. No idea why they removed it. It is not in the tflite-micro depository either. I found it in
https://github.com/tensorflow/tensorflow/blob/453399f82c212a676b9510b3dc214c7f86e06d7c/tensorflow/lite/micro/examples/hello_world/create_sine_model.ipynb
I found train_speech_model.ipynb at the place indicated in the book.
I am myself still a beginner with ML but, having quite some experience with micro-controllers, I helped Michael O'Cleirigh to get the person detection example going on MicroPython.
The idea is to get all the demo programs (including the magic wand) to work on the ESP32 in C and in Python. I did quite a bit of work on accelerometers in Python trying to get at the data needed to run the example. I am still not sure of the compatibility with the model but maybe I could train my own model.

@uraich
Copy link
Author

uraich commented Aug 31, 2023

Ok, I had a look through the links you gave me and now I understand, why the notebook has gone. However, I don't think that the new way of building the model helps in understanding what is going on, at least if you are a beginner.
I don't really know bezel and there is a lot for me to learn even just to understand the ML hello world!
I managed to install bezel though and the programs are compiling. Now I have to go through the sources for a better understanding.

@uraich
Copy link
Author

uraich commented Sep 1, 2023

Now I created my own jupyter notebook copy/pasting snippets from train.py. This allows me to go through each of the steps one by one and see the result.
In addition I added a few commands to visualize the model. This for examples shows the final quantized model as seen by netron:
image
I think, now I fully understand what is going on.
Thanks for the link!

@github-actions github-actions bot changed the title added the jupyter noteebooks added the jupyter noteebooks (TFMIC-4) Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants