高级搜索

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

基于卷积神经网络的印刷电路板色环电阻检测与定位方法

刘小燕 李照明 段嘉旭 项天远

刘小燕, 李照明, 段嘉旭, 项天远. 基于卷积神经网络的印刷电路板色环电阻检测与定位方法[J]. 电子与信息学报, 2020, 42(9): 2302-2311. doi: 10.11999/JEIT190608
引用本文: 刘小燕, 李照明, 段嘉旭, 项天远. 基于卷积神经网络的印刷电路板色环电阻检测与定位方法[J]. 电子与信息学报, 2020, 42(9): 2302-2311. doi: 10.11999/JEIT190608
Xiaoyan LIU, Zhaoming LI, Jiaxu DUAN, Tianyuan XIANG. Method for Color-ring Resistor Detection and Localization in Printed Circuit Board Based on Convolutional Neural Network[J]. Journal of Electronics & Information Technology, 2020, 42(9): 2302-2311. doi: 10.11999/JEIT190608
Citation: Xiaoyan LIU, Zhaoming LI, Jiaxu DUAN, Tianyuan XIANG. Method for Color-ring Resistor Detection and Localization in Printed Circuit Board Based on Convolutional Neural Network[J]. Journal of Electronics & Information Technology, 2020, 42(9): 2302-2311. doi: 10.11999/JEIT190608

基于卷积神经网络的印刷电路板色环电阻检测与定位方法

doi: 10.11999/JEIT190608
基金项目: 国家自然科学基金(61973108, U1913202),电子制造业智能机器人技术湖南省重点实验室开放基金(IRT2018001)
详细信息
    作者简介:

    刘小燕:女,1973年生,教授,博士生导师,研究方向为图像处理技术及其应用、智能建模与控制

    李照明:男,1996年生,硕士生,研究方向为图像处理技术

    段嘉旭:男,1989年生,博士生,研究方向为深度学习与图像处理技术

    项天远:男,1985年生,博士生,研究方向为机器人控制与信息系统

    通讯作者:

    刘小燕 xiaoyan.liu@hnu.edu.cn

  • 中图分类号: TN911.73; TP391.41

Method for Color-ring Resistor Detection and Localization in Printed Circuit Board Based on Convolutional Neural Network

