Skip to content

A sound-based classifier of several trams in operation in Prague

Notifications You must be signed in to change notification settings

laurencepettitt/tram-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tram classifier

A sound-based classifier of several trams in operation in Prague.

Installation

Make sure you have a virtual python environment, with a python version newer than 3.7.

Then just install the dependencies.

pip install -e .

Usage

Just run the classifier on a file.

python tram_classifier/classify.py [/path/to/test_file.wav]

You will get a CSV output, of Tram Events found in the file.

Retraining from scratch

If your would like to retrain the CNN classifier:

python tram_classifier/training/train.py

It will take a while to download the dataset (~1GB), extract features and fit the data to the model. Subsequent runs will use cached data for much of this. To reset a cache, you can delete the cache's folder, such as tram_classifier/cache or tram_classifier/dataset/cache.

About

A sound-based classifier of several trams in operation in Prague

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages