How to deploy SVM on ARM Cortex-M processor
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Micael Coutinho
el 1 de En. de 2019
Comentada: Walter Roberson
el 18 de Mzo. de 2019
Hi everyone.
I have a project in which I have to deploy a SVM (support vector machine) model into an ARM Cortex-M processor. I have already successfully trained my SVM, but I don't know how to deploy it on my edge device (microcontroller). I know that there is a library for neural network (CMSIS NN), but it has little support, as far as I can see. Can anyone help?
0 comentarios
Respuesta aceptada
Walter Roberson
el 1 de En. de 2019
You do code generation on a https://www.mathworks.com/help/stats/classificationsvm.html ClassificationSVM object using https://www.mathworks.com/help/stats/classreg.learning.classif.compactclassificationsvm.predict.html predict().
In your interactive MATLAB session, you save() the classification model you trained. In the code for use on the deployed machine, you load() the model and predict() using it.
2 comentarios
Nikhilesh Karanam
el 15 de Mzo. de 2019
Dear Walter Roberson,
Which interactive MATLAB session you mean? Could you please share the link of it? Thanks in advance :)
Regards,
Nikhilesh K
Más respuestas (1)
Micael Coutinho
el 2 de En. de 2019
4 comentarios
Nikhilesh Karanam
el 18 de Mzo. de 2019
Editada: Nikhilesh Karanam
el 18 de Mzo. de 2019
Thanks. Well, yes. deploying the training portion is not possible. I have used classification learner App, selected Linear SVM for my project, trained the model got a validation accuracy of 98%. I generated a matlab script from the App and used the function for prediction of new data in the generated script which looks like this:
yfit = trainedClassifier.predictFcn(T2)
I get good results on MATLAB and I am stuck here. Please let me know how I can move forward from this point in generating C code if you have any idea. Thanks :)
Walter Roberson
el 18 de Mzo. de 2019
I am not sure. You might have to alter that to use
yfit = predict(trainedClassifier, T2);
Ver también
Categorías
Más información sobre Code Generation for ARM Cortex-M and ARM Cortex-A Processors en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!