How to use OpenSoundscape for binary classification #1082
Replies: 1 comment
-
Hi @Mreality69, I'm happy to assist you with understanding and using OpenSoundscape, but I will not be able to provide a complete solution for you, this will be up to your group to put together given the specific details of your project. It seems like you may have a scenario where each audio file corresponds to either a positive sample ('gunshot') or a negative sample ('background'). Hopefully all of your audio files are of the same length - otherwise, you should think about annotating the specific region of each audio file that contains a gunshot. First, you will want to create a table (.csv file, which you will load into a pandas DataFrame object) which lists the audio file path in the 'file' column and the annotation (0 for background, 1 for gunshot) in a column 'gunshot'. You can add column for start_time and end_time of the audio clip, which may all be the same in this case, e.g. every clip is 0-2 seconds from the audio file. Next, you'll want to create a CNN object with one class 'gunshot' and think about what duration of audio sample will work best - I recommend visualizing some of your positive and negative samples as spectrograms using the free program Audacity. From there, you can follow the CNN training tutorials. You can also review the Annotation tutorial notebook to understand the purpose, creation, and manipulation of audio annotations. |
Beta Was this translation helpful? Give feedback.
-
We are trying to train a ResNet50 model on a dataset with only two classes- gunshot and background. These are audio files. Now we want to train the model over this dataset's spectrograms, which could then detect gunshots. But our dataset doesn't have any audio annotations and a " .csv" file. At this moment, how we could use OpenSoundscape to create mel spectrograms and train the model? We need a complete solution and guidance.
[Note: we have read the latest documentation but couldn't understand what to do. We are a group of high school students working on a science project. So we don't have any prior expertise in this field hence we expect help from other developers here and will be grateful to them. Thanks in advanced.]
Beta Was this translation helpful? Give feedback.
All reactions