Code Monkey home page Code Monkey logo

uncertainty_calibration_audio_classifiers's Introduction

Uncertainty Calibration for Deep Audio Classifiers

This repository contains the PyTorch code for our paper [Uncertainty Calibration for Deep Audio Classifiers] accepted by INTERSPEECH2022. The experiments are conducted on the following two datasets which can be downloaded from the links provided:

  1. ESC-50
  2. GTZAN

Preprocessing

The preprocessing is done separately to save time during the training of the models.

For ESC-50:

python preprocessing/preprocessingESC.py --csv_file /path/to/file.csv --data_dir /path/to/audio_data/ --store_dir /path/to/store_spectrograms/ --sampling_rate 44100

For GTZAN:

python preprocessing/preprocessingGTZAN.py --data_dir /path/to/audio_data/ --store_dir /path/to/store_spectrograms/ --sampling_rate 22050

Training the Models using Base and Dropout

The configurations for training the models are provided in the config folder. The sample_config.json explains the details of all the variables in the configurations. The command for training is:

python train.py --config_path /config/your_config.json

Training the Models using focal loss

python train_with_focal.py --config_path /config/your_config.json

Training the Models using SNGP

python train_with_sngp.py --config_path /config/your_config.json

References

  1. Our paper accepted by InerSpeech 2022, now available on ArXiv.com, https://arxiv.org/abs/2206.13071
  2. https://github.com/kimjeyoung/SNGP-BERT-Pytorch
  3. https://github.com/kamalesh0406/Audio-Classification
  4. Rethinking CNN Models for Audio Classification. (https://arxiv.org/abs/2007.11154)

uncertainty_calibration_audio_classifiers's People

Contributors

shijing001 avatar

Stargazers

Gaorong zhao avatar meisa233 avatar

Watchers

 avatar

uncertainty_calibration_audio_classifiers's Issues

Typo

You misspelled "uncertainty" as "unicertainty" in the respository name.

Inaccurate Results in SNGP Model

Description:
I encountered a problem with the SNGP model in the repository. The results it provides seem to be inaccurate and do not align with the expected results mentioned in the paper. Here are the details of the issue:

Steps to reproduce:

Train the SNGP model for 100 epochs using the provided training script.

Expected results (based on paper):
Accuracy: 84.5%
Expected Calibration Error (ECE): 0.048

Actual results:

After training the SNGP model for 100 epochs, I obtained the following results:
Accuracy: 69.685%
ECE: 0.086

I also increased the training epochs to 1200, but the results did not significantly improve:
Accuracy: 79.66%
ECE: 0.080

Additional information:
I followed the instructions in the repository's documentation for training and evaluating the SNGP model.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.