Git Product home page Git Product logo

dl-based-intelligent-diagnosis-benchmark's Introduction

DL-based-Intelligent-Diagnosis-Benchmark

Code release for Deep Learning Algorithms for Rotating Machinery Intelligent Diagnosis: An Open Source Benchmark Study ISA Transactions arXiv by Zhibin Zhao, Tianfu Li, and Jingyao Wu.

Correction

  • 2020.05.14, we modified the errors of the dataloaders related to XJTU dataset.

Guide

This project just provides the baseline (lower bound) accuracies and a unified intelligent fault diagnosis library which retains an extended interface for everyone to load their own datasets and models by themselves to carry out new studies. Meanwhile, all the experiments are executed under Window 10 and Pytorch 1.1 through running on a computer with an Intel Core i7-9700K, GeForce RTX 2080Ti, and 16G RAM.

R_A: random split with data augmentation, R_NA: random split without data augmentation, O_A: order split with data augmentation

Requirements

  • Python 3.7
  • Numpy 1.16.2
  • Pandas 0.24.2
  • Pickle
  • tqdm 4.31.1
  • sklearn 0.21.3
  • Scipy 1.2.1
  • opencv-python 4.1.0.25
  • PyWavelets 1.0.2
  • pytorch >= 1.1
  • torchvision >= 0.40

Datasets

Pakages

This repository is organized as:

  • AE_Datasets contains the loader of different datasets for AE models.
  • CNN_Datasets contains the loader of different datasets for MLP, CNN, and RNN models.
  • datasets contains the data augmentation methods and the Pytorch datasets for 1D and 2D signals.
  • models contains the models used in this project.
  • utils contains the functions for realization of the training procedure.

Usage

  • download datasets

  • use the train.py to test MLP, CNN, and MLP models

  • for example, use the following commands to test MLP for SEU with mean-std normalization and data augmentation

  • python train.py --model_name MLP --data_name SEU --data_dir ./Data/Mechanical-datasets --normlizetype mean-std --processing_type O_A --checkpoint_dir ./Benchmark/Benchmark_Results/Order_split/SEU/MLP_mean-std_augmentation

  • use the train_ae.py to test AE models

  • for example, use the following commands to test SAE for SEU with mean-std normalization and data augmentation

  • python train_ae.py --model_name Sae1d --data_name SEU --data_dir ./Data/Mechanical-datasets --normlizetype mean-std --processing_type O_A --checkpoint_dir ./Benchmark/Benchmark_Results/Order_split/SEU/Sae1d_mean-std_augmentation

Citation

Codes:

@misc{Zhao2020,
author = {Zhibin Zhao and Tianfu Li and Jingyao Wu and Chuang Sun and Shibin Wang and Ruqiang Yan and Xuefeng Chen},
title = {Deep Learning Algorithms for Rotating Machinery Intelligent Diagnosis},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/ZhaoZhibin/DL-based-Intelligent-Diagnosis-Benchmark}},
}

Paper:

@article{zhao2020deep,
  title={Deep Learning Algorithms for Rotating Machinery Intelligent Diagnosis: An Open Source Benchmark Study},
  author={Zhibin Zhao and Tianfu Li and Jingyao Wu and Chuang Sun and Shibin Wang and Ruqiang Yan and Xuefeng Chen},
  journal={ISA Transactions},
  year={2020}
}

Contact

dl-based-intelligent-diagnosis-benchmark's People

Contributors

zhaozhibin 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

dl-based-intelligent-diagnosis-benchmark's Issues

Possible errors in XJTU dataset

First, thank you for making this large and useful body of work available on Github.

I think that in CNN_Datasets/R_A/datasets/XJTU.py line 39 should refer to datasetname2[j] and line 47 to datasetname3[k].

Also - similar changes for all other XJTU dataset files.

Best regards,
Bruce

PU数据集的label

代码CNN_Datasets/R_A/datasets/PUFFT.py中,用文件做了数据的label,请问是什么原因?不应该是故障种类吗?

/tmp文件夹有什么用

不管下载什么数据集,都会报出如下错误

截图 2022-07-05 17-15-28

说是不存在'/tmp/Data/MFPT/1 - Three Baseline Conditions'目录,我一直不理解为什么要将数据集的前面放到/tmp目录下

截图 2022-07-05 17-14-10

运行结果

为什么我运行出来的accuracy都是小于0.11的呢

关于将数据转换成图像的代码使用

您好,非常感谢您将代码开源。
我在使用过程中遇到一个问题,在调用cnn_2d为测试模型时,需要输入的数据是2d,否则会报错:
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [16, 1, 3, 3], but got 3-dimensional input of size [64, 1, 512] instead
但是我没有找到如何调整输入为2d的代码和对应做法,请问该如何解决呢?

交流群

非常感谢赵老师的付出,文章以及程序对我有非常大的帮助,但是还是有点困难,想问一下赵老师,有没有创建交流群什么的(QQ微信都可以,github登录有时比较困难,不能及时收到消息)

--processing_type O_A doesn't work

When using CWRU dataset, If this option is O_A, the train.py doesn't work. If this option is R_A or R_NA, it works.

