You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/06.nicla/boards/nicla-voice/tutorials/glass-break-detector/content.md
+21-17Lines changed: 21 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The Nicla Voice and Edge Impulse offer powerful tools for monitoring environment
25
25
26
26

27
27
28
-
This application note will show you how to build and deploy a machine learning model on Nicla Voice with Edge Impulse that detects glass-breaking sounds. The content will cover how audio data is processed and used for training for efficient sound classification.
28
+
This application note will show you how to build and deploy a machine learning model on Nicla Voice with Edge Impulse that detects glass-breaking sounds. The content will cover how audio dataset is managed and used for training for efficient sound classification.
29
29
30
30
## Goals
31
31
@@ -68,9 +68,9 @@ Edge Impulse and Nicla Voice provide a highly flexible and adaptable solution fo
68
68
69
69
These applications, such as monitoring buildings, vehicles, and public spaces, are some examples that can develop into a comprehensive system integrated with the Arduino Cloud:
70
70
71
-
-**Buildings:** Identify glass-breaking incidents in residential, commercial, or industrial properties. Alerts can trigger lockdown protocols, notify security teams, and log incidents in real time.
71
+
-**Buildings:** Identify glass-breaking incidents in residential, commercial, or industrial properties. Programmed alerts can trigger lockdown protocols, notify security teams, and log incidents in real time.
72
72
73
-
-**Vehicles:** Detect windshield breakage and provide real-time SOS signals, vehicle location, or license plate details. This feature is particularly beneficial for enhancing vehicle security.
73
+
-**Vehicles:** Detect windshield breakage and provide real-time SOS signals, vehicle location, or license plate details. This feature is particularly beneficial for improving vehicle security.
74
74
75
75
-**Custom Environments:** Deploy in specific setups like public transportation, specialized labs, or sensitive equipment areas where glass-related incidents require immediate attention.
76
76
@@ -82,15 +82,19 @@ This adaptability provides comprehensive coverage and flexible response mechanis
82
82
83
83
The application will be based on a preconfigured example model created by Aurelien Lequertier that is available on the [Arduino Machine Learning Tools](https://mltools.arduino.cc/public/210541/latest).
84
84
85
-
This example detects anomalous sounds of glass breaking using the [DCASE rare sound events dataset](http://dcase.community/challenge2017/task-rare-sound-event-detection-results). With this example, you will learn how to build and deploy a glass-breaking detection system.
85
+
This example detects anomalous sounds of glass breaking using the [**DCASE** rare sound events dataset](http://dcase.community/challenge2017/task-rare-sound-event-detection-results). With this example, you will learn how to build and deploy a glass-breaking detection system.
86
86
87
87
### Data Collection
88
88
89
-
Data collection is the foundation of any machine learning project. An existing dataset known as [**DCASE dataset** (Detection and Classification of Acoustic Scenes and Events)](http://dcase.community/challenge2017/task-rare-sound-event-detection-results) will be used in this application note to avoid the practical challenges of recording actual glass-breaking sounds.
89
+
Data collection is the foundation of any machine learning project. This application note will use an existing [**DCASE dataset** (Detection and Classification of Acoustic Scenes and Events)](http://dcase.community/challenge2017/task-rare-sound-event-detection-results) to avoid the practical challenges of recording actual glass-breaking sounds.
90
90
91
-
This dataset provides high-quality audio samples of glass-breaking sounds and background noise, which is essential for training and testing the model.
91
+
This dataset provides a broad collection of audio samples designed for rare sound event detection, including glass-breaking sounds and background noise. It includes:
92
92
93
-
You will have *300 audio samples* for training and *54 samples* for testing. These samples represent two main categories:
93
+
-**Mixtures:** 1500 of 30 second audio mixtures, totaling 12 hours and 30 minutes of audio, created by combining isolated events with background recordings.
94
+
-**Isolated Events:** 474 unique events across three target categories: baby crying, **glass breaking**, and gunshot.
95
+
-**Background Recordings:** 1121 of 30 second recordings of ambient sounds totaling 9 hours and 20 minutes of audio.
96
+
97
+
For this application note, we focus on glass-breaking sounds. From this dataset, *300 audio samples* are used for training and *54 samples* for testing. These samples represent two main categories:
94
98
95
99
- Glass-breaking events
96
100
- Non-glass-breaking ambient noise
@@ -99,14 +103,14 @@ Using the [**DCASE**](http://dcase.community/challenge2017/task-rare-sound-event
99
103
100
104
The audio data was preprocessed with **Edge Impulse**. Its user interface allows you to manage audio files, including cropping unnecessary segments and splitting longer recordings into manageable pieces.
101
105
102
-
This preprocessing step ensures that only relevant data is provided into the training pipeline, maximizing the model performance.
103
-
104
-
The preprocessing step includes following steps:
106
+
This preprocessing step ensures that only relevant data is provided into the training pipeline, maximizing the model performance. The preprocessing step includes following steps:
105
107
106
108
-**Audio Segmentation:** Splitting long audio recordings into smaller, manageable clips for more effective training.
107
109
-**Noise Handling:** Removing background noise or irrelevant segments to ensure the dataset focuses on the target sounds.
108
110
-**Normalization:** Ensuring consistent audio levels across all samples to improve model reliability. Using Edge Impulse GUI, you can crop unnecessary segments, annotate audio clips, and simplify this process.
109
111
112
+
Using Edge Impulse, you can simplify these preprocessing steps with tools to crop unnecessary segments, annotate audio clips, and visualize the processed data. The dataset can be found within the **Data acquisition** section in the Edge Impulse platform.
113
+
110
114

111
115
112
116
The above image shows the dataset overview in Edge Impulse, where you can see the collected audio samples for glass-breaking events. The data is divided into training and testing sets to ensure the model's generalization.
@@ -119,23 +123,23 @@ In this step, you will use an audio processing block optimized for the NDP120 pr
119
123
120
124
Dimensionality reduction techniques visualize the features, describing different clusters for glass-breaking and non-glass-breaking sounds.
121
125
122
-
The image below shows the time series and audio processing block configuration in Edge Impulse. Configuring parameters like window size and frequency is important for extracting meaningful audio data features.
126
+
The image below shows the time series and audio processing block configuration in Edge Impulse. Configuring parameters like window size and frequency is important for extracting meaningful audio data features. It can be found within the **Create Impulse** section in the Edge Impulse platform.
The processing block provides configurable parameters such as window size and feature scaling, allowing you to fine-tune signal processing. This application note emphasizes the ease with which these configurations can be adjusted.
127
131
128
132

129
133
130
-
In the image above, you can see the feature generation output. The data is visualized in clusters, which helps you understand the different features of the glass-breaking and non-glass-breaking classes.
134
+
In the image above, you can see the feature generation output. The data is visualized in clusters, which helps you understand the different features of the glass-breaking and non-glass-breaking classes. It can be found within the **Parameters** tab from **Syntiant** section in the Edge Impulse platform.
131
135
132
136
### Model Training
133
137
134
-
You will use a dense neural network architecture that is well-suited for audio classification tasks. The configuration ensures compatibility with the hardware, using a 968-millisecond audio window for processing requirements.
138
+
You will use a dense neural network architecture that is well-suited for audio classification tasks. The configuration ensures compatibility with the hardware, using a 968millisecond audio window for processing requirements.
135
139
136
-
Edge Impulse’s Eon tuner can automatically optimize model parameters, simplifying the process for you without extensive machine learning expertise.
140
+
Edge Impulse’s Eon tuner can help automatically optimize model parameters, simplifying the process for you without extensive machine learning expertise.
137
141
138
-
The model achieved an accuracy of *89%* during training, showing its capability to differentiate between glass-breaking and background noises.
142
+
The model achieved an accuracy of *89%* during training, showing its capability to differentiate between glass-breaking and background noises. This can be found within the **Classifier** section in the Edge Impulse platform.
@@ -146,15 +150,15 @@ The model achieved an accuracy of *89%* during training, showing its capability
146
150
147
151

148
152
149
-
The image shows the training settings and the neural network architecture used in Edge Impulse. The Eon tuner can help you optimize hyperparameters like learning rate, number of neurons, and layer configurations to achieve the best balance between model size, accuracy, and latency.
153
+
The image shows the training settings and the neural network architecture used in Edge Impulse. This window can be found within the **Generate features** tab from **Syntiant** section in the Edge Impulse platform. The Eon tuner can help you optimize hyperparameters like learning rate, number of neurons, and layer configurations to achieve the best balance between model size, accuracy, and latency.
150
154
151
155
### Model Testing
152
156
153
157
After training, the model is evaluated using a test dataset that includes previously unseen audio samples. This evaluation helps ensure the model generalizes adequately to new data and determine glass-breaking events under various conditions.
The image above shows the testing results with an accuracy of **99.12%**.
161
+
The image above shows the testing results with an accuracy of **99.12%**. This can be found within the **Model testing** section in the Edge Impulse platform.
158
162
159
163
The confusion matrix highlights the model's capability to classify audio samples correctly while identifying potential areas for improvement.
0 commit comments