Git Product home page Git Product logo

gianlucapaolocci / sound-classification-on-raspberry-pi-with-tensorflow Goto Github PK

View Code? Open in Web Editor NEW
91.0 9.0 29.0 394 KB

In this project is presented a simple method to train an MLP neural network for audio signals. The trained model can be exported on a Raspberry Pi (2 or superior suggested) to classify audio signal registered with USB microphone

License: MIT License

Python 100.00%
machine-learning multilayer-perceptron-network tensorflow tensorflow-models audio-analysis librosa raspberry dataset audio-signals raspberry-pi sound-classification

sound-classification-on-raspberry-pi-with-tensorflow's Introduction

SOUND CLASSIFICATION WITH TENSORFLOW ON RASPBERRY PI

alt text

BUILD THE PROJECT

The project is developed and tested with Python 2.7.

Install following Python libraries on your PC/Workstation and Raspberry Pi:

Tensorflow, Scikit-learn, Librosa

Install following library on your Raspberry only:

Sounddevice
  1. DOWNLOAD UrbanSound8K DATASET

https://serv.cusp.nyu.edu/projects/urbansounddataset/urbansound8k.html

  1. TRAIN THE MODEL

Set the right path where you downloaded the dataset in your code.

Set the right path where you want to save the trained model.

Run "trainModel.py" on your PC/Workstation.

  1. RUN THE MODEL

Export the trained model on you Raspberry Pi ('model.meta', 'model.index', 'checkpoint', 'model.data-00000-of-00001').

Export 'fit_params.npy' on your Raspberry Pi.

Run "classiPi.py" on your Raspberry and enjoy!

REMEMBER TO

Remember to reference this project in your works.

AUTHORS

Gianluca Paolocci, University of Naples Parthenope, Science and Techonlogies Departement, Ms.c Applied Computer Science https://www.linkedin.com/in/gianluca-paolocci-a19678b6/

Luigi Russo, University of Naples Parthenope, Science and Techonlogies Departement, Ms.c Applied Computer Science

CONTACTS

if you have problems, questions, ideas or suggestions, please contact me to:


sound-classification-on-raspberry-pi-with-tensorflow's People

Contributors

gianlucapaolocci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sound-classification-on-raspberry-pi-with-tensorflow's Issues

Bird classification

Hello,

Is it possible to only classify birds or create a response when a bird call is heard?

Or is this beyond the scope of this project?

Kind regards,

Error lines 38

The system said "did you mean print(sub_dir)?
How can I fix it??

I had an error on training in trainModel.py

I had an error on this line
train_x, test_x, train_y, test_y = train_test_split(features, labels, test_size=0.3, random_state=0)

they said
ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

How can I solve this?

how can I add new class

hi
How can I add new classes to the code?
beside classiPi.py doesn't work with me. it always as to install liborsa where there is no liborsa for raspian.
where can I find a dataset that is appropriate to the code?
thanks so much.
your code is very helpful.

How to use it with your own dataset?

  • are fsID and salience necessary and if so, what do they mean?
  • where to set the filename of the csv in the metadata subfolder?
  • I get ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters. with my training set. What is the likely cause? "Not found"?

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.