Ei_run_classifier returns EI_IMPULSE_DSP_ERROR

Hi Louis,

Let me know when this fix is done. I run a fresh model and check out.

Best Regards,

Rakesh

Hi @Ranchpal,

Our engineering team is still working on it, a fix will be pushed soon!

Thank you,
– Jenny

Hi @Ranchpal,

The fix has been deployed and will be live in the Studio later today. You will need to delete your block, save your impulse, re-add the block and re-train your model.

Thank you!
– Jenny

Hello Jenny,

Thanks! We will check the same tomorrow and update if same is working fine.

Best Regards,

Rakesh

1 Like

Hello Jenny,

We followed the steps below.

  1. Deleted the blocks
  2. Saved the impulse
  3. Re-added the blocks
  4. Retrained the model
  5. Deployed the model using C++ SDK on nrf52833

Unfortunately, I am not able to build the optimized SDK. I get a lot of errors for the edge-impulse-sdk files.

I am attaching the image. The errors are a lot more, they continue for few more pages.

Secondly,
When I work with unoptimized model these error are not present, but ‘ei_run_classifier()’ returns ‘-5’ (i.e ‘EI_IMPULSE_DSP_ERROR’ ) still. Kindly look into it.

Thanks,
Rakesh

Hi @Ranchpal,
Can you paste here the first compilation error? Your screenshot is showing some later errors, but they are usually the consequence of the first error that the compiler is printing (usually some header files can’t be found, etc.).
Also, can you tell me how do you compile your project? What toolchain do you use?

Best regards,
Matt

Hi Mateusz,

This is my first error.
Compiler i am using is GCC ARM Compiler 9 2019 q4 release.

If you want, I could share the make file that i am using to build the project. I am not sure how to attach files here.

Thanks,
Rakesh

Hi @Ranchpal,

You can create a GitHub public Gist and paste the link here: https://gist.github.com/

Hi Rakesh,
It seems like your console has dropped earlier errors and lines. You can try this advice to save all output of the compilation process.

Best regards,
Matt

Hello Mateusz,

we are still unable to implement this. Can we get private paid consultation to resolve this issue? We raised same directly through website to the sales team but not heard back yet.

Best Regards,

Rakesh

Hello @Ranchpal ,

Can you tell me which one of your projects have the issue please?

Regards,

Louis

Hi Louis,

This is Ranchpal-project-1.

Best Regards,

Rakesh

Hi @Ranchpal,
I took a look at your models and generally they look fine and compile without any issues on other targets. The only issues that I see are:

  1. You have prepared a model for fusion sensor type (EI_CLASSIFIER_SENSOR is set to EI_CLASSIFIER_SENSOR_FUSION). This type of sensor is not yet supported on all our targets (currently Arduino Nano 33 BLE and Raspberry Pi RP2040). Support for Nordic’s boards is in progress and will be released in a few weeks.
  2. Even if you would like to run your model on other targets, the second issue is sensors axes names. Currently you are using acc_x, acc_y etc., while we are using accX, accY in our reference firmware (see one of the fusion sensor definition).

I assume you have made fully custom firmware, so it’s hard to help you without sharing your full source code.

Best regards,
Matt

Hello @Ranchpal ,

If you need to change axis names, it is currently tricky to do it in the studio… :confused:
Here is a quick script that will help you to do that. You can export your data, run the script and import them back on your project.

Save the following code in a file called replace_axis.py:

#!/usr/bin/env python
import argparse
import os
import glob
import json


def find_and_replace(input, old_axis, new_axis):
    for filename in glob.glob(os.path.join(input, '*.json')):
        print(filename)
        with open(filename) as file:
            data = json.load(file)

            for item in data['payload']['sensors']:
                item['name']=item['name'].replace(old_axis, new_axis)
                
            with open(filename, 'w') as file:
                json.dump(data, file)

if __name__=="__main__":
    print("Find and replace labels") 
    a = argparse.ArgumentParser()
    a.add_argument("--input", help="input folder")
    a.add_argument("--old_axis", help="old axis name")
    a.add_argument("--new_axis", help="new axis name")
    args = a.parse_args()
    print(args)
    find_and_replace(args.input, args.old_axis, args.new_axis)

#exemple: python3 replace_axis.py --input training --old_axis acc_x --new_axis accX

Regards,

Louis

Hello Louis,

thanks for the advice! we just try out by changing axis names and let you know if that helps.

Best Regards,

Rakesh

Hello Mateusz,

We are just trying out the axis name change thing if that fix the issue. If that didn’t we will share the full source code. Let you know shortly.

Thanks!

Rakesh

Hello Mateuz & Louis,

We implemented the ‘axis name’ but, the model is still returning the same error code (-5). Let us know how do we share the whole code for your reference.

Thanks,
Rakesh

Hello @Ranchpal,

You can create a GitHub public Gist and paste the link here: https://gist.github.com/

Regards,

Louis

Hello Louis,

We have created a GitHub Gist. please see the link below to access same.

Thanks!

Rakesh

Hello Louis,

Have you get time to go through the code? Can we get some insight or time when we can expect some update on this?

Thanks!

Rakesh