Detection of Defects in Rolled Stainless Steel Plates by Machine Learning
Detection of Defects in Rolled Stainless Steel Plates by Machine Learning
Research Article
in the opposite direction according to the resulting roller nano cracks. Digital image processing concepts are used to
deflection prevent these errors [4]. Metal materials have a enable the system to identify the crack on a metal body. In
very large area of use in our lives. The quality of these order to detect the crack on the metal body to be examined
materials used for important sectors (automotive, aviation, first, body scanning was performed with the help of
etc.) is also a very important issue. For these reasons, it is scanning mechanism (ultrasonic, x-ray, gamma rays or
important that the materials are produced in a flawless and radiography). The image of the metal body obtained as a
flawless manner. Predicting possible errors and taking result of scanning was added to the systems and the image
precautions is seen as a problem that needs to be solved was processed using different image processing
today. In addition, although the errors in the machines used algorithms. First, the image was converted to black and
in metal processing methods such as rolling can be seen white form and then the image was digitized. Based on the
with the eye, cracks etc. in the produced material. digitized data and using the segmentation process, the
problems are not immediately noticeable [5]. Many studies exact location of the crack was determined, and the length
have been conducted on the errors, defects and their effects and width of the crack on the metal body were determined
in the rolling process, which is frequently used today. In a [9]. In another study designed in line with these goals, the
study, product defects arising from the production process unchanging moment properties of cracks, holes, scratches,
were determined in sheet materials produced by rolling. oil stains and other images on the steel plate were taken,
Afterwards, the risk priority numbers (ROS) were the data results were extracted and analyzed. Then, the
determined by using the FMEA method for these errors. texture properties of the defective images were re-
Suggestions for the measures to be taken in order to examined and digitized by image processing [4].
prevent or reduce the high-risk errors in the production In another paper study completed for the detection of
process are presented [6]. In another study, the rolling defects on the metal surface, the developed system
force was examined and calculations were made with both presented an effective approach to detect and classify
analytical and numerical methods. The results calculated metal material defects by using computer vision and
by these methods were compared with the experimental machine learning technologies. Surface quality tests must
study data. Afterwards, the cold rolling line and the be completed before the materials most used in the
material used were modeled using finite element software. industry, namely metals, are ready for processing.
Rolling simulation was done with the parameters in the Because, in order to avoid errors that may occur after
experimental study, and the rolling force was obtained. production, the metals with defective surfaces must be
The results of all analyzes were compared and it was seen determined first. Early detection of defects minimizes
that the values were close to each other. As a result of the product damage and production cost. Defects in materials
study, it has been predicted how a material that has not reduce the production rate, which affects the market value
been rolled before will behave during rolling or how it can of the products [10].
be rolled with which parameters [7]. In this and similar In another study using edge detection filters such as
studies, artificial intelligence, image processing, etc. LoG, canny, roberts, perwitt and sobel in the analysis
Innovative technologies such as However, it is an phase, SSIM (Structural Symmetry Indicator Matrix),
inevitable fact that technology should be used in every MSE (Mean Square Error), IEF (Image Enhancement
field. Factor) and PSNR (Peak Signal to Noise Ratio) parameters
When the recent academic studies on the subject are were calculated. In the analysis, the optimized k-
examined, it is seen that innovative technologies such as Winsorized showed optimal results for the average noise
image processing are used for the detection of defects in removal capacity, and this analysis has proven to be an
materials. Traditional materials inspection methods used effective technique for detecting defects in stainless steel
for a long time no longer meet real production needs. For plates [11].
this reason, it has become an important issue to conduct in- Automatic fault detection on rolled steel surfaces is very
depth research on steel surface flaw inspection systems difficult due to the fact that it is done on a large surface,
and to develop them technologically. Instead of the both due to the diversity in appearance and their rarity.
accuracy and low performance of traditional detection This problem has led researchers to derive defect
methods, a machine vision-based surface defect detection descriptors by processing good quality images selected
method, which has high accuracy, can give results quickly from surface images. These descriptors, when trained with
and has intelligent processing features, should be appropriate machine learning algorithms, are able to
developed and used [8]. distinguish various surface defects. In today's world,
In one of the scientific studies, a system was developed where raw material resources are gradually depleted, it is
to help detect the crack on the metal body without of great importance to realize more sensitive
disassembling any machine used in the manufacturing manufacturing by reducing the error rates and the number
process. With this developed system, it has become of scraps. Reducing the heat treatment steps applied while
possible to detect the exact size and location of micro and recycling the materials used in the Iron-Steel industry
- 38 -
Feyzioglu and Taspinar, International Journal of Applied Mathematics Electronics and Computers 11(01): 037-043, 2023
provides a solution for raw material and energy saving in Sheets with a thickness of 1.5 mm and above, which
sheet metal forming processes for "Solutions for Zero- were made to create the dataset, were examined. It has
Carbon Production in the Iron-Steel Industry" [12]. been observed that errors such as corrosion, scratches (z-
Based on the studies in the literature, the main scratch, k-scatch), stain formations, pollution and mound
contributions of the study can be listed as follows: formations occur in case a homogeneous heat distribution
• With four different machine learning methods, is not made during the heat treatment applied to the
faults on steel surfaces will be detected and examined sheet materials. The main purpose of the
production will be carried out flawlessly and research is to correctly classify the surface defects that
quickly. occur in stainless steel plates with six types of possible
• The features that play an important role in the defects. The input vector consists of 27 indicators that
detection of defects on steel surfaces will be approximately define the geometric shape and outline of
determined by the correlation analysis. the defect. Frequency of feature values is a must-know
• The way to use machine learning models in information in classification problems. In this way,
decision support systems to be used in the preliminary information about the classification success
production phase in the Iron and Steel industry will can be obtained. In Figure 2, the frequencies of the data
be paved. according to the characteristics are shown.
The study is organized under four main headings. The
first section includes the studies in the literature and the
motivation of the study. The second section contains
information about the dataset used, machine learning
methods and performance evaluations. The third section
contains the experimental results and the fourth section
contains the conclusions and recommendations.
- 39 -
Feyzioglu and Taspinar, International Journal of Applied Mathematics Electronics and Computers 11(01): 037-043, 2023
This technique can improve classification accuracy by in the dataset. These kernel functions are used to represent
analyzing interactions between independent variables. the data in the dataset in higher dimensional space. SVM
Logistic regression is often used in areas such as statistical can use different kernel functions such as linear,
analysis, medical research, marketing and financial polynomial, RBF (radial basis function). SVM is used in
analysis. It also plays an important role in many machine many machine learning applications. For example, it can
learning applications [15]. be used to predict whether a patient has a disease or
2.3. Decision Tree (DT) whether a customer will buy a product. SVM is also
effective for high-dimensional datasets and can be used to
A decision tree is a machine learning algorithm used to solve classification and regression problems [20].
classify or regress data in a dataset. Decision trees help to
classify the dataset using tree structure. The tree structure 2.5. Random Forest (RF)
consists of many nodes and leaves that branch off from a The random forest algorithm is a machine learning
root node. The decision tree algorithm creates a decision method and is used to solve problems such as classification
tree for each sample in the dataset. The decision tree and regression analysis [21]. Random forest is an
fluctuates according to the values of the arguments and ensemble learning method by combining multiple decision
finally gives a result. The decision tree is used to classify trees. The random forest uses many decision trees to find
or regress with the tree structure [16]. The decision tree a solution to a classification or regression problem. Each
performs a test for each feature in the dataset to construct decision tree has a tree structure using properties and target
the tree structure. This test creates branches of the tree by variable. The random forest algorithm is a learning method
dividing the data according to the values of the properties. in which each decision tree is trained on a different subset
This process starts from a root node and continues until the of the dataset. These subsets are created by randomly
last leaves, performing a test on each branch. The last selecting samples from the original dataset. Each tree can
leaves contain the classified results. The decision tree produce different results as it is trained using random
algorithm analyzes the relationship between the features in samples. Random forest combines the results of these trees
the dataset [17]. These relationships can be considered an to produce a more accurate result. This makes the random
important attribute for each feature in the dataset. The forest have less variance than other classification and
decision tree algorithm uses a technique called feature regression methods. Since the random forest is an
selection to determine how important a feature is to it. The ensemble method formed by the combination of decision
decision tree is especially used in solving classification trees, it gives effective results especially in high-
and regression problems. For example, it can be used to dimensional datasets. It can also be used in many machine
predict whether a customer will buy a product or whether learning applications such as random forest, classification,
a patient has a disease. It is also an important algorithm and regression. The random forest algorithm has a wide
used in many machine learning applications [18]. range of applications. For example, it can be used to
2.4. Support vector machine (SVM) predict the probability of a patient contracting a disease, to
predict whether a customer will buy a product, or to
Support vector machines (SVM) is a machine learning classify data in a dataset [22].
algorithm used for data classification and regression
analysis. SVM is used to classify data in a dataset or to 2.6. Performance metrics and confusion matrix
perform regression analysis [19]. SVM classifies each Performance metrics are metrics used to measure the
instance in the dataset according to its class label for performance of an Artificial Intelligence (AI) model.
classification. SVM can be used to classify data in a dataset These metrics evaluate different characteristics of a model,
into two classes, but it can also be adapted for multi such as accuracy, precision, learning speed, and
classification. SVM creates a hyperplane for classification. generalization ability [23, 24].
A hyperplane is a plane that separates the class labels. Some common performance metrics are:
SVM optimizes this hyperplane to make the best Accuracy: The proportion of data points that a
separation in the dataset. This best separation means classification model predicts correctly. It is often used as
getting the best margin in the dataset. Margin is the the most basic performance metric.
distance between the hyperplane and the nearest data Precision: The rate at which data points predicted as
points. SVM tries to get the best margin to separate the positive are actually positive. Sensitivity is used to reduce
data in the dataset for classification. SVM specifically uses the effect of false positive predictions.
a technique known as the "kernel trick" to create the best Recall: Measures how many of the positive data points
hyperplane separating class labels. This technique were correctly predicted. The callback is used to reduce
provides better discrimination by representing the data in the impact of false negative predictions.
the dataset in a higher dimensional space. SVM can use F1 Score: It is the harmonic mean of sensitivity and
different kernel functions depending on the size of the data recall. This combines the model taking into account both
- 40 -
Feyzioglu and Taspinar, International Journal of Applied Mathematics Electronics and Computers 11(01): 037-043, 2023
precision and callback [25]. The formulas of the the performance of classification models can be
performance metrics used in the study are given in Table determined exactly and the usability of the models in real
1. life can be measured. In the study, a computer with Intel®
Table 1. Performance metrics equation for two class Core i7™ 12700K 3.61 GHz, NVIDIA GeForce RTX
3080Ti, 64GB RAM was used to run the algorithms.
Metrics Equation Python programming language and libraries were used to
create algorithms for classification models. Four different
𝑇𝑃 + 𝑇𝑁
Accuracy 𝑥100 classification models were used in the study. Training and
𝑇𝑃 + 𝑇𝑁 + 𝐹𝑃 + 𝐹𝑁
testing processes were carried out with LR, DT, SVM and
Precision
𝑇𝑃 RF machine learning methods. As a result of the
𝑇𝑃 + 𝐹𝑃 classifications, the confusion matrix obtained from the LR
𝑇𝑃 model is shown in Figure 2, the confusion matrix obtained
Recall from the DT model is shown in Figure 3, the confusion
𝑇𝑃 + 𝐹𝑁
matrix obtained from the SVM model is shown in Figure
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 ∗ 𝑅𝑒𝑐𝑎𝑙𝑙
F1 Score 2∗ 4 and the confusion matrix obtained from the RF model is
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 + 𝑅𝑒𝑐𝑎𝑙𝑙
shown in Figure 5.
A complexity matrix is a tool used to measure the
performance of an algorithm or system design. The matrix
contains different combinations of performance metrics
such as the algorithm's processing time or processor usage
[26]. Usually, the complexity matrix is in the form of a
two-dimensional table. Rows represent the complexity of
the input sizes and the columns represent the complexity
of the algorithm's processing time, memory usage, or other
metrics. Each cell of the matrix represents the complexity
of the algorithm for a given input size and a given
performance measure. The complexity matrix is a useful
tool for analyzing the performance of an algorithm, Figure 2. Confusion matrix of LR model
increasing its efficiency and understanding how it behaves
in different scenarios. It is particularly useful for
understanding how the performance of the algorithm
changes as the input size increases [27]. A confusion
matrix created for two classes and the parameters it
contains are given in Table 2.
Table 2. Confusion matris for two class
PREDICTED
ACTUAL
CLASS 1 CLASS 2
CLASS 1 TP FN
CLASS 2 FP TN
Figure 3. Confusion matrix of DT model
True Positive (TP); correctly classified positive
samples, True Negative (TN); correctly classified negative
samples, False Positive (FP); falsely classified positive
samples and False Negative (FN); refers to negative
samples that were incorrectly classified [28, 29].
3. Experimental Results
- 41 -
Feyzioglu and Taspinar, International Journal of Applied Mathematics Electronics and Computers 11(01): 037-043, 2023
- 42 -
Feyzioglu and Taspinar, International Journal of Applied Mathematics Electronics and Computers 11(01): 037-043, 2023
Effect of temperature on the stacking fault energy and [21] Butuner, R., I. Cinar, Y.S. Taspinar, R. Kursun, M.H. Calp, and
deformation behaviour in 316L austenitic stainless steel. M. Koklu, Classification of deep image features of lentil
Materials Science and Engineering: A, 2019. 759: p. 490-497. varieties with machine learning techniques. European Food
[3] Zhou, Z. and Z. Liu, Fault diagnosis of steel wire ropes based Research and Technology, 2023: p. 1-14.
on magnetic flux leakage imaging under strong shaking and [22] Koklu, M., S. Sarigil, and O. Ozbek, The use of machine
strand noises. IEEE Transactions on Industrial Electronics, learning methods in classification of pumpkin seeds (Cucurbita
2020. 68(3): p. 2543-2553. pepo L.). Genetic Resources and Crop Evolution, 2021. 68(7):
[4] Liu, Y.-j., S. Wang, J.-b. Qi, and X.-q. Yan, Vibrations of p. 2713-2726.
tandem cold rolling mill: coupled excitation of rolling force and [23] Dogan, M., Y.S. Taspinar, I. Cinar, R. Kursun, I.A. Ozkan, and
variable stiffness of fault-free back-up roll bearing. Journal of M. Koklu, Dry bean cultivars classification using deep cnn
Iron and Steel Research International, 2023: p. 1-11. features and salp swarm algorithm based extreme learning
[5] Wang, Y., J. Xia, Z. Wang, and H. Shen, Design of a fault- machine. Computers and Electronics in Agriculture, 2023. 204:
tolerant output-feedback controller for thickness control in cold p. 107575.
rolling mills. Applied Mathematics and Computation, 2020. [24] Singh, D., Y.S. Taspinar, R. Kursun, I. Cinar, M. Koklu, I.A.
369: p. 124841. Ozkan, and H.-N. Lee, Classification and analysis of pistachio
[6] ÖZAKIN, B., Sac Malzeme Üretiminde Hata Türleri ve species with pre-trained deep learning models. Electronics,
Etkileri Analizi. Avrupa Bilim ve Teknoloji Dergisi, 2021(28): 2022. 11(7): p. 981.
p. 1204-1209. [25] Taspinar, Y.S., M. Koklu, and M. Altin, Fire Detection in
[7] Başkaya, A., Soğuk haddeleme işleminin proses amaçlı Images Using Framework Based on Image Processing, Motion
eniyilenmesi. 2020, Sakarya Üniversitesi. Detection and Convolutional Neural Network. International
[8] Wang, J., P. Fu, and R.X. Gao, Machine vision intelligence for Journal of Intelligent Systems and Applications in Engineering,
product defect inspection based on deep learning and Hough 2021. 9(4): p. 171-177.
transform. Journal of Manufacturing Systems, 2019. 51: p. 52- [26] Taspinar, Y.S., M. Dogan, I. Cinar, R. Kursun, I.A. Ozkan, and
60. M. Koklu, Computer vision classification of dry beans
[9] Li, D., Q. Xie, X. Gong, Z. Yu, J. Xu, Y. Sun, and J. Wang, (Phaseolus vulgaris L.) based on deep transfer learning
Automatic defect detection of metro tunnel surfaces using a techniques. European Food Research and Technology, 2022.
vision-based inspection system. Advanced Engineering 248(11): p. 2707-2725.
Informatics, 2021. 47: p. 101206. [27] Yasar, A., Benchmarking analysis of CNN models for bread
[10] Zhang, X., J. Saniie, and A. Heifetz, Detection of defects in wheat varieties. European Food Research and Technology,
additively manufactured stainless steel 316L with compact 2022: p. 1-10.
infrared camera and machine learning algorithms. JOM, 2020. [28] Unal, Y., Y.S. Taspinar, I. Cinar, R. Kursun, and M. Koklu,
72(12): p. 4244-4253. Application of pre-trained deep convolutional neural networks
[11] Elanangai, V. and K. Vasanth. An Efficient Technique for for coffee beans species detection. Food Analytical Methods,
Identifying Defects in Stainless Steel (SS) Plate using Image 2022. 15(12): p. 3232-3243.
Processing. in 2022 8th International Conference on Advanced [29] Feyzioglu, A., Y.S. Taspinar, Beef Quality Classification with
Computing and Communication Systems (ICACCS). 2022. Reduced E-Nose Data Features According to Beef Cut Types.
IEEE. Sensors, 2023. 23(4): p. 2222.
[12] Vannocci, M., A. Ritacco, A. Castellano, F. Galli, M. Vannucci,
V. Iannino, and V. Colla. Flatness defect detection and
classification in hot rolled steel strips using convolutional
neural networks. in Advances in Computational Intelligence:
15th International Work-Conference on Artificial Neural
Networks, IWANN 2019, Gran Canaria, Spain, June 12-14,
2019, Proceedings, Part II 15. 2019. Springer.
[13] Faulty Steel Plates. [cited 2023 February, 15]; Available from:
https://www.kaggle.com/datasets/uciml/faulty-steel-plates.
[14] Erbaş, N., G. Çınarer, and K. Kılıç, Classification of hazelnuts
according to their quality using deep learning algorithms.
Czech Journal of Food Sciences, 2022. 40(3): p. 240-248.
[15] Koklu, M., R. Kursun, Y.S. Taspinar, and I. Cinar,
Classification of date fruits into genetic varieties using image
analysis. Mathematical Problems in Engineering, 2021. 2021:
p. 1-13.
[16] Koklu, M., H. Kahramanli, and N. Allahverdi, A new approach
to classification rule extraction problem by the real value
coding. International Journal of Innovative Computing,
Information and Control, 2012. 8(9): p. 6303-6315.
[17] Kahramanli, H. and N. Allahverdi, Extracting rules for
classification problems: AIS based approach. Expert Systems
with Applications, 2009. 36(7): p. 10494-10502.
[18] Taspinar, Y.S., M. Koklu, and M. Altin, Classification of flame
extinction based on acoustic oscillations using artificial
intelligence methods. Case Studies in Thermal Engineering,
2021. 28: p. 101561.
[19] Al-Doori, S.K.S., Y.S. Taspinar, and M. Koklu, Distracted
Driving Detection with Machine Learning Methods by CNN
Based Feature Extraction. International Journal of Applied
Mathematics Electronics and Computers, 2021. 9(4): p. 116-
121.
[20] Kishore, B., A. Yasar, Y.S. Taspinar, R. Kursun, I. Cinar, V.G.
Shankar, M. Koklu, and I. Ofori, Computer-aided multiclass
classification of corn from corn images integrating deep feature
extraction. Computational Intelligence and Neuroscience, 2022.
2022.
- 43 -