Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Accessing Images in a folder on Spresense SD card
-
Hello, how can I access images from the memory of a microcontroller and perform image operations on them. I want to save a training and testing Dataset for ML on the microcontroller (Spresense) SD card, then access the images and image labels, how can I implement this task? thank you in advance.
-
Hey, @Benediction-1-2
If you just want to perform image operations on your datasets, here is where you can find the image processing functions of the sdk library:
https://developer.sony.com/develop/spresense/developer-tools/api-reference/api-references-spresense-sdk/group__imageproc__funcs.htmlI'm currently working on a simple example using these functions and as soon as I do I'll send you the link here.
In case you are thinking about actually training the model on the microcontroller, then usually the training is not done on the micro. We train on a computer and then deploy the pretrained model to the Spresense board.
Here are a few resources that can help you with the training aspect:Edge Impulse: https://www.edgeimpulse.com/
You can do both training and deployment using the Edge Impulse platform. They support the spresense board and have detailed guides.TFLMRT example:
https://developer.sony.com/develop/spresense/docs/sdk_tutorials_en.html#_tflmrt_sample_application
This sample application teaches how to train your own tensorflow model using a python then transform it to a tensorflow lite model. -
Hey Camila, I am familiar with the training on the computer and deploying the pretrained model on the MCU. I have a simple MLP model in C and I am hoping for it to work on the spresense. The issue I currently have is accessing my dataset saved on the SD Card. Please let me know if you get the example ready. Thank you for the help.
-
@Benediction-1-2
On the meantime, this example loads an hand-written digit image (pgm) and a neural network model (nnb) from an SD Card
and does forward propagation after feeding the image.https://github.com/sonydevworld/spresense/tree/master/examples/dnnrt_lenet
Also, this sample application opens a jpeg image (you can specify the path as being on the SD card) and decodes it. The decoded image is saved as .YUV
https://developer.sony.com/develop/spresense/docs/sdk_tutorials_en.html#_tutorial_jpeg