Skip to Content
SymmetrySymmetry
  • Article
  • Open Access

20 July 2026

29 Pages

Edge-Intelligent Industrial Inspection: A GPU-Accelerated Multiscale CNN Framework for Real-Time Visual Quality Assessment

and
1
Department of Electrical and Electronics Engineering, Faculty of Engineering and Natural Sciences, Malatya Turgut Ozal University, Malatya 44900, Türkiye
2
Department of Computer Engineering, Faculty of Engineering, Inonu University, Malatya 44100, Türkiye
*
Author to whom correspondence should be addressed.

Abstract

The transition toward Industry 4.0 requires the integration of technologically viable hardware–software–intelligence solutions into existing industrial infrastructures to enable smart and autonomous production systems. Thus, Industry 4.0 enables techno-symmetry, which refers to the balanced and interactive distribution of technological capacity, information processing ability, and decision-making capability across production networks. This study proposes a comprehensive hardware–software–intelligence framework for a real-time visual quality inspection of transformer cases during the manufacturing process by using an embedded deep learning architecture. First, a real-world dataset consisting of 232 defective and 264 non-defective printed transformer case images was collected from the production line of a transformer manufacturing facility and preprocessed to improve data quality and model generalization. Second, to enhance feature extraction capability, the classical AlexNet architecture was modified to develop a Multiscale AlexNet (MS-AN) model capable of simultaneously capturing both global and local spatial features. The proposed architecture incorporates parallel convolutional branches with 3 × 3 and 5 × 5 receptive fields, which are fused at the feature level to increase representation diversity and improve robustness against noise and degradation in printed images. Third, an experimental system was implemented using practical industrial automation technologies (e.g., CUDA-accelerated C++ programming, the NVIDIA Jetson Orin Nano edge computing platform, ROS-based communication infrastructure, IoT protocols, and programmable logic controller (PLC) integration). Experimental results demonstrate that the proposed system achieves real-time inspection performance of approximately 2 s per inspection with 99% classification accuracy on the constructed dataset. The developed framework enables efficient deployment of deep learning models on GPU-based edge devices; thus, it reduces reliance on workstation-class computers, lowers energy consumption, and supports scalable intelligent inspection architectures aligned with Industry 4.0 transformation objectives.

1. Introduction

The term “Industry 4.0” refers to the usage of cutting-edge technologies in manufacturing and other industrial fields. Industry 4.0 is the new moniker for industrial automation and digitalization of the production line. It represents the fourth industrial revolution, which is characterized by cyber–physical systems, the Internet of Things (IoT), big data analytics, and smart automation. Therefore, Industry 4.0 aims to enable intelligent factories that are more efficient, flexible, and autonomous. Smart factories integrate advanced sensors, interconnected machines, real-time data communication systems, and machine intelligence. All these components jointly interact to optimize production processes. These interactions, in turn, have been expected to enhance product quality, reduce material, energy, and time wastes, and improve operational efficiency [1,2]. This transition not only implies a big shift in the production technology but also means the evolution of production systems meets the requirements of the Industry 4.0 paradigm.
The concept of Industry 4.0 was first announced in Germany in 2011 [3]. Since then, it has gained growing global attention from stakeholders due to its anticipated economic and societal benefits. Studies have projected significant productivity gains and cost reductions associated with its implementation in the German industrial sector. At the company level, the key advantages include reduced maintenance and manufacturing costs, improved product quality, and faster time to market via injecting autonomy and intelligence in production tools. Although the dynamics of transition run on the basic elements of the manufacturing system, its effects can be observed in productivity overall. It is evident that, for future competitive markets, these transitions are necessary for the maintenance of long-lasting industrial infrastructure on a global scale [4]. The concept of techno-symmetry involves functional balance, inter accessibility, and distributed capability organization within the system. In this context, techno-symmetry in production explains the balanced distribution of technological capacities, data processing capabilities, and decision-making intelligence throughout production systems. Unlike conventional industrial models based on hierarchical control structures, Industry 4.0 enables the diffusion of intelligence through interconnected cyber–physical systems, autonomous machines, sensors, and algorithmic platforms. From an Industry 4.0 perspective, techno-symmetry not only refers to the distribution of production capacity but also to the symmetrical circulation of information, adaptive learning capabilities, and operational autonomy within industrial ecosystems.
Artificial intelligence (AI), big data analytics, cloud computing, and robotic systems are some of the major technologies that constitute Industry 4.0. Practically, IoT devices enable real-time monitoring of manufacturing processes, and machine learning tools enable improving production system performance [5,6]. Big data analytics, on the other hand, allow the handling and processing of a large amount of process data, which is collected from many sources and contributes to decision-making tasks [2,7,8,9]. Nonetheless, one of the key enhancements in smart factories is based on machine learning and image processing applications. By automating and optimizing production processes, these approaches enhance production efficiency and reduce production costs. Machine learning algorithms evaluate data collection from many sensors and cameras, detect anomalies, and perform tasks that were carried out by human workers. Image processing techniques improve quality control by consistently identifying product flaws and reducing human error [10]. These methods can also detect safety hazards on the production line and contribute to reducing accidents. Smart factories that use machine learning and image processing offer several operational benefits [11,12,13]. Firstly, these techniques can be very effective in finding production defects and thus contribute to maintaining product quality. In addition, based on sensor data, they can predict when equipment needs maintenance and thus reduce downtime. Optimizing production processes, such as planning and routing, through data utilization is crucial for minimizing waste and enhancing manufacturing efficiency. Furthermore, these technologies facilitate the rapid adaptation of processes in case of changes in production requirements [14,15,16].
In the literature, although many studies have indicated remarkable performance of machine learning and image processing methodologies in numerical tests with benchmark datasets, real-world implementation of these approaches on a real-world production line, their design and practical realization concerns and real-time verification efforts for practical use remain limited. The present study also addresses designing, real-time realization of the methods, and real-world tests. Prior studies have demonstrated the efficacy of ML and image processing predominantly in workstation or PC environments [17]. Despite the promising accuracy levels indicated by these investigations, their practical use and application performance in real-time is limited. The deployment of a general-purpose computer on each machine within a manufacturing environment presents significant challenges, including high costs, substantial energy consumption, and demanding maintenance needs, thus rendering it an impractical long-term strategy. At this point, embedded systems emerge as an important alternative. Today, this development can be achieved by integrating the capabilities provided by parallel computing solutions implemented on high-speed control cards, microcomputers, and GPUs into factory automation processes. R&D projects offering field-oriented solutions are needed for the development of the aforementioned integration processes. Therefore, instead of running machine learning and image processing algorithms on devices with workstations, desktop computers, and similar architectures in factories, they should be run on ARM or GPU-based electronic cards, and the advantages of embedded programming and distributed control should be functional in the field [17,18].
Embedded systems are integrated systems of hardware and software components, which are designed to perform a specific function reliably and efficiently. Embedded systems provide a more economical solution compared to general-purpose personal computers because they are purposely designed to operate with minimal hardware and low power consumption [19]. These systems find extensive application in industrial settings, including process control, monitoring, and data acquisition [20,21,22]. Moreover, their capacity to withstand industrial operational environments and perform real-time processing renders them well-suited for production environments. Another advantage of employing embedded systems in industry is their inherent capacity for communication with other systems and devices, thereby facilitating the development of interconnected systems that function cohesively. In particular, machines need to communicate with other machines and systems on a production line. Such machine collaboration allows for fully automated production, which increases efficiency and reduces the need for human involvement [23,24,25,26,27].
Today, ARM or GPU-based electronic cards combine high computing power with low power consumption, enabling machine learning algorithms to run in the field [18,20]. This approach reduces central cloud dependency and enables the development of distributed intelligence architectures. Performing the prediction and inference processes of machine learning models on end devices reduces data transmission load, lowers latency, and increases system stability.
Programmable logic controllers (PLCs), widely used in industry, are among the fundamental components of automation systems due to their reliability, flexibility, and ease of use. Considering the prevalence of PLC-based applications in the industrial infrastructures, the embedding of machine learning models into existing systems, such as PLC modules, is important [28,29,30,31]. Given that the existing industrial infrastructure is largely PLC-based, new generation artificial intelligence-based manufacturing should be established on the existing infrastructure. The integration of machine intelligence into existing systems is a critical step for the realization of Industry 4.0 paradigms. Recently, the real-time application of machine learning-based process monitoring on embedded systems has turned into an important research area in terms of hardware–software integration for Industry 4.0 transformation. Considering the limitations of classical image processing frameworks on production lines in terms of reliability, flexibility, and adaptability, the development of embedded AI-based solutions will contribute to making production systems more viable and scalable. For instance, embedding deep neural network models on industrial control cards significantly contributes to the real-time quality control [32,33]. This, in turn, can support the spread of intelligent production systems, which is a key progress for Industry 4.0. Deep learning-based visual inspection of product quality has been considered in several works; for instance, the quality control in the printing [34], defect detection for mass-produced electronic components [35], chip packaging defect detection [36], and printing defect detection [37]. These works demonstrate the effectiveness of the machine learning-based visual quality inspection and contribute to the process of Industry 4.0 transformation [38,39].
A comprehensive representation of an Industry 4.0 ecosystem can be conceptualized as a multi-layered architecture that involves interdependent technological and socio-economic domains. Figure 1 illustrates a hierarchical framework of the Industry 4.0 ecosystem, which consists of the following layers from top to bottom: the machine intelligence layer (e.g., AI, machine learning, deep learning, computational intelligence), the software layer (e.g., applications, industrial protocols, IoT middleware, digital twins, cloud platforms), the hardware/cyber–physical layer (e.g., sensors, actuators, CPUs, robotics, automation equipment, production lines), and energy and material resource layer and ecosystem layer (Supply chain, regulatory environment, human operators, environmental context, organizational infrastructure, etc.). The present study focuses on a scalable realization for hardware–software–intelligence layers.
Figure 1. A hierarchical framework of the Industry 4.0 ecosystem that shows interacting domains and dependencies.
This study presents an empirical investigation that implements the technological subcomponents of the hardware, software, and machine intelligence layers. In this perspective, the study focuses on the realization of embeddable versions of the proposed multiscale AlexNet architecture on real-time integrated computing cards and evaluates the effectiveness of the proposed model as a component of the machine intelligence layer within a scaled experimental setup complying with the Industry 4.0 paradigm. The developed experimental platform utilizes the Robot Operating System (ROS) and IoT-based communication protocols to enable hybrid operation with programmable logic controller (PLC) hardware. The implementation of the proposed multiscale AlexNet architecture on this platform demonstrates the practical applicability of machine intelligence in contemporary production automation infrastructures.
In summary, the integrated hardware–software–intelligence solution developed in this study has the potential to provide the following contributions and impacts:
  • The image classification performance of the AlexNet architecture was enhanced by integrating multiscale feature extraction capabilities. Consequently, the proposed multiscale AlexNet architecture can effectively learn to classify defective and non-defective printed transformer case images, which were collected from a factory production line.
  • This study also demonstrates the implementation of machine learning and image processing algorithms by using embedded programming techniques on ARM- or GPU-based electronic cards. In this manner, this study shows a prototype application to support the paradigm shift required for Industry 4.0 transformation.
  • We also embedded the IoT system protocol and ROS communication protocol on the ARM or GPU-based electronic cards. From this perspective, each edge device can turn into a robotic unit (intelligent agents), where intelligence and software layers emerge.
  • The developed integrated software–hardware–intelligence solution describes a feasible hardware and software infrastructure for the realization of machine learning models in the factory environment, and suggests a practical framework that enables real-time data acquisition, data-driven autonomous decision-making, collaborative intelligence, real-time monitoring, and reporting.
  • Unlike generic inception-based multi-scale networks, the proposed MS-AN introduces a lightweight dual-branch extension of AlexNet specifically designed for industrial transformer case-print inspection, enabling complementary local and global feature learning with substantially lower architectural complexity.

