Defect Inspection Using Modified YoloV4 on a Stitched Image of a Spinning Tool

Sensors (Basel). 2023 May 4;23(9):4476. doi: 10.3390/s23094476.

Abstract

In Industry 4.0, automation is a critical requirement for mechanical production. This study proposes a computer vision-based method to capture images of rotating tools and detect defects without the need to stop the machine in question. The study uses frontal lighting to capture images of the rotating tools and employs scale-invariant feature transform (SIFT) to identify features of the tool images. Random sample consensus (RANSAC) is then used to obtain homography information, allowing us to stitch the images together. The modified YOLOv4 algorithm is then applied to the stitched image to detect any surface defects on the tool. The entire tool image is divided into multiple patch images, and each patch image is detected separately. The results show that the modified YOLOv4 algorithm has a recall rate of 98.7% and a precision rate of 97.3%, and the defect detection process takes approximately 7.6 s to complete for each stitched image.

Keywords: YOLOv4; random sample consensus (RANSAC); scale-invariant feature transform (SIFT); tool rotating detection.

Grants and funding

This work was supported by the Ministry of Science and Technology (MOST), Taiwan, R.O.C., grants MOST 111-2221-E-006-191, Tongtai Machine and Tool Co., Ltd., and Contrel Technology Co., Ltd.