Run eim model in linux distro

Possibile implementation eim model to machine linux using python ??
If yoes what best method??
Thanks a lot…

@Daniele771 Yes, see https://docs.edgeimpulse.com/docs/edge-impulse-for-linux -> Python section.

But Every time i Need to expand my dataset i’ll ti retrain all?

@Daniele771,

Yes, consider this learning process as an iterative process.
When you have more data, once in a while retrain your model and redeploy it and you will have better results over time.

Regards,

So i install in Linux edge-impulse-cli and ok but i’m not fully understand now how use model trained

.
Can i download model in tflite from dashboard ?
For testing in python …

Yes you can.

To use your model with python I would mostly start with one of our examples like this one:

Try to run it and then you can start changing the code.

We also have different examples for different sensors depending on your project:

  • Audio - grabs data from the microphone and classifies it in realtime.
  • Camera - grabs data from a webcam and classifies it in realtime.
  • Camera (full frame) - grabs data from a webcam and classifies it twice (once cut from the left, once cut from the right). This is useful if you have a wide-angle lense and don’t want to miss any events.
  • Still image - classifies a still image from your hard drive.
  • Custom data - classifies custom sensor data.

Regards,

Louis

2 Likes

That’s fantastic !!! Right now i have only two word on and off
:slight_smile: how to handle???

You can try the Audio script then :wink:

1 Like

Thanks a lot ok so i installed edge-linux-cli but when i run … for example edge-impulse-daemon
say command not found i attach installation …! how to connect at my web dashboard or download eim file??

You need the Edge Impulse for Linux CLI, see the install scripts here: https://docs.edgeimpulse.com/docs/edge-impulse-for-linux.

1 Like

Seems something wrong on path … i write ```
npm config get prefix

and i have 
/home/dani/.npm-global

Ok solve problem for Kali Linux !! Need to add Path manually " nano etc/enviroments and add for my case /home/dani/.npm-global/bin but now he Say can’t run in x64 machine only arm processor can i download manually eim file ?

@Daniele771 I’ve enabled the EIM models in the UI in your project (See Deployment tab). Note that on Linux x86 we don’t load hardware acceleration at the moment, so this will be pretty slow for image models, but fine for audio.

1 Like

thanks a lot ! i download x86 eim…file but i have this error when i run classify.py

python3 classify.py dani.eim 1 ⨯
Traceback (most recent call last):
File “/home/dani/Immagini/linux-sdk-python-master/examples/audio/classify.py”, line 65, in
main(sys.argv[1:])
File “/home/dani/Immagini/linux-sdk-python-master/examples/audio/classify.py”, line 43, in main
model_info = runner.init()
File “/home/dani/.local/lib/python3.9/site-packages/edge_impulse_linux/audio.py”, line 132, in init
model_info = super(AudioImpulseRunner, self).init()
File “/home/dani/.local/lib/python3.9/site-packages/edge_impulse_linux/runner.py”, line 26, in init
raise Exception(‘Model file "’ + self._model_path + ‘" is not executable’)
Exception: Model file “/home/dani/Immagini/linux-sdk-python-master/examples/audio/dani.eim” is not executable

i try to run also that

edge-impulse-linux-runner --model-file /home/dani/Immagini/linux-sdk-python-master/examples/audio/dani.eim

events.js:291
throw er; // Unhandled ‘error’ event
^

Error: spawn /home/dani/Immagini/linux-sdk-python-master/examples/audio/dani.eim EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted ‘error’ event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: ‘EACCES’,
code: ‘EACCES’,
syscall: ‘spawn /home/dani/Immagini/linux-sdk-python-master/examples/audio/dani.eim’,
path: ‘/home/dani/Immagini/linux-sdk-python-master/examples/audio/dani.eim’,
spawnargs: [ ‘/dev/shm/edge-impulse-clihPBt1n/runner.sock’ ]
}

can clarify why? help :slight_smile:

It seems that you don’t have the permission to access this .eim file.
Can you try using sudo? Or grant the directory access (linux-sdk-python-master/) to your user?

Regards,

You need to make the model executable via:

chmod +x path-to-model.eim
1 Like