0% found this document useful (0 votes)
112 views9 pages

An Adaptive-Network-Based Fuzzy Inference System For Classification of Welding Defects PDF

This document discusses an adaptive-network-based fuzzy inference system (ANFIS) for classifying welding defects in radiographic images. The system uses a multi-stage approach: 1) Image processing techniques preprocess the images to identify weld regions and detect defects. 2) Geometric features describing defect shape and orientation are extracted. 3) ANFIS is used to classify defects based on combinations of the features. The system aims to automate defect classification and determine the combination of features that allows the best classification with minimum error. Results found a correlation coefficient of at least 0.84 and accuracy of 82.6% in classifying five defect types.

Uploaded by

ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views9 pages

An Adaptive-Network-Based Fuzzy Inference System For Classification of Welding Defects PDF

This document discusses an adaptive-network-based fuzzy inference system (ANFIS) for classifying welding defects in radiographic images. The system uses a multi-stage approach: 1) Image processing techniques preprocess the images to identify weld regions and detect defects. 2) Geometric features describing defect shape and orientation are extracted. 3) ANFIS is used to classify defects based on combinations of the features. The system aims to automate defect classification and determine the combination of features that allows the best classification with minimum error. Results found a correlation coefficient of at least 0.84 and accuracy of 82.6% in classifying five defect types.

Uploaded by

ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ARTICLE IN PRESS

NDT&E International 43 (2010) 191–199

Contents lists available at ScienceDirect

NDT&E International
journal homepage: www.elsevier.com/locate/ndteint

An adaptive-network-based fuzzy inference system for classification of


welding defects
Juan Zapata b,c,, Rafael Vilar a,c, Ramón Ruiz b,c
a
Departamento de Estructuras y Construcción, Spain
b
Departamento de Electrónica, Tecnologı́a de Computadoras y Proyectos, Spain
c
Universidad Politécnica de Cartagena, Antiguo Cuartel de Antigones. Plaza del Hospital 1, 30202 Cartagena, Spain

a r t i c l e in fo abstract

Article history: In this paper, we describe an adaptive-network-based fuzzy inference system to recognise welding
Received 24 February 2009 defects in radiographic images. In a first stage, image processing techniques, including noise reduction,
Received in revised form contrast enhancement, thresholding and labelling, were implemented to help in the recognition of weld
4 November 2009
regions and the detection of weld defects. In a second stage, a set of 12 geometrical features which
Accepted 6 November 2009
characterise the defect shape and orientation was proposed and extracted between defect candidates.
Available online 13 November 2009
In a third stage, an adaptive-network-based fuzzy inference system (ANFIS) for weld defect
Keywords: classification was used. With the aim of obtaining the best performance to automate the process of
Weldment the classification of defects, of all possible combinations without repetition of the 12 features chosen,
X-rays
four were used as input for the ANFIS. The results were compared with the aim to know the features
Image processing
that allow the best classification. The correlation coefficients were determined obtaining a minimum
Fuzzy systems
Automated inspection value of 0.84. The accuracy or the proportion of the total number of predictions that were correct was
determined obtaining a value of 82.6%.
& 2009 Elsevier Ltd. All rights reserved.

1. Introduction position (superficial or internal location), orientation and size.


Therefore, the radiographic welded joint interpretation is a
In the last five decade, non-destructive testing (NDT) methods complex problem requiring expert knowledge. In our view, a
have progressed from being a simple laboratory curiosity to an system of automatic inspection of radiographic images of welded
essential tool in the industry. With the considerable increase in joints should have the following stages: digitalisation of the films,
the competition among industries, the quality control of equip- image pre-processing seeking mainly the attenuation/elimination
ment and materials has become a basic requisite to remain of noise; contrast improvement and discriminate feature en-
competitive in the national and international markets. Although it hancement, a multi-level segmentation of the scene to isolate the
is one of the oldest techniques of non-destructive inspection, areas of interest (the weld region must be isolated from the rest
radiography is still accepted as essential for the control of welded the elements that compose the joint), the detection of hetero-
joints in many industries such as the nuclear, naval, chemical or geneities and, finally, classification in terms of individual and
aeronautical industries. It is particularly important for critical global features. Over the last 30 years, there has been a great deal
applications where weld failure can be catastrophic, such as in of research attempting to develop an automatic (or semiauto-
pressure vessels, load-bearing structural members, and power matic) system for the detection and classification of weld defects
plants [1]. For the correct interpretation of the representative in continuous welds examined by radiography [2,3].
mark of a heterogeneity, a knowledge of welded joint features and Today, the stage corresponding to the classification of patterns
of the potential heterogeneities and types of defects which can be has been one of the most studied in terms of research. A method
detected using radiographic welded joint inspection is necessary. for the automated recognition of welding defects was presented
Limitations to correlating the heterogeneity and the defect are by Sofia and Redouane [4], in which detection follows a pattern
imposed by the nature of the defect (discontinuities and recognition methodology. Vieira et al. [5] employ the fractal tools
impurities), morphology (spherical, cylindrical or plain shape), in a preprocessing step, producing curves with a considerably
smaller number of points than in the original signals. These curves
 Corresponding author at: Universidad Politécnica de Cartagena, Antiguo