Funds: The National Natural Fundation of China (61973108, U1913202), The Open fund for Hunan Key Laboratory of Intelligent Robot Technology in Electronic Manufacturing Industry (IRT2018001)
  • 摘要: 色环电阻是印刷电路板(PCB)中最常用的电子元器件之一,主要依靠色环的排列顺序和颜色等视觉信息进行区分,易发生装配错误。但是色环电阻装配质量的人工检测方法效率低、误检率高,而传统的基于图像处理技术的自动检测方法鲁棒性较差,难以解决不同拍摄角度、物距及光照条件下的PCB板色环电阻检测问题。针对这一问题,该文提出一种基于卷积神经网络(CNN)的PCB板色环电阻自动检测与定位方法,首先采用编码器-解码器结构的卷积神经网络模型及带有权重的交叉熵损失函数的网络训练方法,较好地解决了复杂光照及场景下PCB板色环电阻的图像分割问题;然后采用最小面积外接矩形方法定位单个色环电阻,并通过仿射变换对色环电阻位置进行垂直校正;最后通过高斯模板匹配方法实现了色环电阻的色环定位。采用1270幅PCB图像对该文方法进行了实验和验证,并与传统的基于形态学和基于模板匹配的色环电阻检测方法进行了对比,结果表明,该文方法在召回率、准确率及重叠度等性能指标上具有明显优势,处理速度快,能满足实际应用要求。
  • 图  1  PCB图像数据集示例

    图  2  本文算法的总体流程图

    图  3  编码器-解码器结构的卷积神经网络模型

    图  4  Max pooling与Upsamping计算过程

    图  5  色环电阻及色环的定位方法流程图以及中间过程示意图

    图  6  色环电阻最小外接矩形的确定

    图  7  本文方法与传统方法的色环电阻分割与检测结果对比

    图  8  本文方法与Ostu方法[9]的色环分割结果对比

    图  9  PCB板上色环电阻的色环定位结果

    图  10  网络层数不同时的卷积神经网络模型示意图(W=3, W=5)

    图  11  训练过程中误差及准确率随迭代次数的变化曲线

    表  1  不同检测方法对图像1-图像4中色环电阻的分割与检测结果

    方法图像分割性能指标PCB板中色环电阻实际个数检测出的色环电阻个数
    AccRecallPrecisionIoUF1
    基于形态学的方法[5]0.7960.5750.1740.1540.2603113
    基于模板匹配的方法[8]314
    本文方法0.9660.9910.6660.6600.7853131
    下载: 导出CSV

    表  2  不同网络层数时色环电阻的分割性能指标对比

    平均Acc平均Recall平均Precision平均IoU平均F1
    W=30.9850.9700.8870.8700.925
    W=40.9910.9590.9530.9240.995
    W=50.9850.8830.9650.8650.921
    W=60.9790.8370.9360.8050.881
    下载: 导出CSV

    表  3  CNN在测试集与验证集上的性能指标对比

    平均Acc平均Recall平均Precision平均IoU平均F1
    验证集0.9910.9590.9530.9240.995
    测试集0.9820.9790.8510.8340.899
    下载: 导出CSV
  • 熊光洁, 马树元, 聂学俊, 等. 基于机器视觉的高密度电路板缺陷检测系统[J]. 计算机测量与控制, 2011, 19(8): 1824–1826.

    XIONG Guangjie, MA Shuyuan, NIE Xuejun, et al. Defects inspection system of HID PCB based on machine vision[J]. Computer Measurement &Control, 2011, 19(8): 1824–1826.
    吴福培, 张宪民. 印刷电路板无铅焊点假焊的检测[J]. 光学 精密工程, 2011, 19(3): 697–702. doi: 10.3788/OPE.20111903.0697

    WU Fupei and ZHANG Xianmin. Inspection of pseudo solders for lead-free solder joints in PCBs[J]. Optics and Precision Engineering, 2011, 19(3): 697–702. doi: 10.3788/OPE.20111903.0697
    CHEN Y S and WANG J Y. Reading resistor based on image processing[C]. 2015 IEEE International Conference on Machine Learning and Cybernetics, Guangzhou, China, 2015: 566–571. doi: 10.1109/ICMLC.2015.7340616.
    GAIDHANE V H, HOTE Y V, and SINGH V. An efficient similarity measure approach for PCB surface defect detection[J]. Pattern Analysis and Applications, 2018, 21(1): 277–289. doi: 10.1007/s10044-017-0640-9
    倪尧, 鲍宇. 基于目标轮廓几何特征的电容元件定位方法[J]. 计算机工程与科学, 2017, 39(8): 1476–1482. doi: 10.3969/j.issn.1007-130X.2017.08.014

    NI Yao and BAO Yu. A capacitor element localization method based on geometrical features of target contour[J]. Computer Engineering and Science, 2017, 39(8): 1476–1482. doi: 10.3969/j.issn.1007-130X.2017.08.014
    DONG Na, WU C H, IP W H, et al. Chaotic species based particle swarm optimization algorithms and its application in PCB components detection[J]. Expert Systems with Applications, 2012, 39(16): 12501–12511. doi: 10.1016/j.eswa.2012.04.063
    王耀南, 刘良江, 周博文, 等. 一种基于混沌优化算法的PCB板元件检测方法[J]. 仪器仪表学报, 2010, 31(2): 410–415. doi: 10.19650/j.cnki.cjsi.2010.02.028

    WANG Yaonan, LIU Liangjiang, ZHOU Bowen, et al. Detection method of printed circuit board components based on chaotic optimization algorithm[J]. Chinese Journal of Scientific Instrument, 2010, 31(2): 410–415. doi: 10.19650/j.cnki.cjsi.2010.02.028
    姜建国, 王国林, 孟宏伟, 等. 一种电子元器件组装结果检测方法[J]. 西安电子科技大学学报: 自然科学版, 2014, 41(3): 110–115, 173. doi: 10.3969/j.issn.1001-2400.2014.03.016

    JIANG Jianguo, WANG Guolin, MENG Hongwei, et al. Detection method for assembling results of electronic components[J]. Journal of Xidian University, 2014, 41(3): 110–115, 173. doi: 10.3969/j.issn.1001-2400.2014.03.016
    毛林威. 轴向色环电阻质量自动检测系统的设计[D]. [硕士论文], 北京理工大学, 2015.

    MAO Linwei. The design of color-ring resistor quality automatic detection system[D]. [Master dissertation], Beijing Institute of Technology, 2015.
    CHEN Y S and WANG J Y. Computer vision on color-band resistor and its cost-effective diffuse light source design[J]. Journal of Electronic Imaging, 2016, 25(6): 061409. doi: 10.1117/1.JEI.25.6.061409
    BADRINARAYANAN V, KENDALL A, and CIPOLLA R. SegNet: A deep convolutional encoder-decoder architecture for image segmentation[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(12): 2481–2495. doi: 10.1109/TPAMI.2016.2644615
    王海, 蔡英凤, 贾允毅, 等. 基于深度卷积神经网络的场景自适应道路分割算法[J]. 电子与信息学报, 2017, 39(2): 263–269. doi: 10.11999/JEIT160329

    WANG Hai, CAI Yingfeng, JIA Yunyi, et al. Scene adaptive road segmentation algorithm based on deep convolutional neural network[J]. Journal of Electronics &Information Technology, 2017, 39(2): 263–269. doi: 10.11999/JEIT160329
    DUAN Jiaxu, LIU Xiaoyan, WU Xin, et al. Detection and segmentation of iron ore green pellets in images using lightweight U-net deep learning network[J]. Neural Computing and Applications, 2020, 32(10): 5775–5790. doi: 10.1007/s00521-019-04045-8
    YE Ruifang, PAN C S, CHANG Ming, et al. Intelligent defect classification system based on deep learning[J]. Advances in Mechanical Engineering, 2018, 10(3): 1–7. doi: 10.1177/1687814018766682
    ZHANG Shifeng, WEN Longyin, BIAN Xiao, et al. Single-shot refinement neural network for object detection[C]. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 2018: 18–23. doi: 10.1109/CVPR.2018.00442.
    REN Shaoqing, HE Kaiming, GIRSHICK R, et al. Faster RCNN: Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137–1149. doi: 10.1109/TPAMI.2016.2577031
    张烨, 许艇, 冯定忠, 等. 基于难分样本挖掘的快速区域卷积神经网络目标检测研究[J]. 电子与信息学报, 2019, 41(6): 1496–1502. doi: 10.11999/JEIT180702

    ZHANG Ye, XU Ting, FENG Dingzhong, et al. Research on faster RCNN object detection based on hard example mining[J]. Journal of Electronics &Information Technology, 2019, 41(6): 1496–1502. doi: 10.11999/JEIT180702
    IOFFE S and SZEGEDY C. Batch normalization: Accelerating deep network training by reducing internal covariate shift[C]. The 32nd International Conference on Machine Learning, Lille, France, 2015: 448–456.
    KINGMA D P and BA J. Adam: A method for stochastic optimization[C]. The 3rd International Conference on Learning Representations (ICLR), San Diego, USA, 2015: 1–13.
    邸男, 李桂菊, 陈春宁, 等. 结合归一化差分高斯特征的图像匹配技术研究[J]. 电子测量与仪器学报, 2014, 28(6): 585–590. doi: 10.13382/j.jemi.2014.06.002

    DI Nan, LI Guiju, CHEN Chunning, et al. Image matching technology research based on normalized DOG features[J]. Journal of Electronic Measurement and Instrumentation, 2014, 28(6): 585–590. doi: 10.13382/j.jemi.2014.06.002
    卢倩雯, 陶青川, 赵娅琳, 等. 基于生成对抗网络的漫画草稿图简化[J]. 自动化学报, 2018, 44(5): 75–89. doi: 10.16383/j.aas.2018.c170486

    LU Qianwen, TAO Qingchuan, ZHAO Yalin, et al. Sketch simplification using generative adversarial networks[J]. Acta Automatica Sinica, 2018, 44(5): 75–89. doi: 10.16383/j.aas.2018.c170486
  • 加载中
图(11) / 表(3)
计量
  • 文章访问数:  2582
  • HTML全文浏览量:  1438
  • PDF下载量:  97
  • 被引次数: 0
出版历程
  • 收稿日期:  2019-08-09
  • 修回日期:  2020-05-26
  • 网络出版日期:  2020-06-23
  • 刊出日期:  2020-09-27

目录

    /

    返回文章
    返回