Giter Club home page Giter Club logo

tvhahn / ml-tool-wear Goto Github PK

View Code? Open in Web Editor NEW
54.0 3.0 22.0 24.73 MB

Anomaly detection on the UC Berkeley milling data set using a disentangled-variational-autoencoder (beta-VAE). Replication of results as described in article "Self-Supervised Learning for Tool Wear Monitoring with a Disentangled-Variational-Autoencoder"

License: MIT License

Jupyter Notebook 96.19% Python 3.81%
deep-learning masc-thesis machinery-condition-monitoring tool-wear-monitoring anomaly-detection beta-vae tool-condition-monitoring advanced-manufacturing latent-spaces milling

ml-tool-wear's Introduction

Anomaly Detection for Tool Wear Monitoring Using a Disentangled-Variational-Autoencoder

Demonstration of anomaly detection on the UC Berkeley milling data set using a disentangled-variational-autoencoder (beta-VAE).

The method is described in the article "Self-supervised learning for tool wear monitoring with a disentangled-variational-autoencoder" in IJHM. Link to the preprint is here. The method is also described in my MASc thesis, Feature Engineering and End-to-End Deep Learning in Tool Wear Monitoring.

I also have detailed blog posts exploring the UC Berkeley milling data set (here), describing how the VAE is constructed (here), and analyzing the results of the anomaly detection model (here). The code is well explained in the blog posts (and associated colab notebooks).

Feel free to cite my research if you use it in any academic research.

@article{hahn2021self,
  title={Self-supervised learning for tool wear monitoring with a disentangled-variational-autoencoder},
  author={Hahn, Tim Von and Mechefske, Chris K},
  journal={International Journal of Hydromechatronics},
  volume={4},
  number={1},
  pages={69--98},
  year={2021},
  publisher={Inderscience Publishers (IEL)}
}

How to Run

Open In Colab

milling-tool-wear-beta-vae.ipynb is the notebook to replicate the results and make the figures. I recommend using google colab. The notebook is optimized for it, it will run in your browser, and no package installation required!

Summary

A disentangled-variational-autoencoder, with a temporal convolutional neural network, was used to model and trend tool wear in a self-supervised manner. Anomaly detection was used to make predictions in both the input and latent spaces. The experiment was performed on the UC Berkeley milling data set.

The method achieved a precision-recall area-under-curve (PR-AUC) score of 0.45 across all cutting parameters in the milling data set, and a top score of 0.80 for shallow depth cuts. The study presents the first known use of a disentangled-variational-autoencoder for tool wear monitoring.

Figure 1: The tool wear trend for case 13, generated from the latent space.

Latent Space KL-Divergence Trend on Case 13

Figure 2: The distribution of the test data samples in the latent space. The y-axis shows the true state of the data samples (either healthy, degraded, or failed) and the x-axis shows the anomaly predictions (either normal or abnormal). The dotted line represents a decision threshold. Each small grey dot represents one data sample.

Figure 3: The precision-recall curve (left) and the ROC curve (right) for the best model on the test data (using latent space anomaly detection). The no-skill model (equivalent to a random model) is plotted as a comparison. In the context of this experiment, precision is the proportion of abnormal predictions that are truly abnormal (the tool is in a failed state). Recall is the proportion of truly abnormal samples (failed) that were identified correctly.

Figure 4: The PR-AUC score in the latent space, while looking at one parameter in a pair at a time.

Figure 5: An example of one cut (out of 167) from the milling data set. Six signals are collected during each cut.

ml-tool-wear's People

Contributors

tvhahn 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

Watchers

 avatar  avatar  avatar

ml-tool-wear's Issues

How to train the best model

Hello, I used your code to search for more than 200 models. During training, they have good accuracy of verification set (about 0.86), but in the subsequent calculation of pr-AUC, their performance (0.1-0.3) is far from the best model you provided, and PR curve and violin plots also look very bad. I want to know if there is any other work besides changing the search times to find the effect like the model you provided. I'm sorry for my poor English. I wonder if you can understand me

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.