Skip to content

Official source code of "Fast Adaptive RNN Encoder-Decoder for Anomaly Detection in SMD Assembly Machine"

License

Notifications You must be signed in to change notification settings

YeongHyeon/FARED_for_Anomaly_Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}
}

Releases

No releases published

Packages

No packages published

Languages