Skip to main content

Test implementation for Audio Spectrogram Transformer by Olga Slizovskaia

This repository provides a test implementation of the Audio Spectrogram Transformer described in the original paper. Please, note, that this implementation is lacking several important details compared to the original paper, such as dataset normalization, data augmentation routines and optimal hyperparameters selection. The results that you will obtain using the code provided in this repository, will differ severely from the results reported in the original paper.

Requirements

This repository requires a working python3.9 installation and uses poetry for dependency management and packaging.
Please, install poetry using the official guidelines.

You also need to download the ESC-50 dataset and specify the path to the dataset as dataset_dir parameter in hparams.py configuration file.

Installation

To install all necessary dependencies, run:

poetry env use 3.9

poetry install

Usage

We use the standard 5-fold cross-validation scheme for evaluating the classification model. The folds are defined in the datasets meta file and hardcoded for training. To train and evaluate the model, run:

python train.py

or

poetry run python train.py .

Results

The best test accuracy score achieved with this model without any pretraining is 0.39 as you can see in the following plot:

test_accuracy

The model overfits singnificantly reaching training loss values as low as 1.8 and only reaching validation and test loss values about 2.3.

Release files for ast-slizovskaia 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ast-slizovskaia 0.1.4
File Size Uploaded
ast_slizovskaia-0.1.4.tar.gz 35.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ast-slizovskaia 0.1.4
File Interpreter ABI Platform
ast_slizovskaia-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 70.9 kB

Release files / ast_slizovskaia-0.1.4.tar.gz

Download URL ast_slizovskaia-0.1.4.tar.gz
Size 35.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aeadd043a43db1869a498f1740ca4463cd951cc3b15540c6398ab4ad69c463cd
BLAKE2b-256 checksum
How to use checksums
689af0c9bef57cbc926b5a3157d0204df49f4abef0870d09fff997f5547f32d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.8.8 Darwin/20.5.0

Release files / ast_slizovskaia-0.1.4-py3-none-any.whl

Download URL ast_slizovskaia-0.1.4-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f3d9f3c11be1a9fbd0b25b4c5e8217e95934c6506a54581c0d337094a9280ee
BLAKE2b-256 checksum
How to use checksums
1466a9b80e075b950744f1c7a4e0cd4e2738959ec023d7a4c1d9a4671c5bf9f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.8.8 Darwin/20.5.0

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page