This guide covers usage of the ML Plugin with our design partner, Edge Impulse. From the ML Plugin, it is possible to upload data to the Edge Impulse Studio, where it can be used to train and test ML models for classification, regression, and anomaly detection.
The ML Plugin and Data Visualizer are both plugins to MPLAB X and are available to install in the plugins manager.
This section contains instructions for using the ML plugin with Edge Impulse, including uploading new data to the Edge Impulse Studio and viewing impulse classification results within the ML Plugin for model testing. To learn more about how to use the Edge Impulse Studio to create machine learning solutions, check out one of our example applications - "Smart Dumbbell with Edge Impulse", "Keyword Spotting with Edge Impulse", "Sound Recognition with Edge Impulse".
Login With Your Edge Impulse Credentials
When using Edge Impulse within the ML plugin you will be prompted to log in. This enables the plugin to upload data directly to your projects in the Edge Impulse Studio. If you still need to create an Edge Impulse account you can do so for free on the Edge Impulse registration page.
Upload New Data
After logging in, configure the upload by filling in the necessary fields. First select a project to upload to, and enter the name of the device where the data is being collected from. Next, choose the data source(s) to be uploaded and input the data sampling interval. Then select a destination for the data (i.e., Training, Testing), and enter a data label that describes the selected data segment.
Sensor names and sampling intervals should remain consistent within each Edge Impulse Studio project. If adding more data to a project that already contains data, then be sure to keep these consistent.
Classify New Data
Once you have a trained impulse in the Edge Impulse Studio, it is possible to classify new data with it and view the results in the ML Plugin. This feature uploads the selected data to the Testing endpoint and then displays the classification results of the uploaded sample.
The upload configuration remains the same except that the endpoint field is removed since this data will always be sent to the Testing endpoint. After clicking Classify Data, the sample will be uploaded and the classification results will be fetched from the Edge Impulse Studio for display. Classified samples are first segmented with a sliding window as it is configured in the selected project. Then the resultant window segments are fed into the impulse for inference. The ML Plugin will display the frequency of each event type within the uploaded sample.
Uploaded samples must be at least the length of the window size used in the selected Edge Impulse project to produce at least one segment for classification.
Classification can also be tested by navigating to the Live Classification tab within the Edge Impulse Studio and then uploading new data to the Testing endpoint, at which point the Edge Impulse Studio will refresh to display the classification results for the new data. This is useful when more detailed results are needed.
The Edge Impulse Studio also supports batch testing in the Model Testing tab, which allows for quick testing of the entire test set while iterating on the Impulse configuration.
You now understand how to collect live sensor data from your target device and send it to the Edge Impulse Studio for developing ML solutions that can be used in your embedded application.