Skip to content

xiaoxi-david/malfunctioning-machines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anomalous sound detection in pumps

Introduction

This repo is my attempt to solve the task Unsupervised Detection of Anomalous Sounds for Machine Condition Monitoring from the 2020 DCASE Challenge for pumps.

The repo has several Jupyter notebooks in the development folder and a Streamlit webpage in the production folder.

Problem

Anomalous sound detection (ASD) is the task to identify whether the sound emitted from a target machine is normal or anomalous.

Anomaly detection techniques can be categorized as:

  • Supervised anomaly detection requires the entire dataset to be labeled "normal" or "abnormal". This technique is a binary classification task.
  • Semi-supervised anomaly detection requires only data considered "normal" to be labeled. In this technique, the model will learn what "normal" data are like.
  • Unsupervised anomaly detection involves unlabeled data. In this technique, the model will learn which data is "normal" and "abnormal".

Automatically detecting mechanical failure is an essential technology in the fourth industrial revolution. Prompt detection of machine anomaly by observing its sounds may be useful for machine condition monitoring.

Dataset

In 2019, Hitachi released the MIMII dataset and one year later, the second task of the 2020 DCASE Challenge used a simplified version of the MIMII dataset.

For this project, I use only the development dataset for pumps from the 2020 DCASE Challenge. It contains 3349 audio files for training and 856 audio files for testing. Each recording is a single-channel 10-sec length audio that includes both a target machine's operating sound and environmental noise.

Methodology

Although anomaly detection problems can be solved with supervised, semi-supervised and unsupervised anomaly detectors, the dataset that I used is only suitable for semi-supervised anomaly detectors.

 Anomaly detector

I use Tensorflow, Tensorboard and Tensorflow serving to solve the problem.

Instructions

To run the code, you need Docker and Docker Compose. There are two docker compose files.

  • The docker compose file in the development folder will launch two containers: one for Jupyter and another for Tensorboard.
  • The docker compose file in the production folder wiil launch two containers: one for the Streamlit app and another for Tensorflow serving.

You can run the docker compose files with VS Code and the Docker extension or with the command docker compose up. For instance:

docker compose up docker-compose.yaml

After you launch the containers, Docker will show the address for the Jupyter notebooks and the Streamlit web.

NOTE: The Streamlit app needs some files. You can run the notebook Files-for-Streamlit-app to create them or download them from here.

If you download them, you need to unzip the file you download in the frontend folder (production/frontend) to create a folder (store) that has three folders inside (audios, images, json).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published