Running impulse in real on, interfaced with an application

So, I’ve developed this project that utilizes a mobile application I created, along with the ingestion service and remote management API in order to send recorded data to the edge servers, request classification, then request the results.

I was wondering, is it possible to deploy the impulse, then imbed the SDK into my application in order to do the classification in real time and return the results continuously? All of the examples seem to use the library as a standalone application. I guess I could just start a new process with the executable and pass it in the data and snag the results.

I’ve been looking through the documentation, and its clear that I can deploy as a c++ library which is my application’s native language and what I’ve used. But, I haven’t really found anything in terms of supplying data to any function in order to be able to continually classify data as it comes in.

I could just be missing some forum thread or documentation statement somewhere.

If I have could anyone please point me in the right direction?

1 Like

This might be what you are looking for https://github.com/edgeimpulse/example-standalone-inferencing

The entire CPP library is portable and you need to include “edge-impulse-sdk/classifier/ei_run_classifier.h”

You need to get the data into the right format before using run_classifier() the details are in the source. Look at the signal_t type.

The overhead of getting the OS to start a new process for each inference and getting the results could impact your application but in theory should work. I have used that technique in production systems (to access a database using a command line client with queries every second) and it worked in that situation but for the amount number crunching being done with DL I’m sure you will run into performance trouble when you put your application into a live environment if you don’t encounter issues when testing with this approach.

@DoitfortheLulz so if you haven’t seen the Linux release yet I’d recommand to take a look, as it does just that and it comes with examples for realtime classification of images / audio, and examples on how to do custom data in Go / Node / Python / C++.