2. Materials and Methods

In this study, as the intelligent component of the proposed framework, a multiscale AlexNet architecture was developed to detect printing defects on transformer casings and classify the products as defective or non-defective for automated quality control. In the first stage, images of defective and non-defective prints from transformers with different sizes and types of casings were obtained in a factory environment under natural lighting conditions. Then, a balanced dataset containing a sufficient number of examples was formed to manage the training stage of AlexNet models. The content of this dataset aims to train a model that is resistant to lighting changes and can reliably detect casing defects. For this purpose, offline data augmentation was applied to reduce class imbalance, and the dataset was divided into training and test sets at specific ratios to prevent overfitting. Following this preprocessing, a transfer learning approach was adopted; an architecture based on AlexNet, previously trained on large datasets, was used as a foundation to build a network architecture that enables multi-scale feature extraction. In this context, parallel network branches with different convolution kernel sizes were integrated into this AlexNet model, thereby catching multi-scale discriminative features to enhance classification accuracy. Here, features in the different scales enable extracting advantageous mixtures of common features from the transfer-learned parts of the architecture during the training of the consequent convolution layers that follow the multi-scale layers that are low-scale and high-scale layers. This contribution enhances the classification accuracy of the proposed multiscale AlexNet model in this application.
A GPU-based integrated system was designed, and independent CUDA codes were developed to enable the trained multiscale AlexNet models to run in real-time under real-world conditions. The created static library was integrated with the CUDA library in the GPU-based integrated system, which enables the effective use of graphics processor cores for computation purposes. This integration becomes a feasible solution for the high computational speed requirement of image processing systems and provides a flexible solution that can be easily adapted for the target hardware.
The proposed system solution methodologically includes the following steps:
  • Preparing the data set and preprocessing;
  • Training the multiscale AlexNet model;
  • Creating a static library for the GPU-based integrated system;
  • Developing a ROS node that enables communication between the camera and the IoT system protocol;
  • Ensuring communication between the IoT protocol and the programmable logic controller.
A block diagram summarizing the entire method is presented in Figure 2.
Figure 2. Block diagram of the proposed system solution.

2.1. Data Set Preparation and Pre-Processing

To compose a realistic dataset, transformer case images were collected from a real production line in a factory environment. This dataset was used for training the multiscale AlexNet model, and the images express the challenges of real factory environments that can affect image quality, such as variable natural and artificial lighting conditions, specular reflections on surfaces, light refraction behavior of metallic and shiny label surfaces, operator mobility, and production tempo. Data consistency was ensured by fixing the camera positioning, viewing angle, and shooting distance. Rather than sterile laboratory images, we aimed to compose a dataset that well expresses the uncertainty and imaging challenges encountered in real factory conditions, thereby improving the practical performance of the trained model. In total, 496 images belonging to two classes (defect and non-defect) were collected on the production line, of which 232 were labeled as “defect” and 264 as “non-defect.” The labeling process was performed by the quality expert of the factory, enabling the model to learn the quality evaluation criteria of domain experts. Figure 3 shows ample images from the dataset.
Figure 3. Representative images of transformer casing prints captured by a fixed-position camera in the factory environment: (a) defective sample and (b) non-defective sample. (Green boxes indicate defective regions, whereas red boxes denote intentionally masked product information).
Initially, images were stored in their original, unprocessed state. A preprocessing phase was subsequently implemented to prepare them for classification. To mitigate background noise and focus the model’s analysis on the relevant printing area, regions of interest (ROIs) were manually delineated, effectively eliminating extraneous visual data and facilitating a learning process based on more discriminative features. During the data collection process, observed defect types were limited in variety. To better represent uncertainty in printing defects, “defect” class images were enriched through manual interventions applied to selected flawed samples. These interventions—including partial erasure, degradation, or alteration within the label area—were designed to increase diversity within the “defect” category. As a result, the dataset encompasses a wide range of defect types, improving the model’s ability to handle uncertainty in possible defect manifestations. To mitigate overfitting and ensure unbiased evaluation, the dataset was partitioned into training (60%), validation (20%), and test (20%) splits prior to any augmentation. Splits were composed of randomly sampled images and preserved the original class distribution. Critically, all augmentation procedures were applied exclusively to the training split; the validation and test sets were retained in their original, unmodified forms. Applying augmentation to validation or test sets can artificially inflate performance metrics and misrepresent the model’s actual generalization ability. By preserving these sets in their original state, a realistic and unbiased performance evaluation was ensured.
One of the most critical risks in training with a small dataset is that the model memorizes the same base images rather than learning generalizable features. This is particularly problematic in deep learning, where limited data diversity can cause the model to memorize pixel-level patterns, leading to high training accuracy but poor test performance. To address this, a class-aware dynamic augmentation strategy was developed and applied exclusively to the training set. To address both the limited dataset size and the class imbalance between “defect” and “non-defect” samples, a class-aware augmentation strategy was implemented. Rather than applying a uniform augmentation factor, the augmentation multiplier for each class was computed dynamically according to:
N target   = N max × α
where N max   is the sample count of the majority class in the training split and α is the base augmentation factor (set to 10 in this study). The per-class augmentation factor f c was then determined as:
f c = ⌈ N target   N c ⌉
The distribution of the dataset across the training, validation, and test sets before and after class-aware data augmentation is illustrated in Figure 4. Following this strategy, the effective training set was expanded from 297 images to 3248 balanced samples (1668 DEFECT and 1580 NON-DEFECT), representing an approximately 11-fold increase in training data volume. This formulation ensures that all classes converge to an equivalent number of training samples regardless of their original counts, directly addressing class imbalance without discarding any majority-class samples.
Figure 4. Distribution of the dataset across training, validation, and test splits before and after class-aware augmentation.
The augmentation pipeline was implemented online using the augmentedImageDatastore structure in MATLAB, so that each base image is presented to the model with different transformation parameters in every epoch, encouraging the model to learn common and discriminative features rather than pixel-level patterns. Two complementary categories of transformation were applied. Geometric transformations were applied to simulate the angle, position, and perspective variations that occur in real production conditions: random horizontal and vertical reflection, rotation within ±20°, axial translation of ±8 pixels, shear within ±10°, and scale variation in the range [0.85, 1.15]. These parameters were kept within limits that preserve the natural distribution of the images while providing sufficient positional and orientational diversity.
Photometric transformations were applied to simulate the variable lighting conditions present in the factory environment: random brightness adjustment in the range [×0.6, ×1.4], contrast variation in the range [×0.7, ×1.3], and additive Gaussian noise with standard deviation sampled uniformly from [0.005, 0.02]. These transformations directly address the reviewer’s concern regarding robustness to different lighting conditions, as the model is exposed during training to a wide range of illumination scenarios representative of real industrial settings. Some representative augmented images are shown in Figure 5.
Figure 5. Some examples of augmented images.
The diversity of the augmentation process was verified by visual inspection of randomly selected augmented samples, confirming that the transformations produce qualitatively distinct and realistic variations in the original images. The dataset preparation stage encompassed data collection, ROI-based preprocessing, class-aware balancing, and dynamic data augmentation, resulting in a balanced and generalizable image dataset that well expresses the imaging challenges of the factory environment. These efforts provide a solid foundation for reliable and accurate training of the multiscale AlexNet models.

