PMID- 35888875 OWN - NLM STAT- PubMed-not-MEDLINE LR - 20220731 IS - 2072-666X (Print) IS - 2072-666X (Electronic) IS - 2072-666X (Linking) VI - 13 IP - 7 DP - 2022 Jun 30 TI - An Efficient YOLO Algorithm with an Attention Mechanism for Vision-Based Defect Inspection Deployed on FPGA. LID - 10.3390/mi13071058 [doi] LID - 1058 AB - 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. FAU - Yu, Longzhen AU - Yu L AUID- ORCID: 0000-0002-6594-6679 AD - College of Economics and Management, Qingdao University of Science and Technology, Qingdao 266000, China. FAU - Zhu, Jianhua AU - Zhu J AUID- ORCID: 0000-0003-4297-1836 AD - College of Economics and Management, Qingdao University of Science and Technology, Qingdao 266000, China. FAU - Zhao, Qian AU - Zhao Q AD - Department of Creative Informatics, Kyushu Institute of Technology, Fukuoka 804-8550, Japan. FAU - Wang, Zhixian AU - Wang Z AD - College of Economics and Management, Qingdao University of Science and Technology, Qingdao 266000, China. LA - eng GR - 2020B0101050001/the R&D Project in Key Areas of Guangdong Province/ PT - Journal Article DEP - 20220630 PL - Switzerland TA - Micromachines (Basel) JT - Micromachines JID - 101640903 PMC - PMC9323378 OTO - NOTNLM OT - FPGA OT - YOLO OT - attention OT - defect inspection OT - vision COIS- The authors declare no conflict of interest. EDAT- 2022/07/28 06:00 MHDA- 2022/07/28 06:01 PMCR- 2022/06/30 CRDT- 2022/07/27 01:32 PHST- 2022/06/03 00:00 [received] PHST- 2022/06/28 00:00 [revised] PHST- 2022/06/28 00:00 [accepted] PHST- 2022/07/27 01:32 [entrez] PHST- 2022/07/28 06:00 [pubmed] PHST- 2022/07/28 06:01 [medline] PHST- 2022/06/30 00:00 [pmc-release] AID - mi13071058 [pii] AID - micromachines-13-01058 [pii] AID - 10.3390/mi13071058 [doi] PST - epublish SO - Micromachines (Basel). 2022 Jun 30;13(7):1058. doi: 10.3390/mi13071058.