are then used in the classification step, which is realized by
applying an extension of the Karhunen-Loe ve linear transforma-
Cuartel de Antigones. Plaza del Hospital 1, 30202 Cartagena, Spain.
Tel.: +34 968 326458; fax: + 34 968 326400. tion. Silva et al. [6] proposed a method for detection welding
E-mail address: [email protected] (J. Zapata). defects, in which, in a first step, called image pre-processing, the

0963-8695/$ - see front matter & 2009 Elsevier Ltd. All rights reserved.
doi:10.1016/j.ndteint.2009.11.002
ARTICLE IN PRESS
192 J. Zapata et al. / NDT&E International 43 (2010) 191–199

quality of the X-ray image is improved using a median filter and a reduce the number of features used in the input vector using very
contrast enhancement technique. The defect detection follows the few geometrical features (4), second, we use different combina-
general pattern recognition scheme. In another work, Silva et al. tions of features with the aim to know the combination that
[7] describe a study of non-linear classifiers implemented by improves the performance of the classification and is therefore
artificial neural networks aiming principally to increase the the most significant combination and third, our method ANFIS for
percentage of the defect recognition success obtained with the weld defect classification was used to automate the process of
linear classifiers. They used a novel approach for this area of classification in five types of defects, i.e. non-defect, slag
research, aiming to prove that the quality of the features is more inclusion, porosity, longitudinal crack and transversal crack, the
important than the quantity of the features used. In recent work, four main types of weld defects met in practice plus the non-
Silva et al. [8] present the methodologies used to estimate the defect type.
classification accuracy of the non-linear classifiers implemented
using artificial neural networks.
Liao [9,10] developed a fuzzy reasoning-based expert system
2. Experimental methodology
for the recognition of welds in radiographic images. First, each
object in radiographic image is identified and described with a
three feature vector. The fuzzy rules are extracted from feature Digital image processing techniques are employed to lessen
data one feature at a time based on a modified fuzzy C-means the noise effects and to improve the contrast, so that the principal
algorithm. Liao [11] researches on improving the accuracy by objects in the image become more apparent than the background.
feature selection. To this end, he proposes two versions of ant Threshold selection methods, labelled techniques and feature
colony optimization (ACO)-based algorithms for feature selection extraction are used to obtain some discriminatory features that
and shows their effectiveness to improve the accuracy in can facilitate both the weld region and the defects segmentation.
detecting weld flaws and the accuracy in classifying weld flaw Finally, the features obtained are the input pattern of the
types. Shafeek et al. [12] proposed an expert vision system for adaptive-neuro-fuzzy inference system. The modelling of a
automatic identification and inspection of gas pipeline welding welding defect classificator with ANFIS was implemented through
defects. Soo et al. [13] in his research, developed an effective its training process. Next, the checking process was used for
algorithm to segment the defects automatically from noisy weld testing the generalisation capability of the fuzzy inference system.
radiographs having poor illumination using background subtrac- Fig. 1 shows the major stages of our welding defect detection
tion and rank levelling. Lim et al. [14] develop an classification system.
system using a large number of simulated images of weld defects. Radiographic films can be digitised by several systems. An
They defined a set of shape descriptors and optimised the number overview of the applicability of the existing film digitisation
of descriptors required in the classification using a statistical systems to non-destructive testing can be found in [19,20]. The
approach. A multilayer perceptron (MLP) model using back- most common way of digitisation is through scanners, which
propagation algorithm was used for learning and classifying the work with light transmission—usually called transparency adap-
defects. ters. In this present study, a UMAX scanner was used, model:
Mery and Berti [15] present a new approach to detecting weld Mirage II (maximum optical density: 3.3; maximum resolution for
defects from digitalised films based on texture features. The paper films: 2000 dpi) to scan the IIW films [21]. The spatial resolution
describes two groups of widely used texture features: (1) those used in the study was 500 dpi (dots per inch), totalling an average
based on the co-occurrence matrix; and (2) features based on 2D image size of 2900 pixels ðhorizontal lengthÞ  950 pixels (vertical
Gabor functions. An approach that allows automatic weld defect
detection and classification based on the combined use of
Radiographic Image
principal component analysis (PCA) and an artificial neural
network (ANN) was presented by Mirapeix et al. [16]. Wang and
Liao [17] describe the use of 12 numeric features to represent Preprocessing
each defect instance. The extracted feature values are subse-
quently used to classify welding flaws into different types by Noise reduction
using two well-known classifiers: fuzzy k-nearest neighbour and Contrast
multi-layer perceptron neural networks classifiers. Hernández et enhancement
al. [18] present a neuro-fuzzy method (ANFIS) for automated
defect detection in aluminium castings. The system is able to
Weld segmentation Defect segmentation
detect potential defects into defects and regular structures or false
alarms. Thresholding Otsu Thresholding Otsu
In the literature there is a poverty of research data on neuro-
fuzzy methods in general and ANFIS in particular for weld defect Labelling Labelling
classification. We are in the process of researching and analyses
that would provide more sophisticated capabilities to our system Feature extraction Defect
Segmentation
for weld defects classification as ANFIS integrates the best
Weld region
features of the fuzzy inference systems and the neural networks. segmentation Feature extraction
Fuzzy logic is flexible, tolerant of the imprecise data and can be
built on top of the experience of experts in direct contrast to ROI ANFIS
neural networks, which take training data and generate opaque,
impenetrable models. Fuzzy logic relies on the experience of Training
people who already understand your system. The aim of this Checking
approach is to present the methodology used and the results
obtained to estimate the classification accuracy of the main Results
classes of weld defects. Our methodology tries to solve some
shortcomings of the works carried out in the past. First, we try to Fig. 1. Procedure for the automatic welding defect detection system.
ARTICLE IN PRESS
J. Zapata et al. / NDT&E International 43 (2010) 191–199 193

length), which resulted in an average pixel size of 50 mm. Such a


