Skip to content

This is official code for paper "Few-Shot Bearing Fault Diagnosis via Ensembling Transformer-based Model with Mahalanobis Distance Metric Learning from Multiscale Features". IEEE Transactions on Instrumentation and Measurement (Accepted)

Notifications You must be signed in to change notification settings

HungVu307/Few-shot-via-ensembling-Transformer-with-Mahalanobis-distance

Repository files navigation

🚀 News

🔥 Our paper namely "✨ Multi-level Few-Shot Model with Selective Aggregation Feature for Bearing Fault Diagnosis ✨" has been accepted by IEEE Sensors Letters and will be published soon! The model's code will also be updated soon in this repo (can be found in this folder multi_level/).

Link to paper

Few-shot-via-ensembling-Transformer-with-Mahalanobis-distance PWC

Link to paper

We provide a Pytorch implement code of paper "Few-Shot Bearing Fault Diagnosis via Ensembling Transformer-based Model with Mahalanobis Distance Metric Learning from Multiscale Features" accepted by IEEE Transactions on Instrumentation and Measurement.

plot

Prerequisites

  • Python 3
  • Linux
  • Pytorch 0.4+
  • GPU + CUDA CuDNN

Dataset

In this paper, we ultilize 2 datasets: CWRU and PU.

Note, if you use these datasets, please cite the corresponding papers. (Feel free to contact me if you need PU dataset in .pt file)

Getting Started

  • Installation
git clone https://github.com/HungVu307/Few-shot-via-ensembling-Transformer-with-Mahalanobis-distance
  • Training for 1 shot
python train_1shot.py --dataset 'CWRU' --training_samples_CWRU 30 --training_samples_PDB 195 --model_name 'Net'
  • Testing for 1 shot
python test_1shot.py --dataset 'CWRU' --best_weight 'PATH TO BEST WEIGHT'
  • Training for 5 shot
python train_5shot.py --dataset 'CWRU' --training_samples_CWRU 60 --training_samples_PDB 300 --model_name 'Net'
  • Testing for 5 shot
python test_5shot.py --dataset 'CWRU' --best_weight 'PATH TO BEST WEIGHT'
  • Result
  1. CWRU dataset plot
  2. PU dataset plot

Contact

Please feel free to contact me via email hung.vm195780@sis.hust.edu.vn or vumanhhung07.work@gmail.com if you need anything related to this repo!

Citation

If you feel this code is useful, please give us 1 ⭐ and cite our paper.

@article{vu2024few,
  title={Few-Shot Bearing Fault Diagnosis via Ensembling Transformer-based Model with Mahalanobis Distance Metric Learning from Multiscale Features},
  author={Vu, Manh-Hung and Nguyen, Van-Quang and Tran, Thi-Thao and Pham, Van-Truong and Lo, Men-Tzung},
  journal={IEEE Transactions on Instrumentation and Measurement},
  year={2024},
  publisher={IEEE}
}
@misc{vu2024few,
  author = {Vu, Manh-Hung and Nguyen, Van-Quang and Tran, Thi-Thao and Pham, Van-Truong and Lo, Men-Tzung},
  title = {Few-Shot Bearing Fault Diagnosis via Ensembling Transformer-based Model with Mahalanobis Distance Metric Learning from Multiscale Features},
  year = {2024},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/HungVu307/Few-shot-via-ensembling-Transformer-with-Mahalanobis-distance}},
}

About

This is official code for paper "Few-Shot Bearing Fault Diagnosis via Ensembling Transformer-based Model with Mahalanobis Distance Metric Learning from Multiscale Features". IEEE Transactions on Instrumentation and Measurement (Accepted)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages