All Projects → IBM → MAX-Audio-Classifier

IBM / MAX-Audio-Classifier

Licence: Apache-2.0 license
Identify sounds in short audio clips

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to MAX-Audio-Classifier

Text and Audio classification with Bert
Text Classification in Turkish Texts with Bert
Stars: ✭ 34 (-70.43%)
Mutual labels:  audio-classification, keras-tensorflow
MAX-Audio-Embedding-Generator
Generate embedding vectors from audio files
Stars: ✭ 33 (-71.3%)
Mutual labels:  machine-learning-models
digit-recognizer-live
Recognize Digits using Deep Neural Networks in Google Chrome live!
Stars: ✭ 29 (-74.78%)
Mutual labels:  keras-tensorflow
keras-complex
Keras-Tensorflow implementation of complex-valued convolutional neural networks
Stars: ✭ 96 (-16.52%)
Mutual labels:  keras-tensorflow
gcnn keras
Graph convolution with tf.keras
Stars: ✭ 47 (-59.13%)
Mutual labels:  keras-tensorflow
Rus-SpeechRecognition-LSTM-CTC-VoxForge
Распознавание речи русского языка используя Tensorflow, обучаясь на базе Voxforge
Stars: ✭ 50 (-56.52%)
Mutual labels:  keras-tensorflow
tf-faster-rcnn
Tensorflow 2 Faster-RCNN implementation from scratch supporting to the batch processing with MobileNetV2 and VGG16 backbones
Stars: ✭ 88 (-23.48%)
Mutual labels:  keras-tensorflow
allie
🤖 A machine learning framework for audio, text, image, video, or .CSV files (50+ featurizers and 15+ model trainers).
Stars: ✭ 93 (-19.13%)
Mutual labels:  machine-learning-models
Deep-Learning-Course
Deep Learning with TensorFlow and Keras
Stars: ✭ 13 (-88.7%)
Mutual labels:  keras-tensorflow
keras-yolo3-facedetection
Real-time face detection model using YOLOv3 with Keras
Stars: ✭ 13 (-88.7%)
Mutual labels:  keras-tensorflow
One-Shot-Learning
Matching Networks Tensorflow 2 Implementation for few-shot AD diagnosis
Stars: ✭ 22 (-80.87%)
Mutual labels:  keras-tensorflow
dl-relu
Deep Learning using Rectified Linear Units (ReLU)
Stars: ✭ 20 (-82.61%)
Mutual labels:  keras-tensorflow
stocktwits-sentiment
Stocktwits market sentiment analysis in Python with Keras and TensorFlow.
Stars: ✭ 23 (-80%)
Mutual labels:  keras-tensorflow
G-SimCLR
This is the code base for paper "G-SimCLR : Self-Supervised Contrastive Learning with Guided Projection via Pseudo Labelling" by Souradip Chakraborty, Aritra Roy Gosthipaty and Sayak Paul.
Stars: ✭ 69 (-40%)
Mutual labels:  keras-tensorflow
quasi-unsupervised-cc
Implementation of the method described in the paper "Quasi-unsupervised color constancy" - CVPR 2019
Stars: ✭ 35 (-69.57%)
Mutual labels:  machine-learning-models
fall-detection-two-stream-cnn
Real-time fall detection using two-stream convolutional neural net (CNN) with Motion History Image (MHI)
Stars: ✭ 49 (-57.39%)
Mutual labels:  keras-tensorflow
label-studio-frontend
Data labeling react app that is backend agnostic and can be embedded into your applications — distributed as an NPM package
Stars: ✭ 230 (+100%)
Mutual labels:  audio-classification
GestureAI
RNN(Recurrent Nerural network) model which recognize hand-gestures drawing 5 figures.
Stars: ✭ 20 (-82.61%)
Mutual labels:  keras-tensorflow
fashion-parser
Fashion item segmentation with deep learning
Stars: ✭ 22 (-80.87%)
Mutual labels:  keras-tensorflow
Detection-of-Small-Flying-Objects-in-UAV-Videos
Code for paper "Detection of Flying Honeybees in UAV Videos"
Stars: ✭ 47 (-59.13%)
Mutual labels:  keras-tensorflow

Build Status Website Status

IBM Developer Model Asset Exchange: Audio Classifier

This repository contains code to instantiate and deploy an audio classification model. This model recognizes a signed 16-bit PCM wav file as an input, generates embeddings, applies PCA transformation/quantization, uses the embeddings as an input to a multi-attention classifier and outputs top 5 class predictions and probabilities as output. The model currently supports 527 classes which are part of the Audioset Ontology. The classes and the label_ids can be found in class_labels_indices.csv. The model was trained on AudioSet as described in the paper 'Multi-level Attention Model for Weakly Supervised Audio Classification' by Yu et al.

