AIOmarRehan commited on
Commit
381d0aa
·
verified ·
1 Parent(s): 004aa2d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -3
README.md CHANGED
@@ -1,3 +1,91 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ ## Mel-Spectrogram Image Dataset (Generated via Custom Pipeline)
6
+
7
+ > **This dataset was fully generated through my notebook
8
+ > *“Building an Audio Classification Pipeline with DL”* available on my profile.**
9
+ > It represents a complete end-to-end transformation from raw audio to clean, balanced Mel-spectrogram images suitable for deep learning.
10
+
11
+ ---
12
+
13
+ ### **Dataset Summary**
14
+
15
+ | Property | Description |
16
+ | ---------------------------- | --------------------------------------------- |
17
+ | **Number of Classes** | 13 distinct audio categories |
18
+ | **Original Audio per Class** | ~40 raw recordings |
19
+ | **Average Duration** | ~5 seconds per audio file |
20
+ | **Final Images per Class** | 125 Mel-spectrogram images |
21
+ | **Final Dataset Size** | 13 × 125 = **1625 images** |
22
+ | **Sampling Rate** | Standardized to **16 kHz** |
23
+ | **Audio Length** | Uniform **5-second** fixed length |
24
+ | **Spectrogram Type** | 128-Mel frequency bins, `melspectrogram → dB` |
25
+
26
+ ---
27
+
28
+ ### **High-Level Processing Pipeline**
29
+
30
+ The dataset was built using a **fully custom preprocessing, cleaning, and augmentation pipeline**, implemented step-by-step in the notebook.
31
+
32
+ #### **1. Data Ingestion**
33
+
34
+ * Loaded all raw audio files from 13 folders
35
+ * Parsed metadata (sample rate, duration, amplitude, SNR, etc.)
36
+
37
+ #### **2. Cleaning & Standardization**
38
+
39
+ * Removed corrupt, silent, or unreadable audio files
40
+ * Normalized peak amplitudes
41
+ * Trimmed silence using `librosa.effects.trim`
42
+ * Performed noise reduction (`noisereduce`)
43
+ * Converted all audio to **mono**
44
+ * Resampled to **16,000 Hz**
45
+ * Ensured each sample is **exactly 5 seconds**
46
+
47
+ #### **3. Dataset Balancing**
48
+
49
+ * Used augmentation for minority classes
50
+ * Used controlled undersampling or oversampling where necessary
51
+ * Verified all classes contain equal counts
52
+
53
+ #### **4. Audio Augmentation (Used for Balancing & Variability)**
54
+
55
+ Augmentations built with **audiomentations**:
56
+
57
+ * Time shift
58
+ * Pitch shift
59
+ * Time stretching
60
+ * Gaussian noise injection
61
+ * Random perturbations for robustness
62
+
63
+ #### **5. Splitting & Chunking**
64
+
65
+ * Long samples were split into 5-second chunks
66
+ * Shorter samples padded to match target duration
67
+ * Ensured strict uniformity before feature extraction
68
+
69
+ #### **6. Mel-Spectrogram Generation**
70
+
71
+ Converted all cleaned audio files into Mel-spectrogram images using:
72
+
73
+ * `n_fft = 1024`
74
+ * `hop_length = 512`
75
+ * `n_mels = 128`
76
+ * Converted to decibel scale (`power_to_db`)
77
+ * Saved images in **RGBA format** to preserve color-mapped spectral information
78
+
79
+ ---
80
+
81
+ ### **Final Technical Description**
82
+
83
+ > **“The final dataset consists of 13 audio classes, each expanded to exactly 125 Mel-spectrogram images through a rigorous pipeline of cleaning, normalization, augmentation, noise reduction, resampling, duration standardization, and feature extraction. All processing steps were implemented in my notebook *‘Building an Audio Classification Pipeline with DL,’* where raw 5-second audio recordings were transformed into high-quality Mel-spectrogram images suitable for deep learning models.”**
84
+
85
+ ---
86
+
87
+ ### **Examples of the Images**
88
+
89
+ ![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F27304693%2Ffdf7046a261734cd8f503c8f448ca6ad%2Fdownload.png?generation=1763570826533634&alt=media)
90
+
91
+ ![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F27304693%2Fea53570ce051601192c90770091f7ceb%2Fdownload%20(1).png?generation=1763570855911665&alt=media)