File "c:/Users/jashm/OneDrive/桌面/DL-based-Intelligent-Diagnosis-Benchmark-master/DL-based-Intelligent-Diagnosis-Benchmark-master/train.py", line 65, in
trainer.setup()
File "c:\Users\jashm\OneDrive\桌面\DL-based-Intelligent-Diagnosis-Benchmark-master\DL-based-Intelligent-Diagnosis-Benchmark-master\utils\train_utils.py", line 55, in setup
self.datasets['train'], self.datasets['val'] = Dataset(args.data_dir,args.normlizetype).data_preprare()
File "c:\Users\jashm\OneDrive\桌面\DL-based-Intelligent-Diagnosis-Benchmark-master\DL-based-Intelligent-Diagnosis-Benchmark-master\CNN_Datasets\O_A\datasets\CWRUFFT.py", line 144, in data_preprare
train_pd, val_pd = train_test_split_order(data_pd, test_size=0.2, num_classes= 10)
File "c:\Users\jashm\OneDrive\桌面\DL-based-Intelligent-Diagnosis-Benchmark-master\DL-based-Intelligent-Diagnosis-Benchmark-master\CNN_Datasets\O_A\datasets\CWRUFFT.py", line 121, in train_test_split_order
train_pd = pd.DataFrame(columns=('data', 'label'))
File "C:\Users\jashm\anaconda3\envs\env1\lib\site-packages\pandas\core\frame.py", line 392, in init
mgr = init_dict(data, index, columns, dtype=dtype)
File "C:\Users\jashm\anaconda3\envs\env1\lib\site-packages\pandas\core\internals\construction.py", line 196, in init_dict
nan_dtype)
File "C:\Users\jashm\anaconda3\envs\env1\lib\site-packages\pandas\core\dtypes\cast.py", line 1175, in construct_1d_arraylike_from_scalar
dtype = dtype.dtype
AttributeError: type object 'object' has no attribute 'dtype'

Possible error in CWRUFFT.py

Hi. The file CNN_Datasets/R_NA/datasets/CWRUFFT.py, at line 105, adds noise to the training dataset, despite being used for a classification task. Is that correct?

Test code for the model.

Thank you very much for your open source resources on GitHub, which helped me make great progress in my research,

I've improved some of your models. I'd like to ask. Can you share your test code?

使用cwru_stft

我是用cwru——stft得到的是单通道图像, 请问我如何把它转换和我所需要的三通道图像呢
Given groups=1, weight of size [64, 3, 7, 7], expected input[32, 1, 512] to have 3 channels, but got 1 channels

请赵老师指点

赵老师,您好:
非常感谢您开源您的代码,从您的文章和代码中,我学到了很多,受益匪浅。但是,在仔细研究代码的过程中,我有一个困惑,代码中数据预处理部分,对数据进行STFT变换后,得到的图片大小是(33,33)的,而在训练的过程中,一个批次取出来的大小就变成(330,330)了;此外,对数据进行CWT变换后,得到的数据大小是(100,100)的,而在,一个批次取出来的大小变成(300,300)了,还有Slice的预处理,reshape后得到的大小是(32,32),训练的过程中就变成(320,320)了,请问为什么要这样做呀?以及在代码的什么位置实现了这样的操作啊?还请赵老师不吝赐教,谢谢!

SEU dataset dead link

The link to the SEU dataset is not working, could you please update it?
Thank you!

HELP

Hello, thank you very much for opening the code.
I met a problem in the process of using it. I ran train. Py directly and reported an error:
File "C:/Users/Desktop/DL-based-Intelligent-Diagnosis-Benchmark/train.py", line 66, in
trainer.setup()
File "C:\Users\Desktop\DL-based-Intelligent-Diagnosis-Benchmark\utils\train_utils.py", line 63, in setup
self.model = getattr(models, args.model_name)(in_channel=Dataset.inputchannel, out_channel=Dataset.num_classes)
AttributeError: module 'models' has no attribute 'Inception2d'

Could you help me solve this problem?
I would appreciate it if you could reply me.

error

Hello, thank you very much for opening the code.
I met a problem in the process of using it. I ran train. Py directly and reported an error:
File "C:\Users\cc\Desktop\DL-based-Intelligent-Diagnosis-Benchmark-master\utils\train_utils.py", line 67, in setup
self.model = getattr(models, args.model_name)(in_channel=Dataset.inputchannel, out_channel=Dataset.num_classes)
TypeError: 'module' object is not callable

Error

File "E:\机械故障诊断\DL-based-Intelligent-Diagnosis-Benchmark-master\CNN_Datasets\O_A\datasets\SEU.py", line 27, in get_files
datasetname = os.listdir(os.path.join(root, os.listdir(root)[2])) # 0:bearingset, 2:gearset
IndexError: list index out of range

[BiLSTM] - View size is not compatible with input tensor's size and stride

Hi,

I hope you are doing well.

I was trying to use BiLSTM using UoC database, using the command line below:

python train.py --model_name BiLSTM1d --data_name UoC --data_dir ./Data/Mechanical-datasets --normlizetype mean-std --processing_type O_A --checkpoint_dir ./Benchmark/Benchmark_Results/Order_split/UoC/RNN_mean-std_augmentation

and I have bumped into this runtime error:

RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

I replaced the line 37 bilstm_out = bilstm_out.view(bilstm_out.size(0), -1) on files BiLSTM1d.py and BiLSTM2d.py for this one bilstm_out = bilstm_out.contiguous().view(bilstm_out.size(0), -1) adding contiguous() and it has worked fine to me.

I don't know if it is the right approach, but I hope it will help.

Thanks in advance,

Carlos Lima

XJTU数据处理

直接每个文件对应一个标签感觉不合理哇,可以解释一下吗,PU上面还能理解,可能有一些坏的细节不一样,但是XJTU明写了都是Outer race的还给不同的标签有点奇怪

For test

Thank you very much for your code.
Is your program only for training?
Should I write a test.py again when I want to test?

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.