Giter Club home page Giter Club logo

fared_for_anomaly_detection's Introduction

Fast Adaptive RNN Encoder-Decoder for Anomaly Detection in SMD Assembly Machine

Introduction

This repository provides the source code of the paper "Fast Adaptive RNN Encoder-Decoder for Anomaly Detection in SMD Assembly Machine" [pdf].

The SMD assembly machine with microphone (red box)

Requirements

  • Python 3.7.6
  • Tensorflow 1.14.0
  • Numpy 1.18.1
  • Scipy 1.4.1
  • Matplotlib 3.1.2
  • Librosa 0.6.2

Usage

Preparing the dataset

First, Organize the audio dataset and keep as below (when using other wav files). This repository provides example of data organization, so you can conduct experiment directly!

data_for_experiment
├── Class-1
│   ├── data_1.wav
│   ├── data_2.wav
│   ├── data_3.wav
│   │     ...
│   └── data_n.wav
├── Class-2
│     ...
└── Class-3

Run the python script as following.

$ cd preprocessing_source
$ python dat2npy_mfcc.py

After, running above python script the directory named with 'dataset_mfcc' will be generated. Use dat2npy_stft.py instead of dat2npy_mfcc.py if you want to train FARED with Short Time Fourier Transform (STFT). The sample dataset is available at sample_data.

Training and Test

$ cd FARED_source
$ python run.py

After, training FARED, it measure the reconstruction error for each class. Reconstruction errors will be saved in 'valids' directory with 'npy' file. You can calculate Area Under the Curve (AUC) of Receiver Operating Characteristic (ROC) curve or something.

❗ The result of the experiment may differ to paper because we provide only sample audio data.

Architecture of Fast Adaptive RNN Encoder-Decoder

Result with sample data

The experimental result with sample data.

The left figure shows loss convergence of training procedure and the right figure shows measured errors.

The higher error means that it is out of the normal scope.

BibTeX

@Article{s18103573,
  AUTHOR = {Park, YeongHyeon and Yun, Il Dong},
  TITLE = {Fast Adaptive RNN Encoder–Decoder for Anomaly Detection in SMD Assembly Machine},
  JOURNAL = {Sensors},
  VOLUME = {18},
  YEAR = {2018},
  NUMBER = {10},
  ARTICLE-NUMBER = {3573},
  URL = {http://www.mdpi.com/1424-8220/18/10/3573},
  ISSN = {1424-8220},
  DOI = {10.3390/s18103573}
}

fared_for_anomaly_detection's People

Contributors

yeonghyeon avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fared_for_anomaly_detection's Issues

The code isn't running

I am getting an error in the following line:
self.sublist_train["%s" %(ktot)] = self.sublist_total["%s" %(ktot)][:cycle]

self.key_tot is equal to [Set-A,Set-B]

cycle is 7

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.