Question/Issue: I am trying to develop an image classification model on edge impulse using the Sony-Spresense board. It is working well but I wish to perform some actions based on the class detected for the image taken by its camera board on a continuous basis. I am unable to find anything related to that.
Project ID: 125691
Context/Use case: We want to identify some machined/molded parts and classify them
Please see this API page on how to use the ei_impulse_result_t struct. After performing inference with ei_run_classifier(), the prediction results will be in that struct.
Specifically, I recommend looking at the example at the bottom of the page. There you will see how the prediction results are printed out. You can compare your prediction results to a threshold (e.g. if (result.classification[0].value > 0.5) { ... }) to determine if the image was classified as item 0 (whatever item is first in your labels list). From there, you can perform some kind of action.
Hello sir.
Thank you for your input. My main problem lies in getting the features on a continuous basis. Basically, I am having to input the feature matrix for every new image and I want to deploy my product so that after detecting a particular class the Spresense board produces an action. Similar to what the exported firmware does. However, it cannot be edited and I wanted to make some changes to it. The C/C++ firmware as I mentioned requires me to manually input a feature matrix for each new image. So how can I automate the feature matrix generation?