Path: blob/main/AudioClassification.ipynb
122 views
Kernel: audioc
1. Import and Install Dependencies
1.1 Install Dependencies
In [ ]:
1.2 Load Dependencies
In [ ]:
2. Build Data Loading Function
2.1 Define Paths to Files
In [ ]:
2.2 Build Dataloading Function
In [ ]:
2.3 Plot Wave
In [ ]:
In [ ]:
3. Create Tensorflow Dataset
3.1 Define Paths to Positive and Negative Data
In [ ]:
3.2 Create Tensorflow Datasets
In [ ]:
3.3 Add labels and Combine Positive and Negative Samples
In [ ]:
4. Determine Average Length of a Capuchin Call
4.1 Calculate Wave Cycle Length
In [ ]:
4.2 Calculate Mean, Min and Max
In [ ]:
In [ ]:
In [ ]:
5. Build Preprocessing Function to Convert to Spectrogram
5.1 Build Preprocessing Function
In [ ]:
5.2 Test Out the Function and Viz the Spectrogram
In [ ]:
In [ ]:
In [ ]:
6. Create Training and Testing Partitions
6.1 Create a Tensorflow Data Pipeline
In [ ]:
6.2 Split into Training and Testing Partitions
In [ ]:
6.3 Test One Batch
In [ ]:
In [ ]:
7. Build Deep Learning Model
7.1 Load Tensorflow Dependencies
In [ ]:
7.2 Build Sequential Model, Compile and View Summary
In [ ]:
In [ ]:
In [ ]:
7.3 Fit Model, View Loss and KPI Plots
In [ ]:
In [ ]:
In [ ]:
In [ ]:
8. Make a Prediction on a Single Clip
8.1 Get One Batch and Make a Prediction
In [ ]:
In [ ]:
8.2 Convert Logits to Classes
In [ ]:
9. Build Forest Parsing Functions
9.1 Load up MP3s
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
9.2 Build Function to Convert Clips into Windowed Spectrograms
In [ ]:
9.3 Convert Longer Clips into Windows and Make Predictions
In [ ]:
In [ ]:
9.4 Group Consecutive Detections
In [ ]:
In [ ]:
In [ ]:
10. Make Predictions
10.1 Loop over all recordings and make predictions
In [ ]:
In [ ]:
10.2 Convert Predictions into Classes
In [ ]:
10.3 Group Consecutive Detections
In [ ]:
11. Export Results
In [ ]:
In [ ]: