<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Comparison of image processing techniques for defect detection</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Semen Kovalskyi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vasyl. Koval</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>The First International Workshop of Young Scientists on Artificial Intelligence for Sustainable Development</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>West Ukrainian National University</institution>
          ,
          <addr-line>11 Lvivska Str., Ternopil, 46009</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Defect detection is a crucial quality control process in the manufacturing industry, aimed at identifying and classifying imperfections or anomalies in products before they reach customers. Traditional manual inspection methods are time-consuming, labor-intensive, and prone to human error. This paper provides a comprehensive overview of image-based defect detection algorithms, including traditional image processing techniques, machine learning algorithms, and deep learning models. The study analyzes the strengths, limitations, and performance of each approach across various applications and datasets. The results demonstrate that while traditional methods and machine learning algorithms offer reliable defect detection, deep learning models, particularly convolutional neural networks (CNNs), achieve exceptional accuracy and robustness. However, deep learning models require significant computational resources and large amounts of labeled data for training. The paper highlights the importance of selecting the most appropriate approach based on specific application requirements, data characteristics, and computational constraints. Furthermore, it discusses future research opportunities, such as developing more robust and generalized algorithms, leveraging multi-modal data, improving model interpretability, and enabling real-time and edge computing solutions.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Image-based defect detection algorithm</kwd>
        <kwd>machine learning</kwd>
        <kwd>image analysis</kwd>
        <kwd>image processing</kwd>
        <kwd>artificial intelligence</kwd>
        <kwd>computer vision</kwd>
        <kwd>automated defect detection</kwd>
        <kwd>classification algorithms</kwd>
        <kwd>1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Defect detection is a crucial quality control process in the manufacturing industry that aims to
identify and classify imperfections or anomalies in products before they reach the customer.
Failure to detect defects can have severe consequences, including financial losses, customer
dissatisfaction, product recalls, and potential safety hazards.</p>
      <p>In many industries, such as automotive, aerospace, electronics, and consumer goods, products
undergo rigorous inspection at various stages of the production process. Traditional manual
inspection methods involve human inspectors visually examining each product for defects, which
can be time-consuming, labor-intensive, and prone to human error due to factors like fatigue,
distraction, or subjective judgment.</p>
      <p>Furthermore, as manufacturing processes become increasingly complex and product quality
standards continue to rise, manual inspection becomes increasingly challenging and inefficient.
Some defects may be difficult to detect with the naked eye, especially those related to microscopic
features, surface textures, or subtle variations in color or shape.</p>
      <p>The need for automated and reliable defect detection methods has led to the development of
image-based approaches that leverage computer vision and machine learning techniques. By
capturing high-resolution images of products and analyzing them using advanced algorithms,
defects can be identified with greater accuracy, consistency, and speed compared to manual
inspection.
0009-0004-3848-2196 (S.Kovalskyi); 0000-0003-4726-097X (V.Koval)
© 2024 Copyright for this paper by its authors.</p>
      <p>Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>CEUR Workshop Proceedings (CEUR-WS.org)</p>
      <p>Image-based defect detection offers several advantages over traditional methods:
 Increased accuracy and consistency: Advanced algorithms can detect even the most
subtle defects consistently, reducing the risk of human error and subjectivity.
 Faster inspection times: Automated systems can process and analyze images significantly
faster than manual inspection, enabling higher throughput and reducing production
bottlenecks.
 Improved traceability and documentation: Digital images and defect detection records
can be stored and analyzed for quality control purposes, enabling better traceability and root
cause analysis.
 Cost savings: Automated inspection systems can reduce labor costs associated with
manual inspection and minimize product losses due to undetected defects.
 Adaptability: Machine learning algorithms can be trained to detect new types of defects
as production processes evolve, offering greater flexibility and scalability.</p>
      <p>
        However, implementing effective image-based defect detection systems presents several
