Coder Social home page Coder Social logo

yiweichen04 / compactcnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from msminhas93/compactcnn

0.0 1.0 0.0 394.77 MB

PyTorch and Keras implementation of CompactCNN for Anomaly Detection in textured surfaces.

License: MIT License

Jupyter Notebook 0.28% Python 99.72%

compactcnn's Introduction

A Compact Convolutional Neural Network for Textured Surface Anomaly Detection

Keras and PyTorch implementation of the CompactCNN.

Details of the paper can be found here.

Requirements: keras,tensorflow,opencv,matplotlib,os,numpy

To run the code use python ./ccnn_pytorch/main.py or python ./ccnn_keras/main.py

To create DAGM dataset in the form required for this repository run the following command.

python DAGM_data_prep.py "dataset directory path where you want the folders to be created" "DAGM folder path"

For example: python DAGM_data_prep.py "/john/doe/datasets" "john/doe/DAGM"

I've included the images folder in the repository as well the weights of the trained models.

Following is a sample result of the network.

Sample Result

The network outputs an anomaly heatmap and an anomaly score. The segmentation model is trained for 25 epochs and classification model for 10 epochs. However, the best model based on validation loss is kept.

compactcnn's People

Contributors

msminhas93 avatar

Watchers

 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.