2.2. Theoretical Foundation of Multiscale AlexNet Model

A significant portion of images obtained from the real world may contain distortions such as low resolution, loss of contrast, noise, blurring, or missing structures. Such noisy data can negatively affect the overall performance of deep learning models and, in particular, can lead to limited representation capacity in single-scale convolutional neural network architectures. In this context, the proposed multi-branch convolutional neural network architecture aims to provide more robust and stable performance in the case of such corrupted and low-resolution image conditions by processing spatial information at different scales simultaneously. In the aspect of image classification, being able to process information at different spatial scales simultaneously allows the model to learn both detail and context information. Figure 6 shows a general architecture of the proposed Multiscale AlexNet model.
Figure 6. General architecture of the Multiscale AlexNet model. (The red box denotes intentionally masked product information).
Traditional CNN architectures have limited representation capacity because they rely on single-scale convolution filters. Conversely, multi-branch architectures facilitate the extraction of multi-scale information through the concurrent application of diverse filter sizes. The inception architecture, which was the first to implement this methodology, concurrently executed convolution and pooling operations within each block, employing multiple kernel sizes [40,41]. These kinds of designs increase the model’s width, which allows a single layer to learn different types of features. As a result, parameter efficiency can be improved [42,43,44]. Several studies have employed variants of multiscale CNNs and demonstrated improved performance in several application domains [45,46,47,48,49,50]. Effects of the improved AlexNet architecture for image classification problems, which benefit from multiscaling, were shown in several works in various application domains [51,52].
In our study, we improved the classification performance of the AlexNet transfer learning backbone by adopting two-branch multiscale convolution layers. The first four convolutional layers of AlexNet, used as the backbone, were kept fixed because they successfully extracted low-level universal features such as edges, corners, and color transitions. These layers have high transferability for different tasks. In the literature, this strategy is called “feature extraction” and is commonly used in transfer learning scenarios where only the final layers are trained.
Parallel convolution layers within the multi-branched structure extract information at both local and global levels with different receptive field sizes. Branches with small receptive fields focus on micro-information preserved at the detail level, such as edges and texture; branches using larger receptive fields aim to capture large-scale structural features, such as the overall structure of the object or contextual relationships. This expansion provides a compensatory effect for information loss in damaged or corrupted image areas, since details lost in one branch can be indirectly captured through larger-scale structures in another branch.
The common feature map from the backbone layer ( F base   ∈ ℝ H × W × C ) is sent to parallel branches. Each branch performs convolutional operations with kernels of different sizes. For example, the output of the branch i with a kernel of size k i × k i i :
F i = σ W i ∗ F base   + b i
where W i and b i represent the convolution filters and bias terms for the i th branch, while σ ⋅ represents the activation function (ReLU, etc.). This convolution layer uses small k i values (e.g., 3 × 3 kernel for a small receptive field) to learn local details, while large k i values (e.g., 5 × 5 or 7 × 7 kernels for larger receptive fields) enable the learning of broader contextual structures. In noisy and corrupted images, at least one branch ( ∃ i , F i ) may be affected by information loss caused by the corrupted regions; however, other branches ( j ≠ i , F j ) can compensate for this information loss within the multi-scale feature maps F fused   by capturing a more robust signal in other scales. As a result, using different kernel sizes corresponds to different receptive field sizes, which allows for capturing both fine-grained local details and global patterns in images [53].
Combining the multi-scale feature maps obtained from parallel branches along the channel axis allows the model to integrate representation information from different scales for the same location. This approach compensates for information gaps in missing or low-quality regions with counterparts from other intact scales, thereby providing the model’s decision-making process with a richer and more balanced feature space. A classic single-scale model either captures details well but misses contextual information, or vice versa. Models with multi-scale fusion can blend both detail and contextual information, and this feature offers advantages in the case of corrupted and blurred low-quality images. In the proposed multiscale AlexNet architecture, the feature maps produced by parallel branches will be combined using concatenation along the channel axis (as done in the inception module). As a result of this combination, responses from different scales are placed side by side at each pixel location. Thus, the classification layers can make more accurate decisions using these enriched features. Such multi-scale feature representations can improve classification accuracy compared with single-scale features. This finding indicates that features from different scales provide complementary information and create a broader perspective in the model’s final decision. Feature fusion also increases the deep network’s resilience to small-scale noise and large-scale transformations internally, as the model considers information from multiple scales when making decisions. The literature reports that such multi-scale fusion techniques significantly improve recognition performance, particularly in scenes with low-quality or small objects [54]. Feature maps obtained from branches are combined in the channel dimension:
F fused   = Concat F 1 , F 2 , … , F N , F fused   ∈ ℝ H ′ × W ′ × c 1 + ⋯ + c N
This fusion process allows complementary information from different scales to come together in a single unified representation. Thus, local information loss caused by corrupted pixels is compensated by signals from larger-scale branches. On the other hand, the overfitting problem frequently encountered in models trained with corrupted data is partially mitigated by multi-branch structures. The main reason is that each branch learning features of different levels and types diversifies the model’s decisions, thereby this effect inherently prevents the model from developing excessive dependence on specific corrupted patterns. This architecture provides a learning balance, which has been referred to in the literature as the “internal ensemble effect”; since each branch plays a decisive role at its own specialized scale, this contributes to the diversification and reduction in the overall error tendency [55]. The pre-trained first convolutional layers of the AlexNet, which are fixed weights in the backbone part of the model, achieve high success in recognizing universal low-level visual features such as edges, corners, and textures. These fixed layers have reused fundamental visual patterns that are generally distinguishable even in degraded transformer case prints. Thus, classification can be performed through robust and transferable representations, even with a limited image dataset, without the need to learn from scratch. We can express the noise effect with a simplified model:
x ˜ = x + n , n ∼ N 0 , σ 2 I
Here, x ˜ is the corrupted input image by the Gaussian noise n . Although convolutional operations with a larger filter size weaken the negative impacts of corrupted parts and the noise, some branches may be directly affected by this corruption. However, in multi-branch architectures, the model output is as follows:
y ˆ = f F fused   = f Concat F 1 , … , F N
It takes filtered results from several scales, if at least one result F i represents robust and consistent information, y ˆ can remain stable and consistent. This effect expands the decision surface at multi-scale spaces and gains stability. The post-fusion global average pooling operation calculates the spatial average for each channel:
v d = 1 H ′ W ′ ∑ i = 1 H ′ ∑ j = 1 W ′ F fused  ( i , j , d ) ,
where v d ∈ ℝ D is the feature vector for the d th channel. This process prevents degraded regions from suppressing the output by averaging spatially distributed noise effects. It also reduces the risk of overfitting by decreasing the number of parameters compared to fully connected layers.
Image augmentation techniques applied during training, such as random cropping, rotation, horizontal flipping, and brightness-contrast distortion, enhance the model’s generalization ability against noisy and varying imaging conditions. Image augmentation contributes to multi-branch architectures that can learn different visual variations generated from diversified data samples; one branch specializes in capturing small-scale variation, while another focuses on large-scale contextual differences. This strategy enables more effective consideration of information derived from corrupted images across branches. Data augmentation techniques, such as horizontal flipping T flip   and random cropping T crop   :
x ˜ = T k x , k ∈   flip ,   crop ,   rotate ,   …
Each transformation produces different aspects of the original images relative to the receptive field size of the different branches. Therefore, multi-branch architectures can benefit from augmentation diversity more effectively. Each branch adapts to learning a different aspect of data transformation:
F i = σ W i ∗ T k x + b i
Figure 7 shows the detailed block diagram of the proposed multi-branch (multi-scale) AlexNet architecture for transfer learning. This architecture uses the first four convolutional layers of the pre-trained AlexNet model as the backbone and builds two parallel branches on this common foundation. Branch 1 processes low-level detail (micro features) with 3 × 3 convolution filters, while Branch 2 extracts contextual features (macro features) through a wider receptive field with 5 × 5 filters. The layers applied in both branches are deepened by increasing the number of filters, respectively, and dimensional compression is performed with MaxPooling layers. The representation maps obtained from these multi-scale branches are concatenated at the channel level and then come to the classification network (Conv3), where a two-class output is produced via fully connected layers. This architecture offers significant advantages over single-layer classical architectures in terms of both the parameter efficiency due to the need for a deeper network to extract high-level features and enable representation diversity.
Figure 7. Detailed block diagram of the proposed multi-branch (multi-scale) AlexNet architecture for transfer learning.
The multi-branch AlexNet-based deep learning architecture was designed to increase the model’s robustness and classification performance on distorted prints and noisy images. The parallel branches with different receptive fields allow feature extraction simultaneously at both the local and global levels; thus, even if distorted or missing visual content misleads a branch, it can be compensated for by other branches because of different receptive fields. The channel-level combination of multi-scale features obtained from parallel branches ensures that distorted regions are balanced through complementary representation. Spatial noise effects are suppressed through global average pooling, while the model’s parameter efficiency is preserved. Furthermore, pre-trained backbone layers are fixed to employ transfer learning; thus, fundamental visual patterns can be extracted consistently despite the misleading effect of the corrupted images during the training of the model. When all these mechanisms come together, the multi-branch architecture offers more flexible learning from datasets, and the training process becomes more resilient to corrupted images compared to classical single-branch architectures.