resolution was adopted for the possibility of detecting and
measuring defects of hundredths of millimetres, which, in
practical terms of radiographic inspection, is much higher than
the usual cases. The adopted gray scale resolution was 8 bits
(256 levels), because the scanner model used does not allow a
better resolution. However, it is known that visually, the human
being is not able to recognise any difference in gray scales over
128 levels and images of 10, 12 or 16 bits that occupy a significant
amount of the memory space. In order to improve the reliability of
Fig. 2. Result of welding region segmentation. Left, original image and right,
the results, radiographs from IIW (International Institute of welding region boundary added to original image.
Welding) were used in a total of 86 films. These patterns have
indications of the most frequent classes of defects in welded
joints, such as lack of penetration, porosity, slag inclusion linear Parent object
and non-linear, undercutting, etc. Hole
Parent object

2.1. Image preprocessing Parent object

After digitising the films, it is common practice to adopt a


preprocessing stage for the images with the specific purpose of
reducing/eliminating noise and improving contrast. Radiographic
Child
films usually have noise and deficient contrast due to the intrinsic
factors involved in the inspection technique, such as non-uniform
illumination and the limited range of intensities of the image
capture device. Noise in scanned radiographic images is usually
characterised as randomly spread pixels, with intensity values Fig. 3. Synthetic image illustrates boundaries of holes inside parent objects, and
child objects.
that are different from their neighbouring pixels. Two preproces-
sing steps were carried out in this work: in the first step, for
reducing/eliminating noise an adaptive 7-by-7 Wiener filter [22] The results of applying this algorithm to radiographic images is
and 3-by-3 Gaussian low-pass filter were applied, while for shown in Fig. 2.
adjusting the image intensity values to a specified range to
contrast the stretch, contrast enhancement was applied, mapping 2.3. Defect candidates segmentation
the values in intensity input image to new values in the output
image, so that values between those representing the bottom 1% This stage takes as input the bounding box image obtained in
(0.01) and the top 1% (0.99) of the range are mapped to values the previous stage and produces, as output, an image consisting of
between [0 1]. Values below 0.01 and above 0.99 are clipped. only potential defects. The process is developed in three phases. In
Finally, the image was divided into five bands of 640  480 pixels the first phase, the bounding box image obtained in the previous
located on the horizontal axis for processing of the following stage is binarised. For this, we use Otsus’s method to choose the
stages. In this way, we have an image divided into more optimum threshold. The second phase uses a binary image, where
computationally user friendly sizes. non-zero pixels belong to an object and 0-pixels constitute the
background. The algorithm traces the exterior boundary of
2.2. Weld region segmentation objects, as well as the boundaries of holes inside these objects.
It also descends into the outermost objects (parents) and traces
their children (objects completely enclosed by the parents). Fig. 3
In this stage, the weld region for each band must be isolated
illustrates these components in a synthetic image.
from the rest of the elements that form this joint. In this way, the
Using the algorithm on the radiographic image obtained in the
scene of interest is framed for later analysis aimed at detecting
previous step (bounding box) it is easy to deduce that defects
the possible defects. The process is developed in three phases. The
are objects included within a weld region, i.e. objects included in
goal of the first phase is to find an optimal overall threshold that
the objects labelled as 1. In this way, an image formed only of
can be used to convert the gray scale image into a binary image,
defect candidates is obtained. The results and the output of
separating an object’s pixels from the background pixels. For this,
applying this algorithm are shown in Fig. 4.
we use Otsu’s method [23], a threshold selection method from
grey-level histograms, which chooses the threshold to minimise
the intraclass variance of the thresholded black and white pixels. 2.4. Feature extraction
In a second phase, the connected components in the binary image
are labelled. The implemented algorithm uses the general The last stage is the feature extraction stage in terms of
procedure proposed by Haralick and Shapiro [24] . The algorithm the individual and overall characteristics of the heterogeneities.
returns a matrix, the same size as the input image, containing The output of this stage is a description of each defect candidate
labels for the 8-connected objects in the input image. The pixels in the image. This represents a great reduction in the image
labelled 0 are the background, the pixels labelled 1 represent one information from the original input image and ensures that the
object, the pixels labelled 2 represent a second object, and so on. subsequent classification of the defect type and the cataloguing of
To conclude, in a third phase, as a criterion to select between the degree of acceptance are efficient. In the present work,
labelled objects, the maximum area is established. In this way, we features describing the shape, size, location and intensity infor-
identify the weld region from among all the objects of the image. mation of defect candidates were extracted. These features are
Finally, as a preparation of the following stage, the smallest (see Appendix A): area, centroid (X and Y coordinates), major axis,
rectangle containing the weld region (bounding box) is calculated. minor axis, eccentricity, orientation, Euler number, equivalent
ARTICLE IN PRESS
194 J. Zapata et al. / NDT&E International 43 (2010) 191–199

Fig. 4. Results and outputs of applying algorithm to radiographic image (from left to right and top to bottom): original image, binary image, labelled image, segmented
weld region, weld region boundary and boundary added to original image. Objects 5–8 are included in object 1 (welding joint object). Objects included in weld region
(defect candidates).

