Giter VIP home page Giter VIP logo

industrial_defect_detection's Introduction

Industrial_defect_detection

本项目用深度学习的方法进行工业产品缺陷检测,替代原本人眼的产品质检。从而大幅提升工业产品合格率和降低人力成本。

1.requirement

  • python >= 3.6
  • pytorch >= 1.0
  • numpy
  • PIL

2.dataset

数据包括训练数据和测试数据, 共9个类别, 存放在dataset目录中, train.txt为训练数据列表, text.txt为测试数据列表。

3.train

3.1 修改config.py配置文件

配置文件中数据集路径配置为自己的路径

3.2 执行训练

$ python train.py

4.eval

在测试集上测试模型的acc

只需指定dataroot, testlist, checkpoint参数即可 。例如

$ python eval.py /path/to/dataset /path/to/dataset/test.txt checkpoint_resnet_avgpool/checkpoint.path.tar

5.改进

采用resnet50作为baseline, test acc 为 Test Acc: 0.8687

改进downsample层 原始的残差块downsample层shortcut采用的是stride=2的1x1卷积, 丢失了部分信息, 这里将shortcut修改为2x2, stride=2的AvgPool加stride=1的1x1卷积。=> Test Acc: 0.8751

industrial_defect_detection's People

Contributors

zwb204 avatar

Watchers

James Cloos 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.