3. Model Training and Performance Evaluation

To evaluate the classification performance of the proposed dual-branch AlexNet-based model, a series of controlled experiments is conducted on a standardized computing platform. All implementations and evaluations are performed on a 64-bit workstation equipped with an Intel® Core™ i7 CPU, 32 GB DDR4 memory, and an NVIDIA GPU with CUDA support. This configuration provides sufficient computational capacity for training deep neural networks and processing high-dimensional industrial surface imaging data. The experimental pipeline is developed in MATLAB R2024b using the deep learning toolbox. In the experiments, input images are resized to 227 × 227 pixels to ensure compatibility with the AlexNet backbone and to maintain stable training. Zero-center normalization is applied to standardize pixel intensity distributions across the dataset. A comprehensive data augmentation strategy is also employed, incorporating random horizontal and vertical reflections, rotations within ±20°, shear transformations within ±10°, translations within ±8 pixels, and scale perturbations in the range [0.85, 1.15], to introduce controlled variations while preserving the semantic content of the images.
The dataset is partitioned into training, validation, and test subsets at ratios of 60%, 20%, and 20%, respectively, each processed with independent transformation pipelines. To address class imbalance in the training set, a class-aware augmentation strategy is adopted in which each class is expanded by a replication factor proportional to the ratio between the maximum class count and its original count, scaled by an augmentation base factor of 10. This ensures that all classes attain an equivalent effective sample size prior to training. Mini-batch sampling is performed using a batch size of 32, and shuffling is enabled at every epoch to reduce sampling bias.
The proposed architecture leverages the first four convolutional layers of the pre-trained AlexNet backbone (Conv1–4) as a shared feature extractor. The feature maps produced at the Pool1 layer serve as a common branch point from which two parallel and independent convolutional streams are derived. The first branch applies a sequence of three convolutional stages with 3 × 3 kernels and progressively increasing filter depths of 64, 128, and 256, each followed by ReLU activation and 2 × 2 max-pooling to capture fine-grained local texture features. The second branch mirrors this structure using 5 × 5 convolutional kernels with identical filter progressions of 64, 128, and 256, enabling the simultaneous extraction of broader spatial context and multi-scale patterns. The outputs of both branches are subsequently merged through a concatenation operation, which integrates complementary multi-scale representations into a unified feature vector. This concatenated representation is then passed through a classification head consisting of a 3 × 3 convolutional layer with 512 filters, followed by ReLU and 2 × 2 max-pooling, and three fully connected layers with 512, 256, and 2 neurons, respectively, each activated by ReLU, culminating in a softmax layer that produces the final class probabilities.
The pre-trained AlexNet convolutional layers (Conv1–4) are initialized with ImageNet weights and fine-tuned during training, while the newly introduced dual-branch modules and classification head are trained from random initialization. Differential learning rate factors are assigned to distinguish between the pre-trained backbone parameters and the task-specific layers, accelerating convergence of the newly added modules while preserving the representational stability of the transferred features. The network is optimized using the Adam optimizer with an initial learning rate of 1 × 10−3 and an L2 regularization coefficient of 1 × 10−4 to mitigate overfitting. A piecewise learning rate schedule is adopted, in which the learning rate is reduced by a factor of 0.1 at the 15th epoch to facilitate fine-grained convergence in later training stages. The model is trained for a maximum of 30 epochs, and performance is monitored on the validation set at a frequency determined by the number of mini-batches per epoch. The best-performing model is selected according to the minimum validation loss criterion, and its weights are preserved via checkpointing. For the final evaluation, the selected model is assessed on the held-out test set to report accuracy, sensitivity, specificity, precision, F1 score, and Matthews correlation coefficient (MCC).
To ensure a systematic and reproducible evaluation, the learning rate and regularization hyperparameters are validated within a limited search range, and the final optimal values are selected exclusively by monitoring maximum validation performance across training epochs, ensuring stable convergence without oscillatory behavior.

3.1. Performance Metrics

Evaluating a deep learning classifier using only accuracy may provide an incomplete assessment, particularly when the dataset is imbalanced or when different types of classification errors have unequal importance. Therefore, a comprehensive performance evaluation was conducted using six complementary metrics: accuracy, sensitivity, specificity, precision, F1-score, and Matthews correlation coefficient (MCC). Together, these metrics provide a statistically robust assessment of the model’s overall classification capability.
Accuracy represents the proportion of correctly classified samples among all observations and is defined as
Accuracy   = T P + T N T P + T N + F P + F N
where TP, TN, FP, and FN denote true positives, true negatives, false positives, and false negatives, respectively.
Sensitivity (recall) measures the proportion of actual positive samples correctly identified by the classifier and is expressed as
Sensitivity   = T P T P + F N
Specificity evaluates the ability of the model to correctly identify negative samples and is given by
Specificity   = T N T N + F P
Precision quantifies the proportion of predicted positive samples that are truly positive, reflecting the reliability of positive predictions:
Precision   = T P T P + F P
The F1-score is the harmonic mean of precision and sensitivity, providing a balanced measure when both false positives and false negatives are important:
F1-score   = 2 ×   Precision   ×   Sensitivity     Precision   +   Sensitivity  
Finally, the Matthews correlation coefficient (MCC) provides a balanced evaluation by considering all four elements of the confusion matrix simultaneously. It is particularly informative for binary classification problems and imbalanced datasets.
MCC = T P × T N − F P × F N T P + F P T P + F N T N + F P T N + F N
Among these metrics, sensitivity reflects the ability to correctly detect defective PV modules, whereas specificity measures the correct identification of non-defective modules. Precision evaluates the reliability of positive predictions, the F1-score summarizes the trade-off between precision and sensitivity, and MCC provides an overall measure of classification quality by incorporating all outcomes of the confusion matrix. Consequently, the combined use of these six metrics enables a comprehensive and reliable evaluation of the proposed defect classification model.

3.2. Comparison of PVEL-ViT with Pre-Trained Deep Learning Baselines

