GithubHelp home page GithubHelp logo

123wk45678 / defect_detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freedom-kevin/defect_detection

0.0 1.0 0.0 145.35 MB

The project can be used to detect defect on the surface of textiles.

Python 100.00%

defect_detection's Introduction

Model Description

The defect_segmentation is built on a fully convolutional neural network variant of the [VGG-16] net with several modifications: first, it exploits atrous (dilated) convolutions to increase the field-of-view; second, the number of filters in the last layers is reduced from 4096 to 1024 in order to decrease the memory consumption and the time spent on performing one forward-backward pass; third, it omits the last pooling layers to keep the whole downsampling ratio of 8.

Requirements

TensorFlow needs to be installed before running the scripts. TensorFlow>=0.11 is supported.

Caffe to TensorFlow conversion

To imitate the structure of the model, we have used pre-trained .caffemodel file.The .util/extract_params.py script saves the structure of the network, i.e. the name of the parameters with their corresponding shapes (in TF format), as well as the weights of those parameters (again, in TF format). These weights can be used to initialize the variables in the model; otherwise, the filters will be initialised using the Xavier initialisation scheme, and biases will be initiliased as 0s. To use this script you will need to install Caffe.

Training

We initialised the network from the .caffemodel file provided by the authors. In that model, the last classification layer is randomly initialised using the Xavier scheme with biases set to zeros. The loss function is the pixel-wise softmax loss, and it is optimised using Adam.

To train the model use the following command:

python train.py

Inference

To perform inference over your own images, use the following command:

python inference.py /path/to/your/image /path/to/ckpt/file

defect_detection's People

Contributors

freedom-kevin 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.