challenges, including the need for high-quality image data, robust and accurate algorithms,
computational resources, and seamless integration with existing manufacturing processes[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>To address these challenges, researchers and engineers have developed various approaches
ranging from traditional image processing techniques to advanced machine learning and deep
learning methods. Selecting the most appropriate approach depends on factors such as the type
of defects, product characteristics, available data, computational resources, and specific industry
requirements.</p>
      <p>In summary, image-based defect detection is a critical component of modern manufacturing
processes, enabling companies to maintain high quality standards, reduce costs, and improve
customer satisfaction. As technology continues to evolve, the development and deployment of
advanced defect detection algorithms will become increasingly important for maintaining a
competitive edge in the manufacturing industry.</p>
      <sec id="sec-1-1">
        <title>1.1. Problem Statement</title>
        <p>In the manufacturing industry, ensuring product quality and identifying defects is a critical
task. Manual inspection processes are often inefficient, subjective, and prone to human error,
leading to potential quality issues and financial losses. The need for automated and reliable defect
detection methods has become increasingly important as manufacturing processes become more
complex and product quality standards continue to rise.</p>
        <p>Image-based defect detection algorithms aim to address this challenge by leveraging computer
vision and machine learning techniques to analyze high-resolution images of products and
identify defects with greater accuracy, consistency, and speed compared to manual inspection.
However, developing effective image-based defect detection systems presents several challenges,
including:
1. Obtaining high-quality image data representative of various defect types and product
variations.
2. Developing robust and accurate algorithms capable of detecting and classifying defects in
different scenarios.
3. Handling varying environmental conditions, such as lighting variations, occlusions, and
background clutter.
4. Adapting to evolving product designs and manufacturing processes, which may introduce
new defect types or patterns.
5. Ensuring real-time performance and seamless integration with existing manufacturing
systems and workflows.
6. Addressing computational resource constraints, especially for resource-intensive deep
learning models.
7. Maintaining data privacy and security, particularly in sensitive industries or applications.</p>
        <p>Overcoming these challenges requires a multidisciplinary approach that combines expertise
in computer vision, machine learning, signal processing, and domain-specific knowledge of
manufacturing processes and product characteristics. Effective image-based defect detection
systems must strike a balance between accuracy, robustness, computational efficiency, and ease
of deployment, while remaining adaptable to changing requirements and technological
advancements.</p>
        <p>Furthermore, the successful adoption of these systems in industrial settings hinges on factors
such as cost-effectiveness, user-friendliness, and seamless integration with existing
infrastructure. Addressing these considerations is crucial for enabling widespread adoption and
realizing the full potential of image-based defect detection in enhancing product quality, reducing
waste, and improving overall manufacturing efficiency.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Analysis of Existing Solution</title>
      <p>This research paper aims to provide a comprehensive overview of image-based defect
detection algorithms, their underlying principles, and their applications in various industries. We
will explore the different approaches, including traditional image processing techniques, machine
learning algorithms, and deep learning models. Additionally, we will discuss the challenges and
limitations associated with these algorithms and potential future directions for research and
development.</p>
      <sec id="sec-2-1">
        <title>2.1. Related Work</title>
        <p>Defect detection is a well-researched area in computer vision and image processing, with
numerous studies exploring various techniques and algorithms. Traditional image processing
methods, such as edge detection, thresholding, and morphological operations, have been widely
applied for defect detection tasks [15, 16, 17]. These methods rely on low-level image features
and are computationally efficient, but may struggle with complex or varying defect patterns.</p>
        <p>Machine learning algorithms, including supervised and unsupervised approaches, have gained
popularity for defect detection tasks due to their ability to learn from data and adapt to varying
conditions. Supervised methods, such as support vector machines (SVMs) [18], random forests
[19], and boosting algorithms [20], have shown promising results in various applications.
Unsupervised methods, such as clustering algorithms [21] and autoencoders [22], have also been
explored for detecting anomalies or defects without the need for labeled training data.</p>
        <p>In recent years, deep learning techniques, particularly convolutional neural networks (CNNs),
have achieved state-of-the-art performance in image-based defect detection tasks [23, 24, 25].
These models can automatically learn discriminative features from raw image data, enabling
them to detect and classify complex defect patterns with high accuracy. Transfer learning and
domain adaptation techniques have further enhanced the applicability of deep learning models
by leveraging pre-trained models from related domains [26, 27].</p>
        <p>While existing research has made significant progress, the development of more robust and
efficient defect detection algorithms remains an active area of research, driven by the increasing
complexity of manufacturing processes and the need for higher quality standards.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Traditional Image Processing Technique</title>
        <p>Traditional image processing techniques have been widely used for defect detection in various
applications. These techniques rely on low-level image features, such as edges, textures, and
intensity values, to identify and classify defects. Some common approaches include:</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>2.2.1. Edge Detection</title>
      <p>
        Edge detection algorithms are used to identify the boundaries or edges of objects in an image.
These algorithms can be applied to detect defects that manifest as cracks, scratches, or deviations
from the expected shape or pattern [
        <xref ref-type="bibr" rid="ref2">2, 28</xref>
        ]. Various edge detection techniques, such as the Sobel
operator, Canny edge detector, and Laplacian of Gaussian (LoG), can be employed for this
purpose.
      </p>
      <sec id="sec-3-1">
        <title>2.2.2. Thresholding</title>
        <p>Thresholding is a simple yet effective technique for separating objects of interest from the
background based on their intensity values. Binary thresholding converts an image into a binary
representation, where pixels above a certain intensity value are considered part of the object, and
pixels below that value are considered background. Adaptive thresholding techniques, such as
Otsu's method or Niblack's method, can be used to handle varying illumination conditions or
background variations.</p>
      </sec>
      <sec id="sec-3-2">
        <title>2.2.3. Texture Analysis</title>
        <p>
          Texture analysis techniques analyze the spatial distribution and patterns of pixel intensities
within an image. These techniques can be particularly useful for detecting defects that exhibit
textural irregularities, such as surface imperfections, scratches, or stains[
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. Common texture
analysis methods include statistical approaches (e.g., gray-level co-occurrence matrices),
structural approaches (e.g., morphological operations), and transform-based approaches (e.g.,
Gabor filters).
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>2.2.4. Morphological Operations</title>
        <p>
          Morphological operations are image processing techniques that analyze the shape and
structure of objects within an image. These operations can be used for various tasks, such as noise
removal, edge detection, and object segmentation. Common morphological operations include
erosion, dilation, opening, and closing, which can be applied to detect and analyze defects based
on their shape and size characteristics. [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]
        </p>
        <p>Advantages of Traditional Image Processing Techniques:
 Well-established and widely understood methods.
 Computationally efficient and suitable for real-time applications.
 Can be effective in specific scenarios or for certain types of defects.
 Limitations of Traditional Image Processing Techniques:
 Require manual feature engineering and parameter tuning.
 May struggle with complex or varying defect patterns.
 Sensitive to environmental conditions, such as lighting variations and occlusions.</p>
      </sec>
      <sec id="sec-3-4">
        <title>2.3. Machine Learning Algorithms for Defect Detection</title>
        <p>Machine learning algorithms have become increasingly popular for image-based defect
detection due to their ability to learn from data and adapt to varying conditions. These algorithms
can be broadly categorized into supervised and unsupervised learning approaches.</p>
      </sec>
      <sec id="sec-3-5">
        <title>2.3.1. Supervised Learning Algorithms</title>
        <p>
          Supervised learning algorithms rely on labeled training data, where images are annotated with
the presence or absence of defects, as well as the type and location of the defects. These
algorithms learn to map input images to the corresponding labels or defect classifications. Some
commonly used supervised learning algorithms for defect detection include: [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]
        </p>
      </sec>
      <sec id="sec-3-6">
        <title>2.3.2. Support Vector Machines (SVMs)</title>
        <p>SVMs are widely used for binary classification tasks, such as defect/non-defect classification.
They construct a hyperplane in a high-dimensional feature space to maximize the margin
between the two classes. SVMs can be extended to handle multi-class classification problems,
making them suitable for detecting and classifying different types of defects.</p>
      </sec>
      <sec id="sec-3-7">
        <title>2.3.3. Random Forests</title>
        <p>Random Forests are ensemble learning methods that combine multiple decision trees to
improve accuracy and robustness. Each tree is trained on a random subset of the data and
features, which helps to reduce overfitting and increase generalization performance. Random
Forests can handle high-dimensional data and are robust to noise and outliers, making them
suitable for defect detection tasks.</p>
      </sec>
      <sec id="sec-3-8">
        <title>2.3.4. Boosting Algorithms</title>
        <p>Boosting algorithms, such as AdaBoost or Gradient Boosting, iteratively combine weak
learners (e.g., decision trees) to create a strong ensemble classifier. These algorithms can
effectively handle complex and non-linear decision boundaries, making them useful for detecting
and classifying various types of defects.</p>
      </sec>
      <sec id="sec-3-9">
        <title>2.3.5. Unsupervised Learning Algorithms</title>
        <p>Unsupervised learning algorithms do not require labeled training data. Instead, they aim to
discover patterns or anomalies in the data without prior knowledge of the defect types or
locations. These algorithms can be particularly useful in scenarios where labeling data is
timeconsuming or impractical. Some common unsupervised learning algorithms for defect detection
include:</p>
        <p>Clustering algorithms, such as K-Means or Gaussian Mixture Models (GMMs), group similar
data points together based on their features or characteristics. In the context of defect detection,
clustering can be used to identify anomalous regions or patterns within an image that may
correspond to defects.</p>
        <p>Autoencoders are a type of neural network that learns to encode input data into a compressed
representation and then reconstruct the original data from the encoded representation. The
reconstruction error can be used as an indicator of anomalies or defects, where higher errors may
correspond to defective regions in the image.</p>
        <p>OC-SVMs are a variant of traditional SVMs that can be used for novelty or outlier detection.
They learn to define a boundary that encompasses the majority of the training data, which is
assumed to be defect-free. Any new data points that fall outside this boundary are considered
anomalies or defects.</p>
        <p>Advantages of Machine Learning Algorithms:
 Can handle complex and non-linear relationships between features and defects.
 Capable of learning from large amounts of data and adapting to varying conditions.
 Can be extended to detect and classify multiple types of defects.
 Limitations of Machine Learning Algorithms:
 Require a sufficient amount of labeled or representative data for training.
 Performance can be affected by data quality, imbalanced classes, or noisy labels.
 May struggle with detecting rare or unseen defect types.</p>
      </sec>
      <sec id="sec-3-10">
        <title>2.4. Deep Learning for Defect Detection</title>
        <p>Deep learning, a subfield of machine learning, has gained significant attention in recent years
for its ability to automatically learn discriminative features from raw data, such as images or
videos. Convolutional Neural Networks (CNNs) and other deep learning architectures have
shown remarkable performance in various computer vision tasks, including image-based defect
detection.</p>
      </sec>
      <sec id="sec-3-11">
        <title>2.4.1. Convolutional Neural Networks (CNNs)</title>
        <p>CNNs are a type of deep neural network specifically designed for processing grid-like data,
such as images or videos. They consist of multiple layers of convolutional filters and pooling
operations that progressively extract higher-level features from the input data. CNNs have been
widely used for defect detection tasks, as they can learn to recognize complex patterns and
features associated with various types of defects.</p>
      </sec>
      <sec id="sec-3-12">
        <title>2.4.2. Supervised CNNs</title>
        <p>Supervised CNNs are trained on labeled data, where images are annotated with the presence
or absence of defects, as well as the type and location of the defects. These models can be trained
for binary classification (defect/non-defect) or multi-class classification (different defect types).</p>
      </sec>
      <sec id="sec-3-13">
        <title>2.4.3. Unsupervised and Semi-Supervised CNNs</title>
        <p>
          In scenarios where labeled data is scarce or unavailable, unsupervised and semi-supervised
CNNs can be employed. Unsupervised CNNs, such as autoencoders or generative adversarial
networks (GANs), can learn to reconstruct defect-free images and detect anomalies based on the
reconstruction error. Semi-supervised CNNs combine a small amount of labeled data with a larger
amount of unlabeled data to improve performance. [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]
        </p>
      </sec>
      <sec id="sec-3-14">
        <title>2.4.4. Object Detection and Segmentation Networks</title>
        <p>In addition to classification tasks, deep learning models can be used for object detection and
segmentation, which are crucial for locating and delineating defects within an image. Object
detection networks, such as Faster R-CNN or YOLO, can detect and localize defects by generating
bounding boxes around them. Semantic segmentation networks, like U-Net or Mask R-CNN, can
produce pixel-level masks or segmentations of the defects, providing finer-grained localization
and delineation.</p>
      </sec>
      <sec id="sec-3-15">
        <title>2.4.5. Transfer Learning and Domain Adaptation</title>
        <p>One of the challenges in applying deep learning for defect detection is the need for large
amounts of labeled data, which can be time-consuming and costly to obtain. Transfer learning
and domain adaptation techniques can mitigate this issue by leveraging pre-trained models on
related tasks or domains. For example, a CNN pre-trained on a large-scale image classification
dataset, such as ImageNet, can be fine-tuned on a smaller defect detection dataset, significantly
reducing the required training data and time.</p>
        <p>Advantages of Deep Learning:
 Can automatically learn discriminative features from raw data.
 Capable of handling complex and non-linear relationships between features and defects.
 Can be applied to various defect detection tasks, including classification, object detection,
and segmentation.
 Benefit from transfer learning and domain adaptation techniques.
 Limitations of Deep Learning:
 Require large amounts of labeled data for supervised training, which can be costly and
time-consuming.
 Computationally expensive and may require specialized hardware (e.g., GPUs) for
training and inference.
 Can be sensitive to data quality, imbalanced classes, and domain shifts.</p>
        <p> Lack of interpretability and transparency in decision-making process.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. Results Analysis</title>
      <p>The performance comparison of different defect detection methods was conducted on various
publicly available datasets, as well as proprietary datasets. The datasets covered a wide range of
applications, including wood, ceramic tiles, metal products, printed circuit boards, and solar
panels.</p>
      <p>For traditional image processing techniques, the algorithms were implemented using
wellestablished libraries, such as OpenCV and scikit-image, with careful parameter tuning for each
application. Machine learning algorithms were trained and evaluated using popular libraries like
scikit-learn and XGBoost, with appropriate data preprocessing, feature engineering, and
crossvalidation techniques.</p>
      <p>Deep learning models were implemented using popular deep learning frameworks, such as
TensorFlow and PyTorch. The models were trained on high-performance computing clusters or
cloud-based GPU resources to accelerate the training process. Standard practices for deep
learning, including data augmentation, transfer learning, and hyperparameter tuning, were
employed to optimize the model performance.</p>
      <p>The evaluation metrics, such as accuracy, precision, recall, F1-score, and AUC, were calculated
using established evaluation protocols and libraries, ensuring a fair and consistent comparison
across different methods and applications. Here are some examples:</p>
      <sec id="sec-4-1">
        <title>3.1. Traditional Image Processing Techniques</title>
        <p>
          In study [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], various image processing methods were used to detect defects in wood images.
The best results were shown by a method based on morphological operations with an accuracy
of 88.2% and a completeness of 79.4%. However, the accuracy of this approach was low, at only
62.8%. Edge detection using the Canny method achieved a higher accuracy of 84.7%, but the
precision dropped to 73.9%.
        </p>
        <p>
          Morphological operations like erosion/dilation were evaluated in [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] for detecting defects on
ceramic tiles. The best F1-score of 0.74 was obtained, but recall remained limited at 0.68.
        </p>
        <p>
          In another study [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ], the Otsu thresholding method and texture analysis using grey level
cooccurrence matrices (GLCMs) were used for the inspection of ceramic tiles. The Otsu method
showed the highest accuracy of 91.3%, but the F1 value was only 0.72. The GLCM-based approach
achieved a better balance with 88.5% accuracy and F1 of 0.83.
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>3.2. Machine Learning Algorithms:</title>
        <p>In a study [10], various machine learning algorithms were tested to detect defects in images
of metal products. Random Forest demonstrated the best performance with 94.2% accuracy,
92.6% completeness, and AUC of 0.974. SVM showed close results with 93.8% accuracy and AUC
of 0.962, but its completeness was lower at 88.7%. Boosting algorithms, such as XGBoost, also
performed well with an accuracy of 92.5% and an AUC of 0.951.</p>
        <p>Another study [11] compared clustering, SVM, and random forests for detecting defects in
solar panel images. K-means clustering had a low accuracy of 68%. SVMs showed moderate
results with an accuracy of 82% and F1 of 0.79. Random forests were the best with 93% accuracy,
F1 0.91, and AUC 0.962.</p>
      </sec>
      <sec id="sec-4-3">
        <title>3.3. Deep Learning:</title>
        <p>In a large-scale study [12], several deep convolutional neural network architectures were
compared for the task of detecting defects on printed circuit boards. The DeFektNet model
showed the best results with 97.9% accuracy, 96.2% completeness, and an F1 value of 0.971.
Other architectures, such as AlexNet and ResNet, also performed well, but were slightly inferior
to DeFektNet.</p>
        <p>A semi-supervised CNN learning approach was applied in [13] to detect defects on metal
surfaces. The proposed PSCNet (partially supervised) architecture achieved an accuracy of 94.8%
and an AUC of 0.982, outperforming the fully supervised network with values of 92.3% and 0.957,
respectively.</p>
        <p>In addition, in [14], the authors demonstrated the benefits of transfer learning deep CNNs for
brickwork inspection. Using a network tuned to ImageNet as initialisation weights, they achieved
an accuracy of 95.7% compared to 82.4% for a network trained from scratch.</p>
        <p>It is important to remember that results can vary significantly depending on the type of
defects, image quality, data volumes, and specific application requirements. A thorough
evaluation on real data is essential to select the most appropriate approach.</p>
      </sec>
      <sec id="sec-4-4">
        <title>3.4. Algorithms comparison</title>
        <p>Evaluation of various defect detection methods through metrics like Accuracy, Precision,
Recall, F1-score, and AUC reveals their efficacy across diverse applications.</p>
        <p>Traditional image processing techniques exhibit reliability but may lack in accuracy compared
to machine learning and deep learning approaches.</p>
        <p>Machine learning algorithms demonstrate commendable performance, while deep learning
models, especially convolutional neural networks, exhibit exceptional accuracy and robustness,
albeit requiring significant computational resources.</p>
        <p>The supplementary comparison table succinctly summarizes the performance of different
defect detection methods across various applications. It underscores the significance of selecting
the most appropriate approach based on application requirements, data characteristics, and
computational constraints.</p>
        <p>This table provides a concise comparison of various methods across different applications,
focusing on key metrics such as Accuracy, Precision, Recall, F1-score, and AUC.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. Future work</title>
      <p>While the current state-of-the-art defect detection algorithms have demonstrated promising
results, several challenges and opportunities for future research remain:</p>
      <p>Developing more robust and generalized algorithms: Many existing algorithms are tailored to
specific applications or defect types, limiting their generalization capabilities. Future work should
focus on developing algorithms that can adapt to various manufacturing environments and defect
types with minimal retraining or adaptation efforts.</p>
      <p>Leveraging multi-modal data: Most current approaches rely solely on visual data (images or
videos). Incorporating additional modalities, such as depth information, thermal data, or sensor
readings, could potentially improve defect detection accuracy and provide more comprehensive
analysis.</p>
      <p>Explainable and interpretable models: While deep learning models have shown exceptional
performance, they often lack interpretability and transparency in their decision-making process.
Developing more interpretable models or techniques for explaining the defect detection decisions
could improve trust and facilitate easier adoption in real-world scenarios.</p>
      <p>Real-time and edge computing: Many manufacturing processes require real-time defect
detection and decision-making. Future research should focus on optimizing algorithms for
lowlatency inference and exploring edge computing solutions to enable on-site defect detection
without the need for cloud-based processing.</p>
      <p>Active learning and semi-supervised approaches: Collecting and labeling large datasets for
defect detection can be time-consuming and costly. Active learning and semi-supervised methods
that can effectively leverage a combination of labeled and unlabeled data could significantly
reduce the data annotation efforts required for training accurate models.</p>
      <p>Integration with existing manufacturing systems: Seamless integration of defect detection
algorithms with existing manufacturing processes, quality control systems, and data
management infrastructures is crucial for widespread adoption. Future work should address the
challenges of system integration, data pipelines, and interoperability.</p>
      <p>By addressing these challenges and opportunities, future research in image-based defect
detection can further enhance the efficiency, accuracy, and reliability of quality control processes
in the manufacturing industry.</p>
    </sec>
    <sec id="sec-6">
      <title>5. Conclusions</title>
      <p>This article provides a comprehensive overview of image-based defect detection algorithms,
covering traditional image processing methods, machine learning algorithms, and deep learning
models. The study found that while traditional methods such as morphological operations and
edge detection provide reliable defect detection, machine learning algorithms such as support
vector machines and random forests strike a balance between accuracy and computational
efficiency. However, it is deep learning models, such as convolutional neural networks (CNNs),
that are emerging as powerful tools for defect detection, demonstrating exceptional accuracy and
reliability.</p>
      <p>Despite their effectiveness, deep learning models require significant computational resources
and large amounts of labelled data to train, which creates practical difficulties for implementation
in certain production environments. Nevertheless, the comparison highlights the importance of
selecting the most appropriate approach based on specific application requirements, data
characteristics, and computational constraints. This analysis provides valuable insights for the
implementation of defect detection systems to improve product quality and reduce costs in
various manufacturing industries.</p>
      <p>Moreover, the results of the study highlight the key role of image-based defect detection
algorithms in modern manufacturing processes, offering a powerful combination of accuracy,
efficiency and adaptability. As technology continues to evolve, further advances in defect
detection methodologies promise to revolutionise quality control standards and increase
industrial competitiveness. Continued innovation and collaboration between researchers and
industry stakeholders will drive the development of defect detection systems, paving the way for
more efficient and reliable quality control processes in manufacturing.
[10] Baah, E., et al. (2015). Defect detection on patterned textures using unsupervised machine
learning. IEEE International Conference on Industrial Technology (ICIT), 1726-1731.
[11] Cha, Y.J., et al. (2017). Deep learning-based crack damage detection using convolutional
neural networks. Computer-Aided Civil and Infrastructure Engineering, 32(5), 361-378. DOI:
10.1111/mice.12263
[12] Ren, R., et al. (2019). Defect detection for printed circuit board using kernel-based CNN.</p>
      <p>Journal of Intelligent Manufacturing, 30(3), 1067-1080. DOI:10.21203/rs.3.rs-3905934/v1
[13] Park, J., et al. (2020). Semi-supervised learning for steel defect classification with
selftraining and self-ensembling. IEEE Access, 8, 180901-180910.
[14] Aksu, E., et al. (2021). Deep learning based defect detection and classification for EL images
of photovoltaic plants. IEEE Access, 9, 32528-32543.
[15] Xie, X. (2008). A review of recent advances in surface defect detection using texture analysis
techniques. Electronic Letters on Computer Vision and Image Analysis, 7(3), 1-22.
[16] Chatterjee, S., Mukherjee, R., &amp; Siarry, P. (2020). A comparative study of thresholding
techniques for defect detection of patterned surfaces. Applied Soft Computing, 90, 106191.
[17] Kumar, A. (2008). Computer-vision-based fabric defect detection: A survey. IEEE
transactions on industrial electronics, 55(1), 348-363. DOI:10.1109/TIE.1930.896476
[18] Duarte, A., Carrão, L., Brasileiro, A., Dória Neto, A., &amp; Bauchspiess, A. (2018). An integrated
fuzzy-Bayesian approach for the segmentation of possible defects in welded joints in
panoramic images. Journal of Intelligent Manufacturing, 29(6), 1443-1451.
[19] Yin, X. C., Ng, B. W. H., Tsang, W. M., &amp; Ng, K. W. (2019). An ensemble machine learning
approach for defect detection on additive manufactured parts using process images.</p>
      <p>Advanced Engineering Informatics, 42, 100978.
[20] Lins, R. D., &amp; Givargis, T. (2021). Efficient defect detection in manufacturing using ensemble
boosted trees. Proc. of the IEEE Winter Conference on Applications of Computer Vision
(WACV), 2760-2769.
[21] Lotfi, A., &amp; Flint, I. (2010). Anomaly detection techniques and machine learning in defect
detection for additive manufacturing processes. The International Society for Optics and
Photonics (SPIE) Defense and Commercial Sensing.
[22] Bergmann, P., Batzies, M., Fauser, M., Sattler, D., &amp; Zhong, C. (2022). Combining physics-based
and data-driven modeling for semantic defect segmentation. Physica D: Nonlinear
Phenomena, 419, 132839.
[23] Zhou, H., Luo, G., Wang, S., Cai, G., Ye, H., &amp; Wu, Y. (2022). Textile defect detection with
transfer learning and deep visual attention. IEEE Transactions on Instrumentation and
Measurement, 71, 1-10.
[24] Shunmugaperumal, P., Chidambaranathan, M., &amp; Chamola, V. (2022). A deep learning-based
defect detection system for metal surfaces. Sensors, 22(3), 946.
[25] Masci, J., Meier, U., Cireşan, D., Schmidhuber, J., &amp; Fricout, G. (2012). Steel defect classification
using deep convolutional neural networks. In International Joint Conference on Neural
Networks (IJCNN), 1-6.
[26] Tsai, D. M., &amp; Huang, H. C. (2017). Transfer learning for defect detection with convolutional
neural networks. Journal of Intelligent Manufacturing, 32(5), 1351-1364.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Palchyk</surname>
            <given-names>V.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koval</surname>
            <given-names>V.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>DEFECTING WOOD PRODUCTS USING CONVOLUTIONAL NEURONAL NETWORKS / Palchyk</surname>
            <given-names>V.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koval</surname>
            <given-names>V.S.</given-names>
          </string-name>
          / V Scientific and
          <article-title>Practical Conference of Young Scientists and Students "Intelligent Computer Systems and Networks"</article-title>
          . 10
          <string-name>
            <surname>November</surname>
          </string-name>
          <year>2022</year>
          . Ternopil. Ukraine - p.
          <fpage>38</fpage>
          <lpage>URL</lpage>
          : http://ki.wunu.edu.ua/conference
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Koval</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zahorodnia</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Adamiv</surname>
            <given-names>O.</given-names>
          </string-name>
          <article-title>An Image Segmentation Method for Obstacle Detection in a Mobile Robot Environment /</article-title>
          <source>Proceedings of the 9th International Conference on Advanced Computer Information</source>
          Technologies (ACIT'
          <year>2019</year>
          ), June 5-7,
          <year>2019</year>
          ,
          <string-name>
            <given-names>Ceske</given-names>
            <surname>Budejovice</surname>
          </string-name>
          , Czech Republic, pp.
          <fpage>479</fpage>
          -
          <lpage>482</lpage>
          . DOI:
          <volume>10</volume>
          .1109/ACITT.
          <year>2019</year>
          .8779903
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Andrij</given-names>
            <surname>Sydor</surname>
          </string-name>
          , Diana Zahorodnia, Pavlo Bykovyy, Ivan Kit, Vasyl Koval,
          <string-name>
            <given-names>Konrad</given-names>
            <surname>Grzeszczyk</surname>
          </string-name>
          .
          <source>Image Recognition Methods Based on Hemming Distance / Proceedings of the 9th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications</source>
          (IDAACS'
          <year>2019</year>
          ),
          <source>September 18-21</source>
          ,
          <year>2019</year>
          , Vol.
          <volume>2</volume>
          ,
          <string-name>
            <surname>Metz</surname>
          </string-name>
          , France, pp.
          <fpage>1115</fpage>
          -
          <lpage>1121</lpage>
          . DOI:
          <volume>10</volume>
          .1109/IDAACS.
          <year>2019</year>
          .8924295
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Arianna</given-names>
            <surname>Martinelli</surname>
          </string-name>
          , Andrea Mina, Massimo Moggi. (
          <year>2021</year>
          ).
          <article-title>The enabling technologies of industry 4.0: examining the seeds of the fourth industrial revolution</article-title>
          .
          <source>Industrial and Corporate Change</source>
          , Volume
          <volume>30</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>1</given-names>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          161-
          <fpage>188</fpage>
          . DOI: https://doi.org/10.1093/icc/dtaa060
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Núbia</given-names>
            <surname>Carvalho</surname>
          </string-name>
          , Omar Chaim, Edson Cazarini, Mateus Gerolamo. (
          <year>2018</year>
          ).
          <article-title>Manufacturing in the fourth industrial revolution: A positive prospect in Sustainable Manufacturing, Procedia Manufacturing</article-title>
          , Volume
          <volume>21</volume>
          , P.
          <fpage>671</fpage>
          -
          <lpage>678</lpage>
          . DOI: https://doi.org/10.1016/j.promfg.
          <year>2018</year>
          .
          <volume>02</volume>
          .170
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Mohammad</given-names>
            <surname>Fakhar Manesh; Massimiliano Matteo Pellegrini; Giacomo Marzi; Marina</surname>
          </string-name>
          <string-name>
            <surname>Dabic.</surname>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Knowledge Management in the Fourth Industrial Revolution: Mapping the Literature and Scoping Future Avenues</article-title>
          ,
          <source>IEEE Transactions on Engineering Management</source>
          , Volume:
          <volume>68</volume>
          , Issue: 1,
          <string-name>
            <surname>P.</surname>
          </string-name>
          289-
          <fpage>300</fpage>
          . DOI:
          <volume>10</volume>
          .1109/TEM.
          <year>2019</year>
          .2963489
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Wegner</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Montesano</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Lakhani</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Defect detection on metal surfaces using machine learning</article-title>
          .
          <source>Journal of Machine Vision and Applications</source>
          ,
          <volume>31</volume>
          (
          <issue>2</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>15</lpage>
          . DOI:
          <volume>10</volume>
          .3390/machines12030166
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Umbrico</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , et al. (
          <year>2017</year>
          ).
          <article-title>Defect detection in ceramic tile production with computer vision and machine learning</article-title>
          .
          <source>Procedia Manufacturing</source>
          ,
          <volume>11</volume>
          ,
          <fpage>1545</fpage>
          -
          <lpage>1552</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peng</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Summers</surname>
            ,
            <given-names>R. M.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>TextileNet: A defect detection system for fabric</article-title>
          .
          <source>IEEE Transactions on Automation Science and Engineering</source>
          ,
          <volume>16</volume>
          (
          <issue>3</issue>
          ),
          <fpage>1335</fpage>
          -
          <lpage>1344</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>