The practical classification performance of the proposed MS-AN model was evaluated using an independent test set. Figure 8a presents the confusion matrix, while Figure 8b illustrates the corresponding receiver operating characteristic (ROC) curves. As shown in Figure 8a, only one “defect” sample was misclassified as “non-defect”, whereas all “non-defect” samples were correctly identified. Consequently, the proposed model achieved 97.8% sensitivity and 100% specificity, demonstrating excellent capability for distinguishing defective and non-defective transformer casing prints.
Figure 8. (a) Confusion matrix and (b) ROC curve of the multi-scale AlexNet model for the test data.
The ROC curves shown in Figure 8b further confirm the robustness of the proposed classifier. Both classes achieved an area under the curve (AUC) of 1.0, indicating near-perfect discrimination between the two classes over all possible decision thresholds. Moreover, the operating points are located close to the upper-left corner of the ROC space, corresponding to a high true positive rate and an almost zero false positive rate. These results verify that the proposed architecture maintains high classification reliability while minimizing false alarm rates.
To further demonstrate the effectiveness of the proposed architecture, its performance was compared with five widely used convolutional neural networks, namely AlexNet, GoogLeNet, MobileNet-V2, SqueezeNet, and EfficientNet. The quantitative comparison is summarized in Table 1.
Table 1. Comparison of the basic classification metrics for the multi-scale and classic architectures.
As reported in Table 1, the proposed MS-AN achieved the best overall classification performance, yielding an accuracy of 99.0%, sensitivity of 97.8%, specificity of 100%, precision of 100%, F1-score of 98.9%, and MCC of 0.980. Among the compared methods, EfficientNet provided the strongest baseline with an accuracy of 95.1%; however, MS-AN improved this value by 3.9 percentage points while simultaneously achieving perfect specificity and precision.
The perfect specificity indicates that no “non-defect” samples were incorrectly classified as defective, thereby eliminating false alarms during inspection. Likewise, the precision value of 1.000 confirms that every sample predicted as defective was indeed defective. Such characteristics are particularly desirable in industrial quality inspection systems, where unnecessary rejection of acceptable products may increase production costs and reduce operational efficiency.
The superiority of the proposed model is also reflected by the highest MCC (0.980) among all evaluated networks, confirming a highly balanced classification performance by jointly considering true positives, true negatives, false positives, and false negatives. Furthermore, the confusion matrix in Figure 8a and the ROC curves in Figure 8b are fully consistent with the quantitative metrics reported in Table 1, providing both visual and statistical evidence for the effectiveness of the proposed multi-scale architecture.
The superior performance of MS-AN can be attributed to its dual-branch multi-scale feature extraction strategy. The 3 × 3 branch captures fine local texture details, whereas the 5 × 5 branch extracts broader structural and contextual information. By fusing these complementary representations, the network learns a richer and more discriminative feature space than conventional single-scale CNN architectures. Consequently, the proposed model exhibits enhanced robustness against illumination variations, image noise, blur, and perspective distortions commonly encountered during transformer case-print inspection.

3.3. Feature Visualization with t-SNE

To improve the interpretability of the proposed model, t-distributed stochastic neighbor embedding (t-SNE) is employed to visualize the high-dimensional feature representations learned by the dual-branch AlexNet architecture. t-SNE projects high-dimensional features into a two-dimensional space while preserving local neighborhood relationships, enabling visual assessment of class separability. The proposed network uses AlexNet Conv1–4 and Pool1 layers as a shared backbone before splitting into two parallel branches with 3 × 3 and 5 × 5 convolution kernels. Features extracted from both branches are fused through a concatenation layer and processed by additional convolutional and fully connected layers before softmax classification. t-SNE is applied at five representative layers: The shared Pool1 output, the final MaxPool layer of the 3 × 3 branch, the final MaxPool layer of the 5 × 5 branch, the concatenation layer, and the second fully connected layer (FC-256). These visualization points enable layer-wise analysis of feature evolution and the contribution of each branch to class discrimination. The Pool1 visualization serves as the baseline, representing generic features transferred from the pretrained AlexNet backbone. The 3 × 3 branch primarily captures fine-grained textures and local structures, whereas the 5 × 5 branch focuses on larger structural patterns and contextual information. The concatenation layer combines these complementary representations, while the FC-256 layer provides the final compact embedding immediately before classification. For high-dimensional feature maps, activations are flattened, standardized using z-score normalization, and reduced to 50 principal components by PCA before applying t-SNE. The t-SNE embedding is generated with a perplexity value of 30 using the Barnes–Hut approximation for computational efficiency. As illustrated in Figure 9, the t-SNE visualizations demonstrate the progressive evolution of feature representations throughout the proposed dual-branch architecture. While the individual 3 × 3 and 5 × 5 branches exhibit considerable overlap between the “defect” and “non-defect” classes, feature fusion at the concatenation layer substantially improves class separability. The clearest discrimination is achieved at the FC-256 layer, where compact intra-class clusters and well-separated inter-class distributions confirm the effectiveness of the proposed feature extraction and fusion strategy.
Figure 9. t-SNE visualization of feature representations at different stages of the proposed dual-branch AlexNet architecture.
The t-SNE results are evaluated according to three criteria: inter-class separation, intra-class compactness, and overlap between class clusters. Progressive improvement in cluster separation from Pool1 to FC-256 indicates that the proposed architecture learns increasingly discriminative representations. Comparison of the two branches further demonstrates that the 3 × 3 and 5 × 5 pathways capture complementary visual information at different spatial scales, while the concatenation layer enhances class separability through feature fusion. These visual observations complement the quantitative evaluation metrics (accuracy, F1-score, and MCC), providing additional evidence for the effectiveness of the proposed dual-branch architecture.

4. Experimental Setup and Realization

Figure 10 shows a picture of the experimental system that was designed to investigate the integration of hardware–software–intelligence layers in the context of the transition to Industry 4.0. The system provides a practical platform for evaluating the proposed system under real-world operational conditions. Details of the realization process of these layers were elaborated in the following sections.
Figure 10. Experimental hardware platform. (a) Overall view of the developed machine vision inspection system with the IMX477 camera, NVIDIA Jetson Orin Nano, WAGO CC100 PLC, and pneumatic actuators. (b) Close-up of the NVIDIA Jetson Orin Nano embedded AI module.
The WAGO Compact Controller 100 PLC module was installed in the control panel of the conveyor system, and all required electrical connections were completed. The digital input terminals (DI1–DI7) were connected to the START/STOP push buttons, magazine sensor, and valve sensors, while the digital output terminals (DO1–DO4) were connected to the conveyor motor driver and pneumatic valve solenoids. An Ethernet infrastructure was established to enable Modbus TCP/IP communication, ensuring reliable data exchange between the PLC and the Node-RED platform. Within the image processing station, the NVIDIA Jetson platform and the MIPI CSI-2 camera were mounted at an appropriate position above the conveyor. The illumination conditions were optimized to ensure consistent image quality. Furthermore, the ROS–Node-RED bridge between the Jetson platform and the main control system was successfully established using the ROSBridge WebSocket protocol, enabling seamless communication between the perception module and the control infrastructure. The experimental platform consisted of an IMX477-based 12.3 MP camera module, an NVIDIA Jetson Orin Nano edge-AI computer for real-time deep learning inference, and a WAGO CC100 PLC for industrial control and communication. The detailed hardware specifications are summarized in Table 2.
Table 2. Hardware specifications of the experimental platform.

4.1. Embedding Multiscale AlexNet (MS-AN) Model to a GPU-Based Integrated System

This section describes the implementation details of the hardware and software layers to embed the proposed Multiscale AlexNet (MS-AN) model as the intelligence layer. The model was initially trained in the MATLAB environment. Then it was converted into C/C++ and CUDA-compatible code by using MATLAB GPU Coder. This process enables deployment of the machine learning model on an embedded GPU platform. It allows the trained deep learning model in MATLAB environment to operate in real-time on GPU-based electronic cards within an industrial production environment.
GPU-accelerated computation plays a major role in enabling real-time performance for deep learning applications by exploiting the advantages of massive parallelism. In the proposed system, computationally intensive tasks, such as image processing and feature extraction, were executed on the GPU, while sequential operations were performed by the CPU within a hybrid computing architecture. The GPU Coder automatically generates optimized CUDA kernels from MATLAB code and minimizes data transfer overhead between CPU and GPU memory. This improves computational efficiency and serves to reduce the complexity associated with the manual CUDA programming efforts.
The trained MS-AN network and corresponding class labels were exported from MATLAB and integrated into an inference function designed for code generation. This function performs the inference stage of the network by accepting an input image, executing the forward propagation, and returning the predicted class label. Using the GPU Coder, the function and network model were compiled into a static C++/CUDA library that targets the NVIDIA Jetson platform [56,57].
The generated library was deployed on the NVIDIA Jetson Orin Nano embedded device and integrated into a standalone C++ application that performs real-time image classification. Experimental tests demonstrated that the embedded implementation can achieve a classification period of approximately 2 s per image while maintaining the classification performance that was observed in the MATLAB environment. These results demonstrate that the proposed hardware–software framework enables the efficient deployment of deep learning models on edge devices for real-time industrial visual inspection. The overall workflow of the model preparation, code generation, embedded deployment, and run-time inference stages can be summarized step by step as follows:
Step 1: Model Training
  • Train the Multiscale AlexNet (MS-AN) model in the MATLAB deep learning environment.
  • Integrate parallel convolution branches (3 × 3 and 5 × 5) for multiscale feature extraction.
  • Save trained network weights and class labels as MBalexnet.mat and classNames.mat.
