Code Monkey home page Code Monkey logo

detecting-manufacturing-defects's Introduction

Anomaly Detection in Manufacturing

Overview

This project emphasizes the use of an autoencoder architecture, particularly with a pre-trained ResNet-50 model for feature extraction and reconstruction, to address anomaly detection in manufacturing. Traditional and hybrid machine learning approaches are found to be unsatisfactory in comparison. The autoencoder is trained on augmented normal manufacturing data, enabling it to identify anomalies by reconstructing input images and calculating reconstruction errors. The detection process involves comparing the reconstructed images with the original ones, contributing to effective quality control in manufacturing.

CNN

Description

Jupyter Notebook Descriptions:

  • Support Vector Machines : SVM utilies the classical machine learning tool to identify anomaly. It can be treated as a baseline model.

  • Hybrid Model : In this file we combine CNN, AutoEncoder with and without pre-trained model (VGG16) in combination with Isolation Forest and Local Outlier Model.

  • Stacked Autoencoder : Employes two simple autoencoder architecture to identify anomalies.

  • Autoencoder ResNet : This model uses ResNet50 as a backbone in addition to residual blocks and more complex autoencoder structure.

resnet

  • Autoencoder : This model combines the Autoencoder ResNet50 model with data augmentation and early stopping to identify the best parameters and localize anomalies.

Methodology

  • Anomaly Detection: Calculates the reconstruction error between original and reconstructed images to identify anomalies.
  • Bounding Box Visualization: Locates anomaly regions by drawing rectangles around areas with high reconstruction errors.
  • Image Segmentation: Utilizes contour detection to segment and isolate anomalies in the images.
  • Classification: Implements a classification model to categorize anomalies into different classes based on the MVTec dataset categories.

Dataset Used

The MVTec dataset, known for its comprehensive collection of real-world textures and objects, has been used for training and evaluation. This dataset contains images of various materials and objects captured under different conditions, enabling robust anomaly detection models.

mvtech

Usage

Requirements

  • Python 3.x
  • TensorFlow
  • OpenCV
  • Matplotlib
  • NumPy

Instructions

  1. Clone the repository.
  2. Install dependencies: pip install -r requirements.txt.
  3. Download the MVTec dataset and organize it as per project requirements.
  4. Run the anomaly detection and classification scripts.

Results

The system successfully identifies anomalies in manufacturing images from the MVTec dataset, providing visualizations of the detected defects and categorizing them into different classes based on the dataset categories.

results

Future Improvements

  • Experimentation with different classification pre-trained models for improved feature extraction, accuracy in anomaly classification.
  • Fine-tuning the thresholding and anomaly detection parameters for better accuracy.
  • Enhancing the segmentation algorithm for precise anomaly isolation.
  • Integration of multi-modal information for enhanced anomaly detection and classification.
  • Deployment of the model for real-time anomaly detection in manufacturing environments.

Contribution

Contributions and suggestions are welcome! Feel free to open issues or pull requests.

License

This project is licensed under MIT License.

detecting-manufacturing-defects's People

Contributors

krishna7085 avatar burakbdr avatar

Stargazers

 avatar

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.