中文题目:基于机器学习的胶囊表面缺陷检测
外文题目:DETECTION OF CAPSULE SURFACE DEFECTS
BASED ON MACHINE LEARNING
摘要
随着生产技术的进步,胶囊的产量不断升高,大多制造商仍使用人工进行胶囊质量的
检测。人工检测易受检测员身体状况影响,所以长时间目视检测容易出现漏检率、误检率
上升等问题。而传统机器视觉检测设备,需要大量前期特征提取工作,而这些特征提取工
作需要前期的研究设计才能保证检测效果,研发费用较高,所以这种设备价格一般较高。
为了解决人工无法长时间大批量检测的问题,本文设计了一种胶囊表面缺陷检测系统。
本文设计的系统使用 CCD 摄像头进行图像数据采集,在计算机中采用二值化、边缘提取、
开闭操作、仿射变换等对图像进行预处理,利用卷积神经网络进行图像的分类,对胶囊表
面缺陷进行识别,以达到检测的目的。
本系统对于表面完整胶囊、表面凹陷胶囊、缺少身体胶囊、缺少帽子胶囊四类图像的
分类准确度在 90%以上,检测速度在 12000 粒/小时左右,能够替代生产线的人工的检测。
关键词:胶囊检测;卷积神经网络;图像处理
I
Abstract
With the progress of production technology, the output of capsules has been increasing.
Most manufacturers still use artificial methods to detect the quality of capsules. Manual
detection is easy to be affected by the physical condition of the inspector. Therefore, long term
visual inspection is prone to miss detection rate and false detection rate increases. The traditional
machine vision detection equipment needs a large number of early feature extraction work, and
these feature extraction work needs the previous research and design to ensure the detection
effect, and the cost of research and development is high, so the price of this kind of equipment is
generally high.
In order to solve the shortcomings of manual detection that can not be detected for a long
time, a capsule surface defect detection system is designed. The system designed in this paper
uses CCD camera to collect image data, and then uses binaryzation, edge extraction, open and
close operation and affine transformation to preprocess the image through computer. Finally, the
image is classified by the convolution neural network on the computer to achieve the purpose of
detection.
The system has more than 90% classification accuracy for four kinds of images, such as
surface complete, surface dimple, miss body , and miss cap capsule. The detection speed is about
12000 grains per hour, which can replace the artificial detection of production line.
Key words: Capsule detection; Convolution neural network; Image processing
徐航:基于机器学习的胶囊表面缺陷检测
目录
引言 .............................................................1
1 卷积神经网络理论基础 ..........................................2
1.1 神经网络发展 .................................................2
1.2 卷积神经网络原理 .............................................3
1.2.1 卷积神经网络基本组成 .......................................3
1.2.2 反向传播算法 ...............................................5
1.2.3 卷积神经网络其他主要组成部分 ...............................7
1.3 在图像分类领域卷积神经的发展 .................................8
2 胶囊表面图像采集与预处理 ......................................9
2.1 胶囊表面图像采集硬件系统 ....................................9
2.2 胶囊表面图像预处理 .........................................10
2.2.1 图像去噪和灰度化 ..........................................10
2.2.2 图像二值化 ...............................................11
2.2.3 图像仿射变换 .............................................13
2.2.4 截取 ROI ..................................................15
3 基于 LeNet-5 模型的表面缺陷检测 ...............................16
3.1 TensorFlow 介绍 .............................................16
3.2 LeNet-5 模型结构 ............................................17
3.2 LeNet-5 应用于表面缺陷检测 ..................................18
4 基于 AlexNet 模型的表面缺陷检测 ...............................19