Step 2: Inference Function Development
  • Implement a MATLAB inference function classifyImage().
  • Load the trained model using coder.loadDeepLearningNetwork.
  • Perform forward propagation of image data in the model and return predicted class index and probability.
Step 3: GPU Code Generation
  • Configure MATLAB GPU Coder for C++/CUDA generation.
  • Enable NVIDIA deep learning acceleration libraries (cuDNN/TensorRT).
  • Generate optimized CUDA kernels and compile a static library (MBalexnetGPU.a).
Step 4: Embedded Deployment
  • Transfer the generated static library to the NVIDIA Jetson Orin Nano platform.
  • Integrate the library into a C++ application for real-time image acquisition.
  • Link CUDA and cuDNN runtime libraries for GPU execution.
Step 5: Runtime Inference
  • Capture an image frame from the MIPI CSI-2 camera.
  • Resize input image to 227 × 227 × 3.
  • Execute GPU-accelerated inference using the MS-AN model.
  • Map predicted index to class label using stored class names.
Step 6: Output
  • Return classification result (defective/non-defective printed transformer case images).
  • Report inference time and transmit results to the production monitoring system.

4.2. ROS Node Enabling Communication Between the Camera and the IoT System Protocol

This section presents the integration process of the CUDA-optimized deep learning model, which was generated via GPU Coder, into the Robot Operating System (ROS) framework and its deployment process on the NVIDIA Jetson Orin Nano platform to enable real-time visual inspection of transformer cases. The system has a hybrid architecture that combines low-level CUDA acceleration with ROS’s modular communication infrastructure. The implementation was carried out within a standard ROS catkin workspace, where the core inference functionality was implemented in C++ and linked to the GPU-accelerated static library. The static library generation via GPU Coder was explained in the previous section.
A dedicated ROS node executes the forward propagation stage of the MS-AN model and processes images captured from the system camera in real-time. The node is launched through a ROS launch configuration and compiled with CUDA and cuDNN support in order to ensure efficient GPU utilization on the embedded device. ROS communication libraries such as roscpp, sensor_msgs, and std_msgs were used to handle image input and message transmission within the system.
During operation, the classifier node publishes prediction results as ROS messages, enabling other components in the automation pipeline to access classification outputs through subscribed topics. This design allows the inspection module to be easily integrated with external control or IoT systems within the production environment. One of the major advantages of ROS is its ability to integrate heterogeneous components and treat the entire production environment as a unified robotic system. Figure 11 illustrates the ROS-based interface displaying real-time camera input and classification output. Figure 12 presents the ROS node graph, where the classifier node publishes results to the classified label topic and communicates with other nodes through ROS messaging.
Figure 11. A screenshot from the developed ROS-based deep learning interface when displaying real-time camera input and classification output “defect” with the confidence score.
Figure 12. ROS node graph illustrating the GUI-based image classifier node publishing classification results to the /classified_label topic and its subscription via rostopic.
The implemented structure demonstrates how a GPU-accelerated deep learning model can be effectively deployed on an embedded edge platform and integrated with ROS-based industrial communication infrastructure to support real-time intelligent quality inspection tasks in Industry 4.0 production environments. Figure 13 illustrates the complete Node-RED flow architecture developed for an intelligent conveyor-based sorting system. The system integrates start/stop control logic, magazine sensor-triggered actuation, and vision-based classification outputs to manage sorting decisions in real-time. Camera-derived labels are processed through debounce filtering and classification nodes, which determine whether a product is defective or non-defective. Based on this decision, appropriate valve selection (DO3/DO4) is executed. The flow also incorporates PLC communication via Modbus, enabling synchronized control of conveyor motion, valve actuation, and system states. Additionally, manual override functionality is provided to ensure operational flexibility and fault tolerance.
Figure 13. Node-RED flow for conveyor control, vision-based sorting, valve actuation, and PLC (Modbus) integration.
Figure 14 presents the Node-RED dashboard interface designed for real-time monitoring and manual control of the sorting system. The dashboard displays key performance indicators such as total processed items, defective and non-defective counts, queue status, and overall system state. A dynamic I/O monitoring panel provides live visualization of sensor and actuator states with color-based feedback. The interface also includes a “Last Product Information” panel that summarizes the most recently classified item. Manual control components allow operators to start/stop the system, directly actuate valves, and reset counters, thereby enhancing usability, supervision, and rapid intervention capabilities.
Figure 14. Node-RED dashboard showing system status, I/O monitoring, last product info, and manual controls (start/stop, valves, reset).

5. Conclusions and Research Directions

This study illustrated an experimental study for the development of an embedded machine intelligence system for the real-time visual quality inspection of transformer casing prints. We proposed a complete hardware–software–intelligence solution that bridges the gap between high-performance and low-cost embedding deep learning models and their practical deployment in production environments, in the aspect of the Industrial 4.0 paradigm.
Firstly, a multiscale AlexNet architecture was developed to improve the training stability and performance robustness against real-world challenges of production lines, such as illumination variability, reflections, and noise. By leveraging an AlexNet-based backbone and two parallel convolutional branches with different receptive fields, the model is capable of successfully capturing both local and global features and provides an enhanced classification performance compared to the classical AlexNet model, which has single-branch architectures. The experimental results demonstrated that the proposed multiscale AlexNet architecture is an effective solution for the real-time visual product quality inspection task in the production lines. Experimental results demonstrate that the proposed model achieves improved generalization capability and high effectiveness for transformer casing printing defect inspection.
Secondly, the trained model was successfully deployed on a GPU-based embedded platform that uses the CUDA-accelerated C++ code generation. This implementation achieves near real-time product quality classification performance. Results of this experimental study reveal that the deep learning model can be effectively implemented on edge devices without relying on high-cost workstation-class hardware. In the aspect of the Industry 4.0 paradigm, intelligent production lines can be developed on the existing infrastructure by adopting the suggested hardware–software–intelligence solutions similar to the one in this study.
Beyond deep learning model development, the study highlights the feasibility of embedding machine intelligence directly into production tools. Today’s low-cost technologies allow conventional production systems to transform into autonomous and distributed intelligent production units and support the realization of decentralized industrial architectures. Such decentralized industrial architecture approaches reduce the system latencies and minimize data transmission requirements compared to the centralized intelligence that uses central servers for the computation requirements. The centralized intelligent system is vulnerable to faults and communication latencies, which may lead to halting the whole system operation.
Future works may address extending the proposed scaled hardware–software–intelligence framework toward full-scale industrial integration that covers all tasks of a factory. Thus, it enables performing the system-level optimization and collaborative operation in a wide-scale production zone. In particular, the integration of heterogeneous system components, including embedded machine learning models performing different tasks and skills, their communication and cooperation protocols, and associated collaborative automation problems, can be addressed to achieve a unified system interoperability. We observed that the ROS-based communication option can be an efficient solution for the integration and collaboration of intelligent units and the existing industrial control systems. In particular, there will be a need for the system-level optimization studies for fine-tuning critical operational parameters such as conveyor speed, actuator timing, debounce intervals, and confidence thresholds to improve robustness under varying production conditions. In such a high-complexity distributed system operation, long-term stability and reliability tests should also be conducted to evaluate operational resilience and identify potential failure scenarios.
Although the proposed inspection framework was successfully deployed on an industrial hardware platform integrating NVIDIA Jetson Orin Nano, ROS, Node-RED, PLC, and Modbus communication, the experimental evaluation was conducted under controlled operating conditions. Consequently, the robustness of the system has not yet been comprehensively assessed under long-term continuous operation or challenging industrial environments. Future work will include extensive validation under different conveyor speeds, multiple transformer case types, varying illumination conditions, mechanical vibration, camera displacement, and industrial environmental noise to further evaluate the reliability and robustness of the proposed framework. In addition, future research will investigate lightweight deep learning architectures for resource-constrained edge devices and extend the proposed system to more complex industrial scenarios, including multi-defect detection and autonomous production line management through the integration of advanced sensing technologies and adaptive control mechanisms. These developments are expected to further improve the flexibility, scalability, robustness, and industrial applicability of the proposed framework.
In conclusion, this study presents a scaled experimental work for a practical and high-performance embedded deep learning solution for real-time industrial quality inspection. By combining multi-scale deep learning, edge computing, and a scalable system architecture, the proposed framework contributes to the advancement of intelligent, energy-efficient, and Industry 4.0-compliant manufacturing systems.

Author Contributions

Conceptualization, G.K. and B.B.A.; methodology, G.K.; software, G.K.; validation, G.K.; formal analysis, G.K.; investigation, G.K.; resources, G.K.; data curation, G.K.; writing—original draft preparation, G.K. and B.B.A.; writing—review and editing, G.K. and B.B.A.; visualization, G.K.; funding acquisition, G.K. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Scientific and Technological Research Council of Türkiye (TÜBİTAK) 1001 Project [123E683].

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

