Skip to content

DefectNet: Towards Fast and Effective Defect Detection

License

Notifications You must be signed in to change notification settings

JasonFinisher123/DefectNet

 
 

Repository files navigation

DefectNet

DefectNet, a defect detection network model for fast and effective defect detection.

@ARTICLE{9381247,
  author={F. {Li} and F. {Li} and Q. {Xi}},
  journal={IEEE Transactions on Instrumentation and Measurement}, 
  title={DefectNet: Toward Fast and Effective Defect Detection}, 
  year={2021},
  volume={70},
  number={},
  pages={1-9},
  doi={10.1109/TIM.2021.3067221}}

The full paper is available at IEEE Transactions on Instrumentation and Measurement

Abstract

The existing object detection algorithms based on the convolutional neural network (CNN) are always devoted to the detection of natural objects and have achieved admirable detection effects. At present, these detection algorithms have been applied to the detection of defect data. In fact, the detection of defect data is different from the detection of general natural object data and the application of a general object detection algorithm based on CNN may not be perfect in this problem. Therefore, a novel defect detection network (DefectNet) is proposed to solve the problem of defect detection.

There are three methods used to detect defects, which are shown in Fig. 1.

Fig-01

Fig. 1. Three methods of defect detection process. I: input image. DNet: object detection network. P: predicted output results, including boxes, categories and scores. F: filtered boxes, categories and scores by using a score threshold. N: normal images. D: detected defect results. CNet: binary classification network. CDNet: defect network. (a) One-model method. (b) Two-model method. (c) DefectNet method.

Network Design

  • Defect Finding Network

    It resumes the last full connection layer in the backbone network.

    Fig-02

    Fig. 2. Structure of defect finding network. I: input image. D: defective images. D-SubNet: the rest of the object detection network except the backbone network.

  • Balance Different Network

    The loss1 is the task of the bounding box regression, the loss2 is the task of bounding box classification, the loss3 is the task of the defect finding.

    Fig-03-1

    There are two methods to set the value of f (w), one is to directly set f (w) as a constant (Const) value, the other is to set f (w) as the change of the number of iterations n.

    Fig-03-2

    There are mainly three different types of fundamental functions for variable loss weight strategies: linear (Lin), inverse (Inv) and exponential (Exp) function.

    Fig-03-3

Detection Efficiency

The relationship between the ATT t and the improvement efficiency e changes as the proportion α of the number of normal images in all images is shown in Fig. 3.

Fig-03

Fig. 3. Ideal evaluation results for different proportions α. α is the proportion of the number of normal images in test set. β is the ratio of the ATT_N to the ATT_D. t is the ATT of test set. e is the improvement efficiency of test set.

Experimental Results

  • Fabric Defect

    Results comparison between DEFECTNET and other SOTA networks in fabric defect dataset is shown in Tab. 1.
    Tab-01

  • Bottle Defect

    Results comparison between DEFECTNET and other SOTA networks in bottled liquor dataset is shown in Tab. 2.
    Tab-02

Installation

This project is based on MMDetection. More installation and usage please refer to MMDetection.

git clone https://github.com/li-phone/DefectNet.git
# mirror: https://gitee.com/liphone/DefectNet.git
cd DefectNet
pip install -r requirements.txt
bash setup.sh

Prepare Dataset

Train and Test

cd tools
ln -s {data directory} data 
python demo.py
# wait...

License

This project is released under the Apache 2.0 license.

About

DefectNet: Towards Fast and Effective Defect Detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.5%
  • Jupyter Notebook 30.6%
  • JavaScript 13.3%
  • Cuda 1.6%
  • C++ 1.3%
  • MATLAB 1.1%
  • Other 0.6%