The model has been tested across multiple audio classes, however it tends to perform best for Music / Speech categories. This is largely due to the bias towards these classes in the training dataset (90% of audio belong to either of these categories). Though the model is trained on data from Audioset which was extracted from YouTube videos, the model can be applied to a wide range of audio files outside the domain of music/speech. The test assets provided along with this model provide a broad range.

The model files are hosted on IBM Cloud Object Storage. The code in this repository deploys the model as a web service in a Docker container. This repository was developed as part of the IBM Developer Model Asset Exchange and the public API is powered by IBM Cloud.

Model Metadata

Domain Application Industry Framework Training Data Input Data Format
Audio Classification Multi Keras/TensorFlow Google AudioSet signed 16-bit PCM WAV audio file

References

Licenses

Component License Link
This repository Apache 2.0 LICENSE
Model Files Apache 2.0 AudioSet
Model Code MIT AudioSet Classification
Test Samples Various Samples README

Pre-requisites:

  • docker: The Docker command-line interface. Follow the installation instructions for your system.
  • The minimum recommended resources for this model is 8 GB Memory and 4 CPUs.
  • If you are on x86-64/AMD64, your CPU must support AVX at the minimum.

Deployment options

Deploy from Quay

To run the docker image, which automatically starts the model serving API, run:

$ docker run -it -p 5000:5000 quay.io/codait/max-audio-classifier

This will pull a pre-built image from the Quay.io container registry (or use an existing image if already cached locally) and run it. If you'd rather checkout and build the model locally you can follow the run locally steps below.

Deploy on Red Hat OpenShift

You can deploy the model-serving microservice on Red Hat OpenShift by following the instructions for the OpenShift web console or the OpenShift Container Platform CLI in this tutorial, specifying quay.io/codait/max-audio-classifier as the image name.

Deploy on Kubernetes

You can also deploy the model on Kubernetes using the latest docker image on Quay.

On your Kubernetes cluster, run the following commands:

$ kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Audio-Classifier/master/max-audio-classifier.yaml

The model will be available internally at port 5000, but can also be accessed externally through the NodePort.

A more elaborate tutorial on how to deploy this MAX model to production on IBM Cloud can be found here

Run Locally

  1. Build the Model
  2. Deploy the Model
  3. Use the Model
  4. Development
  5. Cleanup

1. Build the Model

Clone this repository locally. In a terminal, run the following command:

$ git clone https://github.com/IBM/MAX-Audio-Classifier.git

Change directory into the repository base folder:

$ cd MAX-Audio-Classifier

To build the Docker image locally, run:

$ docker build -t max-audio-classifier .

All required model assets will be downloaded during the build process. Note that currently this Docker image is CPU only (we will add support for GPU images later).

2. Deploy the Model

To run the Docker image, which automatically starts the model serving API, run:

$ docker run -it -p 5000:5000 max-audio-classifier

3. Use the Model

The API server automatically generates an interactive Swagger documentation page. Go to http://localhost:5000 to load it. From there you can explore the API and also create test requests.

Note : The input is a 10 second signed 16-bit PCM wav audio file. Files longer than 10 seconds will be clipped so that only the first 10 seconds will be used by the model. Conversely, files shorter than 10 seconds will be repeated to create a clip 10 seconds in length.

Use the model/predict endpoint to load a signed 16-bit PCM wav audio file (you can use the fireworks.wav file located in the samples folder) and get predictions from the API.

Swagger Doc Screenshot

You can also test it on the command line, for example (with the thunder.wav file):

$ curl -F "audio=@samples/thunder.wav;type=audio/wav" -XPOST http://localhost:5000/model/predict

You should see a JSON response like that below:

{
    "status": "ok",
    "predictions": [
        {
            "label_id": "/m/06mb1",
            "label": "Rain",
            "probability": 0.7376469373703003
        },
        {
            "label_id": "/m/0ngt1",
            "label": "Thunder",
            "probability": 0.60517817735672
        },
        {
            "label_id": "/t/dd00038",
            "label": "Rain on surface",
            "probability": 0.5905200839042664
        },
        {
            "label_id": "/m/0jb2l",
            "label": "Thunderstorm",
            "probability": 0.5793699026107788
        },
        {
            "label_id": "/m/07yv9",
            "label": "Vehicle",
            "probability": 0.34878015518188477
        }
    ]
}

4. Development

To run the Flask API app in debug mode, edit config.py to set DEBUG = True under the application settings. You will then need to rebuild the Docker image (see step 1).

5. Cleanup

To stop the Docker container, type CTRL + C in your terminal.

Resources and Contributions

If you are interested in contributing to the Model Asset Exchange project or have any queries, please follow the instructions here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].