Edge Implse basic tutorial Next Steps

Hello,
I’ve followed edge impulse basic tutorials:
Gesture detection
Cough detection
Sight detection
Any suggestions on how to improve my models or goes to the next level.
For examples:
Gesture detection: should I train more, add different gestures, anomaly gesture, add more class,
Cough detection: How to add different type of cough by just labelling as anomaly cough, cold cough, Covid-Cough , adding pre-trained cough from another example like this one.
Sight detection: do I add different classes if I want to have more distinctions between objects for example I need to add different food like banana, apple, orange. How t incorporate pre train objects from other sources and which data set to use from for Edge impulse.
For example this cough dataset is png fileshttps://www.kaggle.com/kartikay99k/cough-detection
but I am using edge impulse cough detection wave audio file. How to use both on edge impulse?
I’ve read tips and tricks on how to increase model performance (https://docs.edgeimpulse.com/docs/increasing-model-performance) and that will help and would like to know what type of data, how to organise them, which one to use first etc.
Sorry for to many questions at once , as I trying to advance gradually without burning steps and realising afterwards.
Thanks for any tips.

Hi @AATOS, it depends mostly on what problem you want to solve. Think of issues you have in your house, or in your wider environment that you think could be solved with a machine either feeling, hearing or seeing things. E.g. what @kartben2 did around detecting booze (https://twitter.com/kartben/status/1258791793073815552) or @JanFiedler’s magic wand (Magic Wand Audio Recognition Project).

For example this cough dataset is png fileshttps://www.kaggle.com/kartikay99k/cough-detection
but I am using edge impulse cough detection wave audio file. How to use both on edge impulse?

As they say on this Kaggle page, you can find the original audio files in the ESC-50 dataset. I’d recommend you to upload these files into Edge Impulse.

I need to add different food like banana, apple, orange. How t incorporate pre train objects from other sources and which data set to use from for Edge impulse.

If you have data in JPG or PNG format you can upload them into your project.

Thanks for the tip @janjongboom , For cough detection tutorial is it then possible to mismatch wave file and jpg or png fles. I’ve also found wave files https://www.kaggle.com/mmoreaux/environmental-sound-classification-50 . The files are 2G. Is there a limite to upload files on Edge Impulse.

, For cough detection tutorial is it then possible to mismatch wave file and jpg or png fles

No, you should get the WAV files.

Is there a limite to upload files on Edge Impulse.

No as long as the individual files aren’t too big that should be fine, and you set the window increase not too low.

Thanks again @janjongboom.

Hi @janjonboom
apparently it has already been done here with an edge Impulse SDk:


My question is how do I incorporate into my cough detection project.
I am trying not to reinvent the wheel. Sorry for being a pain.

@AATOS

  1. Grab the dataset from here: https://www.kaggle.com/mmoreaux/environmental-sound-classification-50 (this contains 6000 wave files)
  2. On your Edge Impulse go to Data acquisition, then click image and select the WAV files and the label.

Thanks @janjongboom for the link and pointer to upload wave files and label…
Found this dataset more related to cough detection https://www.kaggle.com/vbookshelf/respiratory-sound-database?
Its has wave files named individually and txt files.
Although the wave files are of different length 20s and more.
Uploading only accepted wave files and I did not renamed or labelled them on my cough project, now I have 19 labels on my project and can’t retrain some how. I’ve probably should have label them as cough during download.
Probably did a mistake or is the internet acting up?
.

Although the wave files are of different length 20s and more.

You can split data if it has individual coughs, via the three dots next to a sample -> Split sample.

We don’t have an easy way to bulk rename, but you can do this:

  1. Go to Dashboard > Export
  2. Choose “WAV files”
  3. Download the ZIP
  4. Go back to Dashboard, select Delete all data in this project
  5. Upload the data with the right labels

Thanks again,
I will do that once my connection to edge studio is running, I can not export or test other projects, gesture or sight right now. Not sure if it is internet connection or edge studio.

@AATOS, do you see an error or? Studio is running fine.

No error. when I click on classify existing test and load sample nothing happen.
When I click export on dashboard nothing either.

Tried on windows computer with chrome browser and its Edge Studio loading fine. On Raspberry Pi 4 with Chromium I am having issue loading or exporting. Edge Studio works on Chromium before. Now I am having issue with Chromium.

Do you see any errors in the browser log?

Chomium issue solved, UBock extension was turned on and blocking EdgeImpulse. Working fine after granting permission.

Thanks @janjongboom, your feedback has been very effective.

  1. Go to Dashboard > Export
  2. Choose “WAV files”
  3. Download the ZIP
  4. Go back to Dashboard, select Delete all data in this project
  5. Upload the data with the right labels
    Done and works well.

You can split data if it has individual coughs, via the three dots next to a sample -> Split sample.

Have not done the split yet but the distinction between respiratory sound and cough is correct when classify existing test sample between what is a cough or a regular respiration.
So far I am impress buy the training sample without much fiddling .
How do I move to the next level which is to distinguish between different type of coughs?
Do I add new cough classes or is their a feature that can distinguish different type of the same class?

Hi @AATOS, I think a good way forward would be to:

  1. Isolate the cough (you can use split or crop per sample) in e.g. 1 second long single window.
  2. Label these coughs according to your classes.

So data normalization: cleaning up the data, making sure you have clean labeled windows. Then train on 1s window with 1s window increase. Then if you have a good model deploy to device and run in continuous mode (edge-impulse-run-impulse --continuous).

Great!!
Started splitting data for 1 second long single windows.
Next step after is to label according to classes. Does the number of classes impact training or accuracy.
Will start with 1 additional class as I’ve already have 3 classes already (noise, cough, respiratory). Will start with something simple like asthma or bronchites from data set then COVID-19. Does that seems reasonable.

Yep, start small and keep iterating, that works best!

1 Like