Cargando…

An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA

Industry 4.0 features intelligent manufacturing. Among them, the vision-based defect inspection algorithm is remarkable for quality control in parts manufacturing. With the help of AI and machine learning, auto-adaptive instead of manual operation is achievable in this field, and much progress has b...

Descripción completa

Detalles Bibliográficos
Autores principales: Yu, Longzhen, Zhu, Jianhua, Zhao, Qian, Wang, Zhixian
Formato: Online Artículo Texto
Lenguaje:English
Publicado: MDPI 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9323378/
https://www.ncbi.nlm.nih.gov/pubmed/35888875
http://dx.doi.org/10.3390/mi13071058
_version_ 1784756535958700032
author Yu, Longzhen
Zhu, Jianhua
Zhao, Qian
Wang, Zhixian
author_facet Yu, Longzhen
Zhu, Jianhua
Zhao, Qian
Wang, Zhixian
author_sort Yu, Longzhen
collection PubMed
description Industry 4.0 features intelligent manufacturing. Among them, the vision-based defect inspection algorithm is remarkable for quality control in parts manufacturing. With the help of AI and machine learning, auto-adaptive instead of manual operation is achievable in this field, and much progress has been made in recent years. In this study, considering the demand of inspection features in industrialization, we made further improvement in smart defect inspection. An efficient algorithm using Field Programmable Gate Array (FPGA)-accelerated You Only Look Once (YOLO) v3 based on an attention mechanism is proposed. First, because of the relatively fixed camera angle and defect features, an attention mechanism based on the concept of directing the focus of defect inspection is proposed. The attention mechanism consists of three improvements: (a) image preprocessing, which is to tailor images for selectively concentrating on the defect relevant things. Image preprocessing mainly includes cutting, zooming and splicing, named CZS operations. (b) Tailoring the YOLOv3 backbone network, which is to ignore invalid inspection regions in deep neural networks and optimize the network structure. (c) Data augmentation. First, two improvements can be made to efficiently reduce deep learning operations and accelerate the inspection speed, but the preprocessed images are similar and the lack of diversity will reduce network accuracy. So, (c) is added to mitigate the lack of considerable amounts of training data. Second, the algorithm is deployed on a PYNQ-Z2 FPGA board to meet the industrialization production requirements for accuracy, efficiency and extensibility. FPGA can provide a low-latency, low-cost, high-power-efficiency and flexible architecture that enables deep learning acceleration for industrial scenarios. A Xilinx Deep Neural Network Development Kit (DNNDK) converted the improved YOLOv3 to Programmable Logic (PL), which can be deployed on FPGA. The conversion process mainly consists of pruning, quantization and compilation. Experimental results showed that the algorithm had high efficiency, inspection accuracy reached 99.2%, processing speed reached 1.54 Frames per Second (FPS), and power consumption was only 10 W.
format Online
Article
Text
id pubmed-9323378
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher MDPI
record_format MEDLINE/PubMed
spelling pubmed-93233782022-07-27 An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA Yu, Longzhen Zhu, Jianhua Zhao, Qian Wang, Zhixian Micromachines (Basel) Article Industry 4.0 features intelligent manufacturing. Among them, the vision-based defect inspection algorithm is remarkable for quality control in parts manufacturing. With the help of AI and machine learning, auto-adaptive instead of manual operation is achievable in this field, and much progress has been made in recent years. In this study, considering the demand of inspection features in industrialization, we made further improvement in smart defect inspection. An efficient algorithm using Field Programmable Gate Array (FPGA)-accelerated You Only Look Once (YOLO) v3 based on an attention mechanism is proposed. First, because of the relatively fixed camera angle and defect features, an attention mechanism based on the concept of directing the focus of defect inspection is proposed. The attention mechanism consists of three improvements: (a) image preprocessing, which is to tailor images for selectively concentrating on the defect relevant things. Image preprocessing mainly includes cutting, zooming and splicing, named CZS operations. (b) Tailoring the YOLOv3 backbone network, which is to ignore invalid inspection regions in deep neural networks and optimize the network structure. (c) Data augmentation. First, two improvements can be made to efficiently reduce deep learning operations and accelerate the inspection speed, but the preprocessed images are similar and the lack of diversity will reduce network accuracy. So, (c) is added to mitigate the lack of considerable amounts of training data. Second, the algorithm is deployed on a PYNQ-Z2 FPGA board to meet the industrialization production requirements for accuracy, efficiency and extensibility. FPGA can provide a low-latency, low-cost, high-power-efficiency and flexible architecture that enables deep learning acceleration for industrial scenarios. A Xilinx Deep Neural Network Development Kit (DNNDK) converted the improved YOLOv3 to Programmable Logic (PL), which can be deployed on FPGA. The conversion process mainly consists of pruning, quantization and compilation. Experimental results showed that the algorithm had high efficiency, inspection accuracy reached 99.2%, processing speed reached 1.54 Frames per Second (FPS), and power consumption was only 10 W. MDPI 2022-06-30 /pmc/articles/PMC9323378/ /pubmed/35888875 http://dx.doi.org/10.3390/mi13071058 Text en © 2022 by the authors. https://creativecommons.org/licenses/by/4.0/Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
spellingShingle Article
Yu, Longzhen
Zhu, Jianhua
Zhao, Qian
Wang, Zhixian
An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA
title An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA
title_full An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA
title_fullStr An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA
title_full_unstemmed An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA
title_short An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA
title_sort efficient yolo algorithm with an attention mechanism for vision-based defect inspection deployed on fpga
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9323378/
https://www.ncbi.nlm.nih.gov/pubmed/35888875
http://dx.doi.org/10.3390/mi13071058
work_keys_str_mv AT yulongzhen anefficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga
AT zhujianhua anefficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga
AT zhaoqian anefficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga
AT wangzhixian anefficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga
AT yulongzhen efficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga
AT zhujianhua efficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga
AT zhaoqian efficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga
AT wangzhixian efficientyoloalgorithmwithanattentionmechanismforvisionbaseddefectinspectiondeployedonfpga