Source:Google Cloud
The aim of this project is to create a reliable fault detection system for Industrial Processes. Through this code, we'll explore unsupervised machine learning method to identify unusual events and faults in the process. A key focus is deploying a neural network model on a server. By doing this, we can utilize real-time sensor readings from the system to promptly identify anomalies using the deployed neural network model.
The primary technology employed in this project is the training of an Autoencoder model using exclusively normal data. The system is then monitored by examining the reconstruction loss. If the reconstruction loss surpasses a predefined threshold or becomes significantly high, a fault is identified.
Begin by cloning this GitHub repository to your local machine. Use the following command in your terminal or Git bash:
git clone https://github.com/mohan696matlab/TEP_Anomaly_detection_deployment.git
Refer to the file Training_AutoEncoder.ipynb
. It is well explained in my youtube channel [https://youtu.be/iCTU-IZ6rPQ?si=s9Y-SmCgq2EVVITW]
Refer to the file Main.py
To use the trained Autoencoder model, a FastAPI server is implemented. This server exposes an API endpoint for making predictions based on input features.
uvicorn Main:app --reload
Refer to the file Client_RealTime.ipynb
The created model is able to identify fault very quickly after it was introduced.
The reconstruction loss is normalized by division with the threshold, so the threshold becomes 1 and it is easier to interpret.
The contribution of all the variables towards the reconstruction loss is also given. It will help to identify the root cause of a fault in the system.