Current Issue Cover
Faster R-CNN在工业CT图像缺陷检测中的应用

常海涛,苟军年,李晓梅(兰州交通大学自动化与电气工程学院, 兰州 730070)

摘 要
目的 传统的缺陷图像识别算法需要手工构建、选择目标的主要特征,并选取合适的分类器进行识别,局限性较大。为此研究了一种基于Faster R-CNN (faster Regions with convolutional neural networks features)的缺陷检测方法,该方法采用卷积网络自动提取目标的特征,避免了缺陷检测依赖手工设计缺陷特征的问题。方法 该方法基于卷积神经网络。首先,确定缺陷检测任务:选择工业CT (computed tomography)图像中主要存在的3种类型的缺陷:夹渣、气泡、裂纹为检测目标;其次,人工对缺陷图像采用矩形框(GT box)进行标注,生成坐标文件,并依据矩形框的长宽比选定42种类型的锚窗(anchor);在训练之前采用同态滤波对数据集做增强处理,增强后的图片经过卷积层与池化层后获得卷积特征图,并送入区域建议网络RPN (region proposal networks)中进行初次的目标(不区分具体类别)和背景判断,同时粗略地回归目标边框;最后经过RoI (region of interest) pooling层后输出固定大小的建议框,利用分类网络对建议区域进行具体的类别判断,并精确回归目标的边框。结果 待检测数据集的图片大小在150×150到350×250之间,每张图片含有若干个不同类别的气泡、夹渣和裂纹。利用训练出来的模型对缺陷图片进行检测,可以有效识别到不同类别的缺陷目标,其中可以检测到面积最小的缺陷区域为9×9 piexl,并快速、准确地标出气泡、夹渣和裂纹的位置,检测准确率高达96%,平均每张图片的检测时间为86 ms。结论 所提出的Faster R-CNN工业CT图像缺陷检测方法,避免了传统缺陷检测需要手动选取目标特征的问题,缺陷的识别与定位过程的自动化程度更高;该方法检测效果良好,如果需要检测更多种类的缺陷,只需要对网络进行微调训练即可获得新的检测模型。本文为工业CT图像缺陷检测提供了一种更高效的方法。
Application of faster R-CNN in image defect detection of industrial CT

Chang Haitao,Gou Junnian,Li Xiaomei(School of Automation & Electrical Engineering, Lanzhou Jiao Tong University, Lanzhou 730070, China)

Objective Traditional defect image recognition algorithms should manually build and select the main characteristics of targets, and the main defect features that are commonly used are as follows:(1) shape characteristics, including circumference, area, aspect ratio, and circularity; (2) gray scale features, including the mean of the gray scale and the variance of the gray level; and (3) characteristics adopted by the Hu invariant moment method to extract the mathematical features of translation, proportion, and rotation invariances and the suitable classifier selected to recognize the targets according to the selected features. The most frequently used classifiers include support vector machines, Adaboost, and artificial neural networks. These methods utilize several target features and classifiers to detect defects, which are usually designed manually. The identification process is time consuming and has certain limitations in application. Therefore, this study proposes a defect detection method that is based on faster regions with convolutional neural networks (faster R-CNN) features. The method uses convolution networks to automatically extract features of targets and avoids the problem of the dependence of defect detection on the character of the manual design.Method The method is based on a deep convolutional neural network. First, defect detection is determined. Three types of defects (detection targets) mainly exist in industrial computed tomography (CT) images, namely, slag inclusion, bubbles, and cracks. Then, the target images are manually annotated with a rectangular box (ground truth[GT] box), the coordinate files for the GT are generated, and 42 types of anchor boxes are selected according to the aspect ratio of the GT bounding box. The Laplace operator and the homomorphic filter are used to sharpen and enhance the data set before training. The enhanced images are processed by the convolution and pooling layers. The convolution feature map is obtained and sent to the region proposal networks for the initial judgment of targets (no specific category) and background. Meanwhile, the target border is roughly regressed. Then, the generated proposal box is sent to the region of interest pooling layer to produce fixed-length output. Finally, the proposed feature maps are judged by the fully connected and softmax layers for specific categories, and the probability vector of each category is generated. Moreover, an accurate target detection box is regressed using the bounding box regression layer.Result The size of the picture in the data set to be detected is between 150×150 and 350×250, and each picture contains several different categories of bubbles, slags, and cracks. The trained model can be used to detect the defect images and effectively classify them into various categories of defect targets. The trained model according to the GT aspect ratio selected anchor that can detect the smallest area of the bubble is 9×9 piexl (that is, the size of the GT area, non-defect area), and the smallest area with slag inclusion is 9×10 piexl. This model can accurately and quickly mark the locations of bubbles, slags, and cracks with a detection accuracy of up to 96%, and the average detection time of each image is 86 ms.Conclusion This work uses a deep convolutional neural network to automatically extract the features of defects and classify and identify defects on the basis of the extracted features, thereby avoiding the problem of manually selecting target features in traditional defect detection. Moreover, the process of defect recognition and localization becomes increasingly automated, thus resulting in reduced detection time and improved efficiency. The trained model according to the GT aspect ratio selected anchor is more pertinent for small targets, such as bubbles and slags, and for relatively large targets, such as cracks, and the border regression is accurate. The collected industrial CT images are grayscale pictures, whose information are not as rich as that in RGB pictures. Thus, CT image preprocessing before training can improve the detection accuracy of the training models, and the accuracy rate of the overall detection is better by 2% than that without preprocessing. The faster R-CNN defect detection algorithm proposed in this work has a fine detection effect and can detect the target in the industrial CT image quickly and accurately. If additional types of defects need to be detected, then a new detection model can be obtained by the fine-tuned training of the network. This work provides a new and efficient solution for the defect detection of industrial CT images.