140 output characteristics, output characteristics to output member-


nd ship functions, and the output membership function to a single-
120
si
po
valued output or a decision associated with the output. All these
tc processes are developed using only fixed membership functions
lc that were chosen arbitrarily. This fuzzy inference system is
100 applied to only modelling systems whose rule structure is
Number of samples

essentially predetermined by the user’s interpretation of the


80 characteristics of the variables in the model.
In some modelling situations, it is very difficult to discern what
60 the membership functions should look like simply by looking at
data. Rather than choosing the parameters associated with a given
membership function arbitrarily, these parameters could be
40 chosen so as to tailor the membership functions to the input/
output data in order to account for these types of variations in the
20 data values. In such cases, the neuro-adaptive learning techniques
can help. The shape of the membership functions depends on the
0 parameters, and changing these parameters changes the shape of
0 1 2 3 4 5 6 the membership function. Instead of just looking at the data to
types of defects choose the membership function parameters, membership func-
tion parameters are chosen automatically.
Fig. 5. Defect types. nd ¼ non  defect, si ¼ slag inclusion, po ¼ porosity, The neuro-adaptive learning method works similar to that of
tc ¼ transversal crack and lc ¼ longitudinal crack.
the neural networks. Neuro-adaptive learning techniques provide
a method for the fuzzy modelling procedure to gather informa-
diameter, solidity, extent and position. In this stage, the procedure tion about a data set. Then, Fuzzy Logic computes the member-
generates an input vector (12 components) for each defect ship function parameters that best allow the associated fuzzy
candidate and human experts in weld defects produce an inference system to track the given input/output data.
associated target vector. For this framework, input and target Since its introduction, ANFIS networks [25] have been
vectors were generated for 140 non-defects, 126 slag inclusions, successfully applied to classification tasks, rule-based process
87 porosities, 8 transversal cracks and 14 longitudinal cracks, controls, pattern recognition problems and the like. ANFIS is
distribution of classes shown in Fig. 5. Table 1 shows an example essentially an adaptive network functionally equivalent to FIS and
of the input feature vector for several defect candidates. structurally equivalent to an artificial neural network (ANN) and
represents a useful neural network approach for the solution of
2.5. ANFIS: adaptive neuro-fuzzy inference system these types of problems. It is able to construct an input–output
mapping based on both human knowledge and stimulated input–
The basic structure of the classic fuzzy inference system is a output data pairs. The development of the ANFIS is composed of
model that maps input characteristics to input membership two steps: architecture identification and parameter optimisation.
functions, input membership function to rules, rules to a set of Here a fuzzy inference system comprises the fuzzy model [26,27]
ARTICLE IN PRESS
J. Zapata et al. / NDT&E International 43 (2010) 191–199 195

Table 1
Some examples of input feature vectors.

Area Cx Cy Major A. Minor A. Eccent.

Slag inclusion IIW11 810.0000 25.2691 238.4642 45.1408 29.9140 0.7489


Orient. Euler n. Equiv. d. Solid. Extent Posit.
48.2862 1.0000 32.1142 0.8012 0.5199 138.3675

Non-defect IIW11 Area Cx Cy Major A. Minor A. Eccent.


2.0000 412.5000 28.0000 2.3094 1.1547 0.8660
Orient. Euler n. Equiv. d. Solid. Extent Posit.
0 2.0000 1.5958 1.0000 1.0000 2.0000

Slag inclusion IIW11 Area Cx Cy Major A. Minor A. Eccent.


510.0000 279.3824 142.7667 26.2069 24.9542 0.3055
Orient. Euler n. Equiv. d. Solid. Extent Posit.
8.3206 1.0000 25.4824 0.9677 0.7846 83.9411

Long. crack IIW106 Area Cx Cy Major A. Minor A. Eccent.


158.0000 82.6139 31.9937 61.3551 6.7870 0.9939
Orient. Euler n. Equiv. d. Solid. Extent Posit.
 16.9231 1.0000 14.1835 0.5032 0.1881 129.4975

Adaptive Fuzzy Firing Str. Adaptive Output least square error method), which enables fast convergence and
Fuzzification Rule Norm. Implic. guarantees the consequent parameters to be the global minimum
xy in the consequent parameter space [25].
To use the ANFIS as a defect classifier system, a schematic
µA1 ( x ) ωj ω1 illustration is given in Fig. 7. The inputs to the ANFIS are features
A1 Π N extracted from the previous stage (i.e. from defect segmentation
stage). The output of the ANFIS is defined as 1 or -1 corresponding
xy or otherwise, to a different defect class, as required by the Sugeno
x
model. Assuming the predefined architecture for the ANFIS-based
ω2 classifier being shown in Fig. 6, in our case, the inputs x and y
A2 Π N ωkfk
could be the size and perimeter values of the heterogeneities, and
Σ the output f could be f1; 1g corresponding or otherwise, to the
x y
defect class. Based on the defined input (pi ) and the output data
pairs (ti ), the ANFIS model can be optimised through its training
ω3 process. Since the architecture was predefined, the model is
B1 Π N
optimised only in the parameter sense.
x y The comprehensive classification process of the weld defects
y was automated through five independent ANFIS, one for each
class of defect, non-defect, slag inclusion, porosity, transversal
ω4
(x ) Π
B2 µ N crack and longitudinal crack. All systems were first-order Sugeno-
B 2 type with 4 inputs, 1 output and 3 bell membership functions per
input. The inputs to ANFIS represented some geometric features
to determine the type of defect for that vector, while its output
was oriented to be 1 or -1 corresponding or otherwise, to the
defect class.
Fig. 6. ANFIS architecture with two inputs, one output, and four rules.