During the preparation of this manuscript, the authors used OpenAI, GPT-5.5, solely for language editing and grammatical improvement. The authors carefully reviewed and revised the generated output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AIArtificial Intelligence
ARMAdvanced RISC Machine
AUCArea Under Curve
CNNConvolutional Neural Network
CPUCentral Processing Unit
CUDACompute Unified Device Architecture
cuDNNCUDA Deep Neural Network
CWTContinuous Wavelet Transform
DIDigital Input
DODigital Output
EFOEvolutionary Field Optimization
FPGAField Programmable Gate Array
GPUGraphics Processing Unit
GUIGraphical User Interface
IoTInternet of Things
MCCMatthews Correlation Coefficient
MLMachine Learning
MS-ANMultiscale AlexNet
PLCProgrammable Logic Controller
ReLURectified Linear Unit
ROIRegion of Interest
ROSRobot Operating System
SCADASupervisory Control and Data Acquisition
SVMSupport Vector Machine
TCP/IPTransmission Control Protocol/Internet Protocol
TensorRTTensor Runtime
ViTVision Transformer
YOLOYou Only Look Once

References

  1. Fuchs, C. Industry 4.0: The Digital German Ideology. TripleC 2018, 16, 280–289. [Google Scholar] [CrossRef] [Scilit]
  2. Li, G.; Hou, Y.; Wu, A. Fourth Industrial Revolution: Technological Drivers, Impacts and Coping Methods. Chin. Geogr. Sci. 2017, 27, 626–637. [Google Scholar] [CrossRef] [Scilit]
  3. Rupp, M.; Schneckenburger, M.; Merkel, M.; Börret, R.; Harrison, D.K. Industry 4.0: A Technological-Oriented Definition Based on Bibliometric Analysis and Literature Review. J. Open Innov. Technol. Mark. Complex. 2021, 7, 68. [Google Scholar] [CrossRef] [Scilit]
  4. Atzori, L.; Iera, A.; Morabito, G. A Study to Determine the Effects of Industry 4.0 Technology Components on Organizational Performance. Technol. Forecast. Soc. Change 2021, 167, 120615. [Google Scholar] [CrossRef] [Scilit]
  5. Condry, M.W.; Nelson, C.B. Using Smart Edge IoT Devices for Safer, Rapid Response with Industry IoT Control Operations. Proc. IEEE 2016, 104, 938–946. [Google Scholar] [CrossRef] [Scilit]
  6. Farooq, U.; Tariq, N.; Asim, M.; Baker, T.; Al-Shamma’a, A. Machine Learning and the Internet of Things Security: Solutions and Open Challenges. J. Parallel Distrib. Comput. 2022, 162, 89–104. [Google Scholar] [CrossRef] [Scilit]
  7. McKnight, M. IOT, Industry 4.0, Industrial IOT… Why Connected Devices Are the Future of Design. KnE Eng. 2017, 2, 197. [Google Scholar] [CrossRef] [Scilit]
  8. Munirathinam, S. Industry 4.0: Industrial Internet of Things (IIOT). Adv. Comput. 2020, 117, 129–164. [Google Scholar] [CrossRef] [Scilit]
  9. Vaidya, S.; Ambad, P.; Bhosle, S. Industry 4.0-A Glimpse. Procedia Manuf. 2018, 20, 233–238. [Google Scholar] [CrossRef] [Scilit]
  10. Wang, S.; Wan, J.; Li, D.; Zhang, C. Implementing Smart Factory of Industrie 4.0: An Outlook. Int. J. Distrib. Sens. Netw. 2016, 12, 3159805. [Google Scholar] [CrossRef] [Scilit]
  11. Albers, A.; Gladysz, B.; Pinner, T.; Butenko, V.; Stürmlinger, T. Procedure for Defining the System of Objectives in the Initial Phase of an Industry 4.0 Project Focusing on Intelligent Quality Control Systems. Procedia CIRP 2016, 52, 262–267. [Google Scholar] [CrossRef] [Scilit]
  12. Ge, Z.; Song, Z.; Ding, S.X.; Huang, B. Data Mining and Analytics in the Process Industry: The Role of Machine Learning. IEEE Access 2017, 5, 20590–20616. [Google Scholar] [CrossRef] [Scilit]
  13. Misra, N.N.; Dixit, Y.; Al-Mallahi, A.; Bhullar, M.S.; Upadhyay, R.; Martynenko, A. IoT, Big Data, and Artificial Intelligence in Agriculture and Food Industry. IEEE Internet Things J. 2022, 9, 6305–6324. [Google Scholar] [CrossRef] [Scilit]
  14. Aheleroff, S.; Xu, X.; Lu, Y.; Aristizabal, M.; Pablo Velásquez, J.; Joa, B.; Valencia, Y. IoT-Enabled Smart Appliances under Industry 4.0: A Case Study. Adv. Eng. Inform. 2020, 43, 101043. [Google Scholar] [CrossRef] [Scilit]
  15. Frank, A.G.; Dalenogare, L.S.; Ayala, N.F. Industry 4.0 Technologies: Implementation Patterns in Manufacturing Companies. Int. J. Prod. Econ. 2019, 210, 15–26. [Google Scholar] [CrossRef] [Scilit]
  16. Schütze, A.; Helwig, N.; Schneider, T. Sensors 4.0-Smart Sensors and Measurement Technology Enable Industry 4.0. J. Sens. Sens. Syst. 2018, 7, 359–371. [Google Scholar] [CrossRef] [Scilit]
  17. Rodrigues Moreira, L.F.; Moreira, R.; Travençolo, B.A.N.; Backes, A.R. Deep Learning Based Image Classification for Embedded Devices: A Systematic Review. Neurocomputing 2025, 623, 129402. [Google Scholar] [CrossRef] [Scilit]
  18. Branco, S.; Ferreira, A.G.; Cabral, J. Machine Learning in Resource-Scarce Embedded Systems, FPGAs, and End-Devices: A Survey. Electronics 2019, 8, 1289. [Google Scholar] [CrossRef] [Scilit]
  19. Ma, J.; Bevilacqua, A.; Biglari, A.; Tang, W. A Review of Embedded Machine Learning Based on Hardware, Application, and Sensing Scheme. Sensors 2023, 23, 2131. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  20. Ajani, T.S.; Imoize, A.L.; Atayero, A.A. An Overview of Machine Learning within Embedded and Mobile Devices–Optimizations and Applications. Sensors 2021, 21, 4412. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  21. Cheng, X.; Zhao, Y.; Robaei, M.; Jiang, B.; Zhao, H.; Fang, J. A Low-Cost and Energy-Efficient Noc Architecture for GPGPUs. In Proceedings of the 2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS, Cambridge, UK, 24–25 September 2019. [Google Scholar] [CrossRef] [Scilit]
  22. O’Donovan, P.; Gallagher, C.; Bruton, K.; O’Sullivan, D.T.J. A Fog Computing Industrial Cyber-Physical System for Embedded Low-Latency Machine Learning Industry 4.0 Applications. Manuf. Lett. 2018, 15, 139–142. [Google Scholar] [CrossRef] [Scilit]
  23. Noronha, D.H.; Zhao, R.; Goeders, J.; Luk, W.; Wilton, S.J.E. On-Chip FPGA Debug Instrumentation for Machine Learning Applications. In Proceedings of the FPGA 2019-Proceedings of the 2019 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, Atlanta, Georgia, 30 August–2 September 2019; pp. 110–115. [Google Scholar] [CrossRef] [Scilit]
  24. Yu, Q.; Wang, C.; Ma, X.; Li, X.; Zhou, X. A Deep Learning Prediction Process Accelerator Based FPGA. In Proceedings of the 2015 IEEE/ACM 15th International Symposium on Cluster, Cloud, and Grid Computing, Shenzhen, China, 4–7 May 2015; pp. 1159–1162. [Google Scholar] [CrossRef] [Scilit]
  25. Zhang, L.; Cheng, X.; Zhao, H.; Mohanty, S.P.; Fang, J. Exploration of System Configuration in Effective Training of CNNs on GPGPUs. In Proceedings of the 2019 IEEE International Conference on Consumer Electronics, ICCE, Las Vegas, NV, USA, 11–13 January 2019. [Google Scholar] [CrossRef] [Scilit]
  26. Li, P.; Luo, Y.; Zhang, N.; Cao, Y. HeteroSpark: A Heterogeneous CPU/GPU Spark Platform for Machine Learning Algorithms. In Proceedings of the 2015 IEEE International Conference on Networking, Architecture and Storage, NAS, Boston, MA, USA, 6–7 August 2015; pp. 347–348. [Google Scholar] [CrossRef] [Scilit]
  27. Puttero, S.; Verna, E.; Genta, G.; Galetto, M. Collaborative Robots for Quality Control: An Overview of Recent Studies and Emerging Trends. J. Intell. Manuf. 2025, 37, 1345–1381. [Google Scholar] [CrossRef] [Scilit]
  28. Al Yusuf, S. Development of PLC and SCADA Based Integrated Thermal Control System with Self/Auto-Tuning Feature. In Proceedings of the 2018 Condition Monitoring and Diagnosis (CMD), Perth, WA, Australia, 23–26 September 2018. [Google Scholar] [CrossRef] [Scilit]
  29. Fernandez, P.; Del Carpio, C.; Rocca, E.; Vinces, L. An Automatic Control System Using the S7-1200 Programmable Logic Controller for the Ethanol Rectification Process. In Proceedings of the 2018 IEEE 25th International Conference on Electronics, Electrical Engineering and Computing, INTERCON, Lima, Peru, 8–10 August 2018. [Google Scholar] [CrossRef] [Scilit]
  30. Hasan, B.; Mohani, S.S.U.H.; Hussain, S.S.; Yasin, S.; Alvi, W.A.; Saeed, O. Implementation of Supervisory Control and Data Acquisition-SCADA on a PLC and VFD Controlled Digital Mixing Plant Using TIA Portal. In Proceedings of the 2019 4th International Conference on Emerging Trends in Engineering, Sciences and Technology, ICEEST, Karachi, Pakistan, 10–11 December 2019. [Google Scholar] [CrossRef] [Scilit]
  31. Mofidul, R.B.; Sabbir, M.S.H.; Podder, A.K.; Rahman, M.S. Design and Implementation of Remote Controlling and Monitoring System for Automatic PLC Based Packaging Industry. In Proceedings of the 1st International Conference on Advances in Science, Engineering and Robotics Technology, ICASERT, Dhaka, Bangladesh, 3–5 May 2019. [Google Scholar] [CrossRef] [Scilit]
  32. Bagal, K.N.; Kadu, C.B.; Parvat, B.J.; Vikhe, P.S. PLC Based Real Time Process Control Using SCADA and MATLAB. In Proceedings of the 2018 4th International Conference on Computing, Communication Control and Automation, ICCUBEA, Pune, India, 16–18 August 2018. [Google Scholar] [CrossRef] [Scilit]
  33. Rashad, O.; Attallah, O.; Morsi, I. A Smart PLC-SCADA Framework for Monitoring Petroleum Products Terminals in Industry 4.0 via Machine Learning. Meas. Control. 2022, 55, 830–848. [Google Scholar] [CrossRef] [Scilit]
  34. Villalba-Diez, J.; Schmidt, D.; Gevers, R.; Ordieres-Meré, J.; Buchwitz, M.; Wellbrock, W. Deep Learning for Industrial Computer Vision Quality Control in the Printing Industry 4.0. Sensors 2019, 19, 3987. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  35. Mao, W.L.; Wang, C.C.; Chou, P.H.; Liu, Y.T. Automated Defect Detection for Mass-Produced Electronic Components Based on YOLO Object Detection Models. IEEE Sens. J. 2024, 24, 26877–26888. [Google Scholar] [CrossRef] [Scilit]
  36. Zhou, S.; Yao, S.; Shen, T.; Wang, Q. A Novel End-to-End Deep Learning Framework for Chip Packaging Defect Detection. Sensors 2024, 24, 5837. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  37. Liu, J.; Cai, Z.; He, K.; Huang, C.; Lin, X.; Liu, Z.; Li, Z.; Chen, M. An Efficient Printing Defect Detection Based on YOLOv5-DCN-LSK. Sensors 2024, 24, 7429. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  38. Rožanec, J.M.; Zajec, P.; Trajkova, E.; Šircelj, B.; Brecelj, B.; Novalija, I.; Dam, P.; Fortuna, B.; Mladenic, D. Towards a Comprehensive Visual Quality Inspection for Industry 4.0. IFAC-PapersOnLine 2022, 55, 690–695. [Google Scholar] [CrossRef] [Scilit]
  39. Acar, B.; Şahin, Ö. The Impact of Artificial Intelligence-Based Quality Control Systems on Production Efficiency in the Context of Industry 4.0: An Empirical Study. Adv. Artif. Intell. Res. 2025, 5, 56–65. [Google Scholar] [CrossRef] [Scilit]
  40. Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 1–9. [Google Scholar] [CrossRef] [Scilit]
  41. Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the Inception Architecture for Computer Vision. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 2818–2826. [Google Scholar] [CrossRef] [Scilit]
  42. Acikgoz, H.; Korkmaz, D. MSRConvNet: Classification of Railway Track Defects Using Multi-Scale Residual Convolutional Neural Network. Eng. Appl. Artif. Intell. 2023, 121, 105965. [Google Scholar] [CrossRef] [Scilit]
  43. Li, H.; Chen, H.; Jia, Z.; Zhang, R.; Yin, F. A Parallel Multi-Scale Time-Frequency Block Convolutional Neural Network Based on Channel Attention Module for Motor Imagery Classification. Biomed. Signal Process. Control 2023, 79, 104066. [Google Scholar] [CrossRef] [Scilit]
  44. Sun, L.; Shao, W.; Zhu, Q.; Wang, M.; Li, G.; Zhang, D. Multi-Scale Multi-Hierarchy Attention Convolutional Neural Network for Fetal Brain Extraction. Pattern Recognit. 2023, 133, 109029. [Google Scholar] [CrossRef] [Scilit]
  45. Hu, J.; Chen, Z.; Yang, M.; Zhang, R.; Cui, Y. A Multiscale Fusion Convolutional Neural Network for Plant Leaf Recognition. IEEE Signal Process. Lett. 2018, 25, 853–857. [Google Scholar] [CrossRef] [Scilit]
  46. Liu, Y.; Zhong, Y.; Qin, Q. Scene Classification Based on Multiscale Convolutional Neural Network. IEEE Trans. Geosci. Remote Sens. 2018, 56, 7109–7121. [Google Scholar] [CrossRef] [Scilit]
  47. Jiang, G.; He, H.; Yan, J.; Xie, P. Multiscale Convolutional Neural Networks for Fault Diagnosis of Wind Turbine Gearbox. IEEE Trans. Ind. Electron. 2019, 66, 3196–3207. [Google Scholar] [CrossRef] [Scilit]
  48. Haber, E.; Ruthotto, L.; Holtham, E.; Jun, S.H. Learning across Scales-Multiscale Methods for Convolution Neural Networks. Proc. AAAI Conf. Artif. Intell. 2018, 32, 3142–3148. [Google Scholar] [CrossRef] [Scilit]
  49. Yuan, Q.; Wei, Y.; Meng, X.; Shen, H.; Zhang, L. A Multiscale and Multidepth Convolutional Neural Network for Remote Sensing Imagery Pan-Sharpening. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2018, 11, 978–989. [Google Scholar] [CrossRef] [Scilit]
  50. Zhang, Y.; Yu, Y.; Yang, Z.; Liu, Q. Rolling Bearing Fault Identification with Acoustic Emission Signal Based on Variable-Pooling Multiscale Convolutional Neural Networks. Sci. Rep. 2025, 15, 15644. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  51. Bai, C.; Huang, L.; Pan, X.; Zheng, J.; Chen, S. Optimization of Deep Convolutional Neural Network for Large Scale Image Retrieval. Neurocomputing 2018, 303, 60–67. [Google Scholar] [CrossRef] [Scilit]
  52. Bao, M.; Jin, N.; Xu, M. AlexCapsNet: An Integrated Architecture for Image Classification with Background Noise. IEEE Access 2025, 13, 37690–37702. [Google Scholar] [CrossRef] [Scilit]
  53. van Noord, N.; Postma, E. Learning Scale-Variant and Scale-Invariant Features for Deep Image Classification. Pattern Recognit. 2017, 61, 583–592. [Google Scholar] [CrossRef] [Scilit]
  54. Huang, L.; Chen, C.; Yun, J.; Sun, Y.; Tian, J.; Hao, Z.; Yu, H.; Ma, H. Multi-Scale Feature Fusion Convolutional Neural Network for Indoor Small Target Detection. Front. Neurorobot. 2022, 16, 881021. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  55. Xie, S.; Girshick, R.; Dollár, P.; Tu, Z.; He, K. Aggregated Residual Transformations for Deep Neural Networks. In Proceedings of the 30th IEEE Conference on Computer Vision and Pattern Recognition, CVPR, Honolulu, Hawaii, 21–36 July 2017; pp. 5987–5995. [Google Scholar] [CrossRef] [Scilit]
  56. Mathworks MATLAB GPU Computing Support for NVIDIA CUDA Enabled GPUs-MATLAB & Simulink. Available online: https://www.mathworks.com/solutions/gpu-computing.html (accessed on 13 December 2023).
  57. Ploskas, N.; Samaras, N. GPU Programming in MATLAB; Elsevier: Amsterdam, The Netherlands, 2016; pp. 1–302. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.