Solutions
ML Classification Example
2min
- After Checkout, 2 tar.gz files, and one zip are expected to be downloaded
- motionModel.zip contains the ML classification model PB file
- ml-classification.tar.gz is a docker container that runs training and test data for verification of model
- helper-bundle.zip is an optional zip file which has:
- A system template that can be used for a quick setup of the demo
- Some meta data about the model (like input tensor, output tensor names etc) just for reference
- There is a Tengoscript code as well, incase the model output needs further modification
- Log in to your LitmusEdge, Navigate to Analytics -> Models. Upload the motionModel.zip file here (do not unzip it before uploading)
- Navigate to DH or Analytics or Flows, and add a topic called subscribeTopic. This is used a subscription topic for Nats messages, and will be used to keep tracking of polling intervals (keep polling interval 1s)
- Navigate to Applications -> Images and Click on the Plus icon "Upload Image" and upload the ml-classification.tar.gz file here
- Navigate to Applications -> Containers and enter the following command there:
- run the command docker run us-docker.pkg.dev/litmus-customer-facing/litmus-solutions/ml-classification:1.0.0 (or replace with whatever image:tag name you have
- This will start the container that published training/test data to various topics, that we will use for feeding to the ML model
- Navigate to System -> Backup/Restore -> Upload Template, and upload the classification-template.jsonthat should be in the helper bundle
- This should load Analytics with all the required inputs, load the Tensorflow processor with all parameters, and also add a TengoScripting processor with some additional (optional) modification of model output
- If this step fails for some reason, just use the Meta and TengoScript file as a reference to re-create the above (just connect inputs to Tensorflow, and modify configurations accordingly)
- Once Tensorflow ingests required amount of values, the output data will start populating. It may take some time (depending on the window value parameter). One is expected to see array of values, which shows classification as walking, standing, sitting, etc.