# Digital-Twin-Based Monitoring System for Slab Production Process
## 3 The Proposed System
### Defect Detection Module  
#### 3.2.1 Overall Structure  
As illustrated in Figure 2, the defect identification network is composed of two main components: the backbone and the head. The backbone is responsible for feature extraction, while the head is employed for prediction. The input images undergo preprocessing to align them into RGB images of size 640 \(\times\) 640. These processed images are then fed into the backbone network. Based on the three-layer output from the backbone network, the head layer continues to produce three layers of feature maps with different sizes. Through RepVGG blocks, the network performs predictions for three tasks related to image detection, including classification, foreground-background classification, and bounding box prediction, ultimately generating the final results. Inspired by the YOLOv7 model, model reparameterization is introduced into the network architecture, and a multi-branch network is adopted to enhance feature extraction [41]. An attention unit is incorporated into the model to effectively extract subtle features that are challenging to identify. The introduction of the REPVGG module (as shown in Figure 3) strengthens the network's ability to extract crucial features [42]. The defect recognition network can efficiently perform target detection while reducing computational costs. Among the model's components, CBS combines convolutional layers, Batch Normalization layers, and the SiLU activation function to enhance the model's learning capability. By introducing cross connections between specific layers, CBS effectively alleviates the training difficulty of deep networks. CBS is a crucial component in the recognition network, achieving partial replication of features and enabling better extraction of feature information through the network. This helps to avoid the vanishing gradient problem in deep networks, ultimately enhancing the overall performance of the model. Figure 2: Defect identification module. The convolutional layer (Conv) is one of the core components in deep learning. It extracts image features by applying convolutional kernels to the input. In the defect recognition model, convolutional layers are used to progressively extract and combine abstract features of the image, enabling the model to better understand and represent the input image [7]. Batch Normalization (BN) is a regularization method that normalizes each feature within each training batch, accelerating the network's convergence and enhancing model stability. It helps to ensure that the model learns and adapts better to different input data during training. SiLU, also known as the Sigmoid Linear Unit, is an improved version of the Sigmoid activation function. Compared to traditional activation functions, SiLU exhibits better properties, aiding in mitigating the vanishing gradient problem and speeding up model convergence during training. Its non-linear characteristics help capture complex relationships in input data, thereby enhancing the model's expressive power. MAXpool, or the max-pooling layer, is used for down sampling by selecting the maximum value within each region of the input image, thereby reducing the size of the feature map. This helps extract critical information from the image while reducing the computational burden. Max-pooling gradually reduces the size of the feature map, allowing the model to speed up computations while retaining essential information. Average pooling (Avgpool) is a pooling operation used to decrease the dimensions of the feature map. In average pooling, the average value within each pooling window is computed to generate the next layer's feature map. Diminishing dimensions during feature extraction contribute to the model's computational efficiency and robustness to the target, additionally aiding in reducing the risk of overfitting. ReLU is an activation function employed in each neuron of a neural network.