Automation Defect Detection System Report
Automation Defect Detection System Report
IA–B223–30
AUTOMATION DEFECT DETECTION SYSTEM
OCTOBER 2023
i
DECLARATION
I declare that this report is my original work and all references have been
cited adequately as required by the University.
ii
APPROVAL
We have supervised and examined this report and verify that it meets the
program and University’s requirements for the Bachelor of Engineering
Technology (Automation and Robotics) with Honours.
iii
ACKNOWLEDGEMENT
I'd like to take this occasion to thank my supervisor, Dr. Yusman bin Yusof, for
his patience, advice, comments, stimulating suggestions, and encouragement
during my research, drafting of this report, and assistance throughout my
project work. This endeavour would not have been possible without his moral
support and drive to see it through.
This endeavour, too, cannot be completed without the help of many people.
Thank you especially to my lecturer and others who assisted and advised me,
including the critical input for my planning and discoveries. Next, I'd like to
express my gratitude and appreciation to the University of Kuala Lumpur
Malaysia France Institute (UniKL MFI) for providing the facilities.
iv
CONTENTS
TITLE PAGE....................................................................................................i
DECLARATION ..............................................................................................ii
APPROVAL ...................................................................................................iii
ACKNOWLEDGEMENT ................................................................................iv
CONTENTS ....................................................................................................v
LIST OF TABLES .........................................................................................vii
LIST OF FIGURES ......................................................................................viii
LIST OF ABBREVIATION .............................................................................ix
ABSTRACT ....................................................................................................x
ABSTRAK .....................................................................................................xi
CHAPTER 1: INTRODUCTION ......................................................................1
1.1 Overview ............................................................................................1
1.2 Problem statement .............................................................................3
1.3 Objectives ..........................................................................................3
1.4 Scope of project .................................................................................3
1.5 Significant of project ...........................................................................4
1.6 Report organization ............................................................................5
CHAPTER 2: LITERATURE REVIEW............................................................6
2.1 Introduction ........................................................................................6
2.2 Type of Steel Defect ..........................................................................7
2.2.1 Crack .....................................................................................7
2.2.2 Wrinkle ...................................................................................7
2.2.3 Scratch...................................................................................8
2.4 Deep Learning ...................................................................................9
2.5 Firebase ...........................................................................................10
2.5.1 Firebase Authentication .......................................................11
2.5.2 The Real-time Database ......................................................12
2.5.3 Cloud Storage for Firebase ..................................................12
2.6 Node-Red.........................................................................................13
v
2.7 WhatsApp Twilio ..............................................................................14
CHAPTER 3: METHODOLOGY ...................................................................15
3.1 Introduction ......................................................................................15
3.2 Project Process Flow .......................................................................15
3.3 Project Management ........................................................................16
3.4 Summary..........................................................................................17
CHAPTER 4: RESULT AND DISCUSSION .................................................19
4.1 Introduction ......................................................................................19
4.2 Hardware Testing.............................................................................19
4.2.1 Result...................................................................................19
4.2.2 Discussion ...........................................................................19
4.3 Software Testing ..............................................................................19
4.3.1 Result...................................................................................19
4.3.2 Discussion ...........................................................................19
4.4 Functionality Testing ........................................................................19
4.4.1 Result...................................................................................19
4.4.2 Discussion ...........................................................................19
4.5 Chapter summary ............................................................................19
CHAPTER 5: CONCLUSION .......................................................................20
5.1 Introduction..............................................................................20
5.2 Limitation .................................................................................20
5.3 Future work .............................................................................20
5.4 Summary .................................................................................20
REFERENCES .............................................................................................21
APPENDIX A ................................................................................................23
Program code ............................................................................................23
APPENDIX B ................................................................................................24
Title ............................................................................................................24
APPENDIX C ................................................................................................25
Title ............................................................................................................25
vi
LIST OF TABLES
Page No
Table 1 Project milestones............................................................................16
Table 2 Gantt chart .......................................................................................17
vii
LIST OF FIGURES
Page No
Figure 1 Crack defect......................................................................................2
Figure 2 Stamping machine ............................................................................7
Figure 3 Typical surface of wrinkle .................................................................8
Figure 4 Scratch on steel surface ...................................................................9
Figure 5 Firebase console ............................................................................10
Figure 6 Firebase authentication diagram.....................................................11
Figure 7 Firebase Real-Time database.........................................................12
Figure 8 Cloud storage for firebase ..............................................................13
Figure 9 Node-Red .......................................................................................14
Figure 10 WhatsApp twilio ............................................................................14
Figure 11 Project process flow ......................................................................15
viii
LIST OF ABBREVIATION
ix
ABSTRACT
In steel production and quality control, prompt detection of cracks and defects
is imperative. Variations in manufacturing processes and the structural
integrity of steel products emphasize the need for swift issue identification.
Defects like surface cracks, inclusions, and delamination can imperil product
quality and safety, potentially risking entire structures and incurring substantial
financial losses. Conventional defect detection methods, reliant on labour-
intensive manual inspection, are error-prone and demand extensive expertise
for precise defect identification. Hence, the adoption of autonomous systems
for automated detection of steel defects is indispensable. In this project, an
advanced deep learning model, employing Convolutional Neural Networks
(CNNs), was developed for detecting steel defects and cracks. The model was
trained on a dataset comprising images of defect-free steel from online
sources. The model's performance is pivotal in significantly reducing
inspection time, enhancing defect detection accuracy, and elevating overall
quality control in steel manufacturing. After the model was trained there will be
a system that give alert message through WhatsApp apps and defect image,
time and which station will be display on the dashboard in node-red.
Implementing this model in actual steel manufacturing facilities can notably
reduce the time and effort required for defect and crack identification, leading
to cost savings and heightened product quality. Furthermore, it ensures that
steel structures and products conform to the highest safety and performance
standards, promising a bright future for the application of deep learning in the
steel industry.
x
ABSTRAK
Dalam pengeluaran keluli dan kawalan kualiti, pengesanan segera retak dan
cacat adalah penting. Perbezaan dalam proses pengeluaran dan integriti
struktur produk keluli menekankan keperluan untuk pengenalan masalah yang
cepat. Kesilapan seperti retakan permukaan, penyimpangan, dan delaminasi
boleh merosakkan kualiti produk dan keselamatan, berpotensi
membahayakan struktur keseluruhan dan menyebabkan kerugian kewangan
yang besar. Kaedah pengesanan cacat konvensional, bergantung kepada
pemeriksaan manual yang berat kerja, terdedah kepada kesilapan dan
memerlukan kepakaran yang luas untuk pengenalan cacat yang tepat. Oleh
itu, pengambilan sistem autonomi untuk pengesanan automatik cacat keluli
adalah perlu. Dalam projek ini, model pembelajaran mendalam lanjutan, yang
menggunakan Rangkaian Neural Convolutional (CNNs), telah dibangunkan
untuk mengesan cacat dan retak keluli. Model ini dilatih pada set data yang
terdiri daripada imej keluli bebas cacat dari sumber dalam talian. Teknik
augmentation telah digunakan untuk meningkatkan kepelbagaian dan saiz
dataset. Prestasi model ini adalah penting dalam mengurangkan masa
pemeriksaan secara ketara, meningkatkan ketepatan pengesanan cacat, dan
meningkatkan kawalan kualiti keseluruhan dalam pengeluaran keluli. Selepas
model dilatih akan ada sistem yang akan memberikan mesej amaran melalui
aplikasi WhatsApp dan imej yang rosak, masa dan stesen yang akan
dipaparkan pada papan panduan dalam node-red. Implementasi model ini
dalam kemudahan pengeluaran keluli sebenar boleh mengurangkan masa
dan usaha yang diperlukan untuk pengesanan cacat dan retak, yang
membawa kepada penjimatan kos dan kualiti produk yang lebih tinggi. Selain
itu, ia memastikan bahawa struktur keluli dan produk mematuhi piawaian
keselamatan dan prestasi tertinggi, menjanjikan masa depan yang cerah untuk
aplikasi pembelajaran mendalam dalam industri keluli.
xi
CHAPTER 1: INTRODUCTION
1.1 Overview
In this project the student has considered the major types of defects
which is crack. In the context of the student's project, the focus has been on
examining the major type of defect, which is "crack". Cracks are a critical
concern in various fields, including materials science, engineering, and
construction. Understanding cracks and their implications is essential for
ensuring the reliability and safety of structures and materials. Cracks can
manifest for a multitude of reasons, often due to factors like stress,
temperature fluctuations, environmental conditions, or material defects.
Identifying the root cause of a crack is fundamental in determining the
appropriate course of action. Furthermore, it's essential to classify the type of
crack accurately, as surface cracks, subsurface cracks, and internal cracks
may require distinct approaches for detection and mitigation.
1
The impacts of cracks cannot be underestimated. In many situations,
cracks can lead to a decrease in structural integrity, compromised safety, and
even catastrophic failures. Managing and addressing cracks in a timely and
effective manner is imperative. Research and innovation in materials science
and engineering continue to advance our understanding of crack formation and
management. This involves exploring materials with enhanced crack
resistance and developing innovative repair methods to ensure the longevity
and safety of structures and materials. In summary, cracks are a significant
concern in various industries, and their proper understanding, detection, and
management are essential for maintaining the integrity and safety of structures
and materials. The student's project on this topic represents a valuable
contribution to this field of study. Figure 1.1 shows the crack defect of product.
There are two types of detectives which are crack and non-crack for
steel, but nowadays there are limitations to diagnosis the disease which
requires time and expertise. Thus, having a model with artificial intelligence
(AI) algorithm to help operator identify the defect of steel will be able to reduce
related defects. Using deep learning is one of the AI algorithms that is used to
identify cracks of steel. In this case, it required a trained model to developed
deep learning using AI algorithms.
2
1.2 Problem statement
The existing method for defect detection is simply by using naked eye
observation on expert through which identification and detection of defect is
done. The common defect of the product is crack. With current focus on
increasing product of steel in Malaysia, there is need for operator to make
themselves with more knowledge on how to detect the defect. The limitation
so far has shown to diagnosis the defect which is requires time and expertise.
1.3 Objectives
The aim of this project is to develop a CNN model for automation defect
detection system using deep learning. To fulfill this aim, several objectives
need to be achieved. The objectives are:
The project scope of the “Automation Defect Detection System” was set up in
line with the aim of this project. This project is to detect a defect of steel which
is crack. By using deep learning and CNN architecture to develop a model with
high accuracy for defect crack detection. Thus, for this project required
hardware and software tools. The hardware used in this project is my own
machine, which is a laptop. The machine is used to store data, to code a model
and train the model. The model will be trained using Acer Swift 3 with AMD
3
Ryzen 5 3500U central processing unit (CPU). The memory of PC is 8GB
DDR4-2666 MHz and the graphic processing unit (GPU) uses by the PC is
Radeon Vega Mobile Gfx 2.10 GHz.
Another software utilized is Visual Studio Code. The Visual Studio Code
is also free and open-source software. Its clear user interface is a bonus, and
the editor's nicely sectioned layout makes coding and troubleshooting much
easier. Thus, it is a perfect integrated development environment for Python.
The significant for this project is to successfully build a system for defect
detection with data security and privacy, ADDS frequently entail the usage of
sensitive data, it is vital to ensure the security and privacy of this information.
Compliance with applicable data protection standards, as well as the use of
secure data storage and communication techniques, are required.
4
1.6 Report organization
This report is made up of five main chapters to show the progress of this report.
Chapter 1 of this report is used to describe the application system of defect
detection. This chapter helps the readers to get an overview of the project after
reading the title.
5
CHAPTER 2: LITERATURE REVIEW
2.1 Introduction
This chapter will explain approximately the research and literature of preceding
project regarding crack detection using deep learning. Research from articles,
journals, books, and the internet has been overviewed and becoming a
reference to this project.
6
2.2 Type of Steel Defect
Defects have serious negative effects on the production industry, and the
correct diagnosis of defects is the key to avoiding these effects. However, the
existing disease diagnosis methods for defect detection are not accurate,
consumes time and expertise.
2.2.1 Crack
For stamped parts to have early crack detection, strict quality control
and inspection are essential. The stamping procedure involves inserting a
flat sheet of metal into a stamping press machine where a die surface
modifies the shape of the metal in stamping machine refer to Figure 2 [3].
2.2.2 Wrinkle
2.2.3 Scratch
Scratch during the stamping process most likely refers to undesired surface
scratches or imperfections that might arise during the metal stamping
process. Metal stamping is a manufacturing process that involves shaping
and cutting metal sheets with the help of a press, die, and punch [1].
Scratches on the surface of stamped metal are undesirable because they
can degrade the part's quality and appearance. Process control, tool
maintenance, and material handling are all critical in reducing such faults
during the stamping process. Scratches on the surface of stamping parts
detract from the car's appearance and quality. Intense scratches will cause
rust, oxidation, and corrosion on the car's surface, reducing the vehicle's
service life [1]. Refer to Figure 4 that scratches on steel surface.
8
Figure 4 Scratch on steel surface
Deep learning is just very big neural networks on a lot more data, the most
popular technique are Multilayer Perceptron Networks, Convolutional Neural
Networks and Long Short-Term Memory Recurrent Neural Networks. The
concept of Deep Learning (DL) originated in a 2006 article published in
Science by Hinton et al [4]. The basic idea of Deep Learning is a data analysis
and feature learning are performed using a neural network, where data
features are extracted through multiple hidden layers. Each hidden layer can
be considered as a perceptron, the perceptron is used to extract low-level
features and then combines the low-level features to obtain abstract high-level
features. Deep Learning overcomes the disadvantage of conventional
algorithms relying on artificially generated features and has attracted the
attention of an increasing number of researchers. It is now successfully applied
9
in computer vision, pattern recognition, speech recognition, natural language
processing, and recommender systems [5].
2.5 Firebase
Google officially announced Firebase in the summer of 2016 with the goals of
earning cash for developers, producing a successful application, and
promoting business growth. Firebase is an API update or upgrade that enables
additional functions like messaging and service authentication. As a result, the
cost and time required to construct these services are reduced. Firebase offers
new technology to help businesses advance through linking or
recommendations. The system is then linked by analysing the platform and is
simple to integrate into the application.
10
2.5.1 Firebase Authentication
The Firebase Authentication SDK takes longer to install than the old
one. It also enables verification for the authentication process over full
control of the perspective. Eventually, this option keeps a full version of
authentication with numerous stages to identify the user's account. It is
used to do a variety of functions like signing in and out, logging in
automatically, and updating the new user's info in the app [8].
Furthermore, the Firebase Authentication SDK federates identity
provider integration and anonymous authentication. The Firebase
Authentication SDK is primarily used to approach Firebase Auth. There
are various measures that need be taken: Configure the Sign-in
method, create UI flows for your sign-in methods, and transmit the
user's credentials to the Firebase Authentication SDK [9].
11
2.5.2 The Real-time Database
Videos, photos, and documents are kept online with Firebase Cloud
Storage, which is backed up with Google Cloud Storage. To construct
and manage an infrastructure for dealing with huge files, a simple API
is used. As a result, papers are shared with specific people via the
12
Realtime Database Law. Because it relates to Firebase Authentication,
this storage is cached. It is simple to upload and distribute files on
mobile devices that support both Google Cloud and Firebase using
Firebase SDKs [8].
2.6 Node-Red
13
Figure 9 Node-Red
14
CHAPTER 3: METHODOLOGY
3.1 Introduction
Based on the report, the model that will be developed in the python is to detect
a defect from an existing dataset defect which is crack and non-defect. The
model will be used to detect the crack and non-crack on steel surfaces. After
the model detects the defect, the image will be displayed in dashboard in node-
red and there will be an alert message sent via WhatsApp. The image will be
stored in firebase storage.
The project is divided into two parts which are obtaining and preparing the
validation of the dataset and the develop a system that is for defect detection
which is include alert message, information display on node-red dashboard
and keep the image in firebase storage. We will take an existing dataset of
crack and use it in this project to investigate if it should be done faithfully to the
previous project.
15
3.3 Project Management
The project is carried out for two semesters which is around one year. The
project does not involve any financial proceedings. Table 1 shows the project
milestones for the one semester.
Table 2 shows the Gantt chart for the project. The project will be carried out
from October 2023 to February 2024. The project is planned to be conducted
within 3 months 1 week.
16
Table 2 Gantt chart
Month
Activity Start Date End Date
10 11 12 1 2
Develop WhatsApp
20/11/2023 26/11/2023
Twilio.
Create Node-red
dashboard and try 27/11/2023 24/12/2023
the to get data.
3.4 Summary
17
and to develop a system for storage, alert message, and node-red dashboard
to display the information of the defect images.
18
CHAPTER 4: RESULT AND DISCUSSION
4.1 Introduction
4.2.1 Result
4.2.2 Discussion
4.3.1 Result
4.3.2 Discussion
4.4.1 Result
4.4.2 Discussion
19
CHAPTER 5: CONCLUSION
5.1 Introduction
5.2 Limitation
5.4 Summary
20
REFERENCES
[1] H. I. Lin and F. S. Wibowo, “Image Data Assessment Approach for Deep Learning-
Based Metal Surface Defect-Detection Systems,” IEEE Access, vol. 9, pp. 47621–
47638, 2021, doi: 10.1109/ACCESS.2021.3068256.
[2] J. Yang, S. Li, Z. Wang, H. Dong, J. Wang, and S. Tang, “Using deep learning to detect
defects in manufacturing: A comprehensive survey and current challenges,”
Materials, vol. 13, no. 24. MDPI AG, pp. 1–23, Dec. 02, 2020. doi:
10.3390/ma13245755.
[5] J. Liu, L. Xu, X. Cao, K. Zhang, Q. Zhang, and Y. Cai, “Review on the Architectures and
Applications of Deep Learning in Agriculture,” in Proceedings - 2020 7th
International Conference on Information Science and Control Engineering, ICISCE
2020, Institute of Electrical and Electronics Engineers Inc., Dec. 2020, pp. 1234–
1240. doi: 10.1109/ICISCE50968.2020.00250.
[7] B. Chandra and R. K. Sharma, “On improving recurrent neural network for image
classification,” in Proceedings of the International Joint Conference on Neural
Networks, Institute of Electrical and Electronics Engineers Inc., Jun. 2017, pp. 1904–
1907. doi: 10.1109/IJCNN.2017.7966083.
[8] “firebase”.
21
Instrument Engineering (APEIE), IEEE, Nov. 2023, pp. 1690–1694. doi:
10.1109/APEIE59731.2023.10347828.
[10] IEEE Education Society, IEEE Industrial Electronics Society, European Association for
Education in Electrical and Information Engineering, and Institute of Electrical and
Electronics Engineers, ITHET 2017 : 2017 16th International Conference on
Information Technology Based Higher Education and Training (ITHET) : June 10-12,
2017, Ohrid, Macedonia.
[11] H. Kim et al., “Petification: Node-RED Based Pet Care IoT Solution Using MQTT
Broker,” in International Conference on ICT Convergence, IEEE Computer Society,
2022, pp. 25–29. doi: 10.1109/ICTC55196.2022.9952423.
[12] R. Munadi, “LPG Gas Leakage System with Instant Messaging Whatsapp
Communication Media Based on Internet of Things,” 2020.
22
APPENDIX A
Program code
Anything…
23
APPENDIX B
Title
Anything…
24
APPENDIX C
Title
Anything…
25