proposed by Takagi, Sugeno and Kang to formalise a systematic 2.6. Regression analysis and confusion matrix
approach to generate fuzzy rules from an input-output data set.
The rule base contains fuzzy if-then rules of Takagi and Sugeno’s The performance of a classifier system can be measured to
type [28,29]. some extent by the errors on the test sets, but it is often useful
The most frequently investigated ANFIS architecture is the to investigate the ANFIS response in more detail. One option is to
first-order Sugeno model, due to its efficiency and transparency. perform a regression analysis between the ANFIS response and
A representative ANFIS architecture with two inputs (x and y), one the corresponding targets. The correlation coefficient obtained
output (f), and four rules is illustrated in Fig. 6, which consists of between the outputs and the targets is a measure of how well the
five layers: Adaptive Fuzzification, Fuzzy Rule, Firing Strength variation in the output is explained by the targets. If this number
Normalisation, Adaptive Implication, and Output. is equal to 1, then there is a perfect correlation between the
Based on the predefined ANFIS architecture, the modelling of a targets and outputs which indicates a perfect fit. A linear
target system using the ANFIS is implemented through its training regression using the least square method was used to determine
process. The commonly adopted training approach is the hybrid the correlation coefficient. To confirm the goodness of fit was used
algorithm consisting of back-propagation for the parameters the coefficient of determination R2 or the proportion of variability
associated with the input membership functions, and least in a data set that is accounted for by a statistical model. We have
squares estimation for the parameters associated with the output used a confusion matrix as a visualization tool typically used in
membership functions (i.e. a combination of gradient descent and supervised learning (in unsupervised learning it is typically called
ARTICLE IN PRESS
196 J. Zapata et al. / NDT&E International 43 (2010) 191–199

features (12C4) fuzzy model. This division of data values results in two data
structures, training data and checking data. Training data and
p1 p2 p3 p4 checking data are shown in parallel to the five ANFIS systems.
t1 To start the training, it needs a FIS structure that specifies the
structure and initial parameters of the FIS for learning. Our FIS
structures provide two generalised bell membership functions on
ANFIS each of the four inputs, eight altogether for each FIS structure. The
non defect generated FIS structure contains 16 fuzzy rules with 104
parameters. To achieve good generalisation capability, it is
important that the number of training data points be several
t2 times larger than the number of parameters being estimated. In
this case, the ratio between data and parameters is about three
(300/104). The initial membership functions were equally spaced
ANFIS and cover the whole input space. There are two main methods
slug inclusion that ANFIS learning employs for updating membership function
parameters: back-propagation for all parameters (a steepest
hardlims descent method), and a hybrid method (our case) consisting of
t3 back-propagation for the parameters associated with the input
membership functions, and least squares estimation for the
-1
parameters associated with the output membership functions.
1 As a result, the training error decreases, at least locally,
ANFIS -1 throughout the learning process. Therefore, the more the initial
porosity membership functions resemble the optimal ones, the easier it
-1
will be for the model parameter training to converge. Human
t4 -1 expertise about the target system to be modelled may aid in
setting up these initial membership function parameters in the
FIS structure. Our FIS structure invokes the so-called curse of
dimensionality, and causes excessive propagation of the number
ANFIS of rules when the number of inputs is moderately large, that is,
trans. crack more than four or five. This is the reason for using only 4 inputs
(4 features of 12).
The checking data was used for testing the generalisation
t5
capability of the fuzzy inference system at each epoch. The
checking data had the same format as that of the training data,
and its elements were distinct from those of the training data. The
ANFIS checking data is important for learning tasks for which the input
long. crack
number is large, and/or the data itself is noisy. A fuzzy inference
system needs to track a given input/output data set well. Because
the model structure used for ANFIS is fixed, there is a tendency for
Fig. 7. Classifier system based on ANFIS architecture. the model to overfit the data on which is it trained, especially for a
large number of training epochs. If overfitting does occur, the
fuzzy inference system may not respond well to other indepen-
a matching matrix). Each column of the matrix represents the dent data sets, especially if they are corrupted by noise. A
instances in a predicted class, while each row represents the validation or checking data set is normally very useful for these
instances in an actual class. One benefit of a confusion matrix is situations. This data set is used to cross-validate the fuzzy
that it is easy to see if the system is confusing two classes inference model. This cross-validation requires applying the
(i.e. commonly mislabelling one as another). Other possible checking data to the model and then seeing how well the model
methods to use could be an analysis of pattern residuals in the responds to this data. The checking data is applied to the model at
fit. A detailed discussion of these methods is beyond the scope of each training epoch. The model parameters that correspond to the
this work although a detailed discussion of these techniques can minimum checking error was elected. The use of the minimum
be found in [30]. checking data error epoch to set the membership function
parameters assumes that the checking data is similar enough to
the training data so that the checking data error decreases as the
3. Results and discussions training begins, and that the checking data increases at some
point in the training after the data overfitting occurs. After
In this work, five independent ANFIS were developed to training, the final FIS is the one associated with the minimum
automate the process of classification in five types of defects, checking error.
non-defect, slag inclusion, porosity, longitudinal crack and All possible combinations without repetition of the 12 features
transversal crack. The training input–output data is a structure of which four were chosen was used to know the features that
whose first component is the four-dimensional input p, and allow the best classification. In this way, the best four features can
whose second component is the one-dimensional output t, where be used to classify the heterogeneities. In Fig. 8 is shown the
p is some of four features chosen out of 12, and t is the output for correlation coefficients for each input combination and for each
each class of defect corresponding to a particular ANFIS. There are defect class. In Table 2 is shown the correlation coefficients for
375 input–output data values. The system uses 300 data values some feature combinations, where numbers represent the
for the ANFIS training (these become the training data set), while features: (1) area, (2) centroid x, (3) centroid y, (4) mayor axis
the others are used as checking data for validating the identified length, (5) minor axis length, (6) eccentricity, (7) orientation,
ARTICLE IN PRESS
J. Zapata et al. / NDT&E International 43 (2010) 191–199 197

(8) Euler number, (9) equivalent diameter, (10) solidity, are rest of the values of that row (i.e., for the non-defect class is
(11) extent and (12) perimeter; and nd is non-defect, si is slag 12 þ6 þ 0 þ 1 ¼ 19), false negatives (FN) are rest of the values of
inclusion, po is porosity, tc is transversal crack and lc is that column (i.e., for the non-defect class is 10 þ9 þ 1 þ2 ¼ 22),
longitudinal crack. The best combination for input vector true negatives (TN) are rest of the values of the confusion table
(underlined) was obtained by means of the best mean in the (i.e., for the non-defect class is 216). The accuracy (AC) is the
correlation coefficients for the five classes: eccentricity proportion of the total number of predictions that were correct. It
(6), orientation (7), equivalent diameter (9) and solidity (11) is determined using the equation:
with next correlation coefficients for each class, non-defect 0.87,
TP þ TN
slag inclusion 0.84, porosity 0.87, transversal crack 1 and AC ¼ ð1Þ
TP þ FP þFN þ TN
longitudinal crack 0.96.
When a data set is unbalanced (when the number of samples In order to see the contribution of the paper, we compare the
in different classes vary greatly) the correlation coefficient of a proposed method with other known methods. Vilar et al. [31] use
classifier is not representative of the true performance of the an ANN with different methods to avoid generalisation. Table 4
classifier. This can easily be understood by an example: there are shows the results obtained with an ANN with different methods
140 samples from class non-defect and only eight samples from to avoid generalisation and our method using ANFIS. It is obvious
class transversal cracks, the classifier could easily be biased that the results of the correlation coefficients are improved by
towards class no defect. In order to show the true performance of using ANFIS.
the proposed method we used a confusion table. In Table 3, we
show the confusion matrix of our classifier based on ANFIS. With
this table we can see if the system is confusing two classes (i.e. 4. Conclusions
commonly mislabelling one as another). But in this case, our
ANFIS is not confusing any class because the class with less The developed work is devoted to solving one of the stages,
samples is perfectly classified. A table of confusion can also maybe the most delicate, of a system of automatic weld defect
discern the number of true negatives, false positives, false recognition: the automatic recognition of the boundaries of the
negatives, and true positives. True positives (TP) are the values weld regions and classification of the defects. The main conclu-
of the intersection of rows and columns represented with the sions and contributions to this end are listed next: this paper
same label (i.e., for the non-defect class is 118), false positives (FP) presents a set of techniques dedicated to implementing a system
of automatic inspection of radiographic images of welded joints:
digitalisation of the films, image pre-processing directed mainly
at the attenuation/elimination of noise, contrast improvement
and discriminate feature enhancement facing the interpretation,

1
Table 3
Correlation Coeficient

0.8 Confusion matrix contains information about actual and predicted classifications
done by our classification system based on ANFIS.
0.6
Actual Accuracy
0.4
No defect Slag Incl. Poros. T. Crack L. Crack
0.2
Predicted
0 No defect 118 12 6 0 1 0.89
Slag Incl. 10 100 10 0 0 0.87
lc Poros. 9 10 71 0 0 0.95
600 tc T. Crack 1 1 0 8 0 0.99
400 po
Parame L. Crack 2 3 0 0 13 0.98
ter com 200 si ect
bination 0 nd of def
Types Total 140 126 87 8 14 0.82

Fig. 8. Correlation coefficients for each defect class and for each combination of Performance of such systems is commonly evaluated using the data in the matrix.
input vector of characteristics. The table shows the confusion matrix for a five class classifier.

Table 2
Some correlation coefficients results for the ANFIS with different features.

Features Corr. Coeff. Features Corr. Coeff.

nd si po tc lc nd si po tc lc

1 6 10 11 0.87 0.79 0.86 0.94 0.96 6 7 10 12 0.90 0.76 0.80 0.94 0.96
1 9 10 11 0.92 0.68 0.69 0.79 0.90 6 7 9 10 0:87 0:84 0:87 1:00 0:96
1 6 10 12 0.88 0.74 0.78 1.00 0.90 7 9 10 11 0.88 0.87 0.83 0.94 0.93
1 9 10 12 0.90 0.70 0.73 1.00 1.00 6 9 10 11 0.89 0.80 0.85 1.00 0.96
1 7 10 11 0.89 0.79 0.78 0.94 0.96 6 7 11 12 0.87 0.83 0.86 0.94 0.85
1 7 10 12 0.89 0.71 0.72 1.00 0.90 7 10 11 12 0.91 0.76 0.80 0.94 0.93
1 7 9 11 0.88 0.76 0.75 0.87 0.81 2 3 4 5 0.89 0.81 0.77 0.81 0.89
1 6 7 9 0.87 0.80 0.88 0.70 0.68 2 5 6 7 0.87 0.68 0.78 0.89 0.90

The best results are underlined and where numbers represent features: (1) area, (2) centroid x, (3) centroid y, (4) mayor axis length, (5) minor axis length, (6) eccentricity,
(7) orientation, (8) Euler number, (9) equivalent diameter, (10) solidity, (11) extent and (12) perimeter; and nd is non-defect, si is slag inclusion, po is porosity, tc is
transversal crack and lc is longitudinal crack.
ARTICLE IN PRESS
198 J. Zapata et al. / NDT&E International 43 (2010) 191–199

Table 4
Better results for correlation coefficients (C.C.) for a specific number of neurons in the input layer (R) and hidden layer (S1 ) for each defect class and for each regularisation
method versus ANFIS.

Regularisation Method for ANN ANFIS

No regularis. Mod. perf. f. Bayes. regr. Stop. early

Types of defect
No defect 0.91 8 10 0.92 10 20 0.90 7 22 0.92 11 14 0.87
Slag Incl. 0.76 11 24 0.70 7 24 0.72 11 10 0.70 11 16 0.84
Poros. 0.75 7 12 0.75 10 18 0.72 7 20 0.77 11 16 0.87
T. Crack 0.77 11 24 0.79 11 22 0.86 7 14 0.86 11 12 1.00
L. Crack 0.96 8 12 0.96 2 22 0.96 8 20 0.92 8 10 0.96
Mean 0.76 11 24 0:80 11 20 0.76 8 20 0.78 11 12 0.90

C.C. R S1 C.C. R S1 C.C R S1 C.C. R S1

multi-level segmentation of the scene to isolate the areas of (4) Major axis: The length (in pixels) of the major axis of the
interest (weld region), heterogeneity detection and classification ellipse that has the same second-moments as the region.
in terms of individual and overall features by means of an (5) Minor axis: The length (in pixels) of the minor axis of the
adaptive neuro-fuzzy inference system. ellipse that has the same second-moments as the region.
The aim of this paper is to obtain the best performance of a (6) Eccentricity: The eccentricity of the ellipse that has the same
classifier of weld defects based on ANFIS. With this purpose, an second-moments as the region. The eccentricity is the ratio
ANFIS was used to classify welding defects with different input of the distance between the foci of the ellipse and its major
vectors representing four features. This paper presents and axis length. The value is between 0 and 1. (0 and 1 are
analyses the aspects in the design and implementation of a new degenerate cases; an ellipse whose eccentricity is 0 is
methodology for the automatic recognition of weld region and actually a circle, while an ellipse whose eccentricity is 1 is
classification of weld defects. After a test phase and updating for a line segment.)
the specific proposed technique, a valuation of the relative (7) Orientation: The angle (in degrees) between the x-axis and
benefits is presented. From the validation process developed with the major axis of the ellipse that has the same second-
375 heterogeneities covering five types of defects were extracted moments as the region.
from 86 radiographs of the collection of the IIW, it can be (8) Euler number: The number of objects in the region minus
concluded that the proposed technique is capable of achieving the number of holes in those objects.
excellent results when the input feature vector: eccentricity, (9) Equivalent diameter: The diameter of a circle with the same
orientation, equivalent diameter and solidity are presented as the area as the region.
input combination. (10) Solidity: The proportion of the pixels in the convex hull that
are also in the region.
(11) Extent: The proportion of the pixels in the bounding box that
Acknowledgements are also in the region. Computed as the area divided by the
area of the bounding box.
The authors would like to thank Romeu R. da Silva of the (12) Position: Ratio supplies the location of defect in relation to
Department of Metallurgical and Materials Engineering, Federal the centre of the weld bead.
University of Rio de Janeiro (UFRJ) for providing the X-radiographs
digitised and to the International Institute of Welding for the In this stage, the procedure generates an input vector
permission given to publish the present work using the radio- (12 components) for each defect candidate and human experts
graphic standards. in weld defects produce an associated target vector. For this
framework, input and target vectors were generated for 140 non-
defects, 126 slag inclusions, 87 porosities, 8 transversal cracks and
Appendix A. Feature extraction
14 longitudinal cracks.

As we have mentioned, the last stage is the feature extraction


in terms of the individual and overall characteristics of the References
hetereogeneities. The output of this stage is a description of each
defect candidate in the image. This represents a great reduction in [1] Edward, G. Inspection of welded joints. In: ASM handbook welding,
brazing and soldering, vol. 6. Materials Park, Ohio: ASM International; 1993.
the image information from the original input image and ensures
p. 1081–88.
that the subsequent classification of the defect type and [2] Silva RR, Mery D. State-of-the-art of weld seam inspection using X-ray
cataloguing of the degree of acceptance are efficient. In the testing: part i—image processing. Materials Evaluation 2007;6(65):643–7.
present work, the features describing the shape, size, location and [3] Silva RR, Mery D. State-of-the-art of weld seam inspection using X-ray
testing: part ii—pattern recognition. Materials Evaluation 2007;9(65):833–8.
intensity information of the defect candidates were extracted. [4] Sofia, M., Redouane, D. Shapes recognition system applied to the non-
Each of the extracted features are briefly indicated as follows. destructive testing. In: 8th European conference on non-destructive testing
(ECNDT 2002), ECNDT 2002. Barcelona; 2002.
[5] Vieira AP, de Moura EP, Goncalves LL, Rebello JMA. Characterization of
(1) Area: The actual number of pixels in the region. welding defects by fractal analysis of ultrasonic signals. Chaos, Solitons &
(2) Centroid (X coordinate): The x component of the centre of Fractals 2008;38(3):748-54 (doi:10.1016/j.chaos.2007.01.012).
the mass of the region. [6] Da Silva, R.R., Siqueira, M.H., Caloba, L.P., Da Silva, I., De Carvalho, A., Rebello,
J.M. Contribution to the development of a radiographic inspection automated
(3) Centroid (Y coordinate): The y component of the centre of system. In: 8th European conference on non-destructive testing (ECNDT
mass of the region. 2002). Barcelona: ECNDT 2002; 17–21 June 2002.
ARTICLE IN PRESS
J. Zapata et al. / NDT&E International 43 (2010) 191–199 199

[7] Da Silva RR, Caloba LP, Siqueira MH, Rebello JM. Pattern recognition of weld [18] Hernández S, Sáez D, Mery D. Neuro-fuzzy method for automated defect
defects detected by radiographic test. NDT&E International 2004;37(6): detection in aluminium castings. Lecture Notes in Computer Science
461–70. 2004;3212(4):826–33.
[8] Da Silva RR, Siqueira MH, De Souza MPV, Rebello JM, Caloba LP. Estimated [19] Zscherpel, U. Film digitisation systems for dir: standards, requirements,
accuracy of classification of defects detected in welded joints by radiographic archiving and printing, 5 (05), NDT.net (/http://www.ndt.netS), May 2000.
tests. NDT and E International 2005;38(5):335–43. [20] Zscherpel, U. A new computer based concep for digital radiographic reference
[9] Liao TW. Classification of welding flaw types with fuzzy expert systems. images, 7 (12), NDT.net (/http://www.ndt.netS), November 2002.
Expert Systems with Applications 2003;25(1):101–11. [21] /http://www.umax.comS.
[10] Liao TW. Fuzzy reasoning based automatic inspection of radiographic welds: [22] Lim J. Two-dimensional signal and image processing. Englewood Cliffs, NJ:
weld recognition. Journal of Intelligent Manufacturing 2004;15(1): Prentice-Hall; 1990 p. 536–540.
69–85. [23] Otsu N. A threshold selection meted from gray-level histograms. IEEE
[11] Liao TW. Improving the accuracy of computer-aided radiographic weld Transactions on Systems, Man and Cybernetics 1979;9(1):62–6.
inspection by feature selection. NDT & E International 2009;42(4):229–39. [24] Haralick R, Shapiro L. Computer and robot vision, vol. 1. NY: Addison Wesley;
[12] Shafeek H, Gadelmawla E, Abdel-Shafy A, Elewa I. Automatic inspection of gas 1992 p. 28–48.
pipeline welding defects using an expert vision system. NDT & E International [25] Jang J-SR. Anfis: adaptive-network-based fuzzy inference system. IEEE
2004;37(4):301–7. Transactions on Systems, Man and Cybernetics 1993;23(3):665–85.
[13] Soo SL, Ratnam MM, Samad Z, Khalid MA. Segmentation of weld defects in [26] Takagi, T., Sugeno, M. Derivation of fuzzy control rules from human
radiographs using rank-levelling and background subtraction. Insight: Non- operator’s control actions. In: Proceedings of the IFAC symposium on fuzzy
Destructive Testing and Condition Monitoring 2008;50(4):188–94. information, knowledge representation and decision analysis, 1985. p. 55–60.
[14] Lim TY, Ratnam MM, Khalid MA. Automatic classification of weld defects [27] Sugeno, M., Kang, G. Structure identification of fuzzy model. Fuzzy Sets and
using simulated data and an mlp neural network. Insight: Non-Destructive Systems 28 (15–33).
Testing and Condition Monitoring 2007;49(3):154–9. [28] Takagi T, Sugeno M. Fuzzy identification of systems and its applications to
[15] Mery, D., Berti, M.A. Automatic detection of welding defects using texture modeling and control. IEEE Transactions on Systems, Man and Cybernetics
features. In: International symposium on computed tomography and image 1985;15:116–32.
processing for industrial radiology. Berlin; 2003. [29] Mamdani, E. Assilian, S. An experiment in linguistic synthesis with a fuzzy
[16] Mirapeix, J., Garcı́a-Allende, P.B., Cobo, A., Conde, O.M., López, J.M. Real-time logic controller. International Journal of Man-Machine Studies.
arc-welding defect detection and classification with principal component [30] Freedman D. Statistical models: theory and practice. Cambridge University
analysis and artificial neural networks. NDT & E International. Press; 2005.
[17] Wang G, Liao T. Automatic identification of different types of welding defects [31] Vilar R, Zapata J, Ruiz R. An automatic system of classification of weld defects
in radiographic images. NDT & E International 2002;35:519–28. in radiographic images. NDT & E International 2009;42(5):467–76.

You might also like