# PEE: Prior-Enhanced and Resolution-Extended Object Detection for Industrial Laminated Panel Scenes
## 3 Materials and Methods
### Multi-Class Perceptual Prior Enhanced Networks
During the update phase, prior information is regarded as edges within the scene graph, while objects are seen as nodes. We first define a basic block, which consists of two parts:  
\[F_{fuse}=f_{1}\cdot H, \tag{2}\]  
where \(f_{1}\) represents the feature map generated by the main branch of MRPE and \(H\) is the output of the auxiliary branch. Then, \(F_{fuse}\) is attached through a simple dot product of two feature maps. \(f_{1}\) can be formulated as:  
\[f_{1}=X\cdot\big{(}F_{mrpe}(FC(X))\big{)}, \tag{3}\]  
where \(X\) represents the original features, and \(FC\) represents the fully connected layer. A fully connected layer (FC) is a layer where each input is connected to every output. It computes a weighted sum of inputs, followed by an activation function, and is typically used in the final stages of a neural network to make decisions or classifications based on the learned features. \(F_{mrpe}\) represents the excitation function we designed in this module, which implements the learning of nonlinear relations of the network by improving the activation function of SiLU [42]. The result of the main branch, \(f_{1}\), is generated through these steps. Another process is carried out in the meanwhile, with the following formulation:\[H=\text{F}_{\text{graph}}(X,A), \tag{4}\]  
where \(X\) is the initial feature map, and \(F_{graph}\) is the prior enhancement function, which is achieved with the scene graph, and \(A\) is the adjusted matrix in the GNN [43]. The inner function of the GNN module can be formulated as the following equations:  
\[A=[\alpha_{uv}] \tag{5}\]  
\[\alpha_{uv}=\text{softmax}_{u}\Big{(}\text{SiLU}\Big{(}a^{T}[Wh_{u}\|Wh_{v}] \Big{)}\Big{)}, \tag{6}\]  
\[m_{v}=\sum_{u\in\mathcal{N}(v)}\alpha_{uv}Wh_{u}, \tag{7}\]  
\[h^{\prime}_{v}=\sigma\big{(}W^{\prime}[h_{v}\|m_{v}]+b^{\prime}\big{)} \tag{8}\]  
Equations (5)-(8) represent the matrix generation, weight generation, message calculation, and feature update modules within the GNN network, respectively. In Equation (5), the adjusted adjacency matrix \(A\) is defined, which encodes the relationships between nodes in the scene graph. This matrix \(A\) contains elements \(A_{uv}\) that represent the similarity or dependency between nodes \(u\) and \(v\), and it is used for information propagation in the subsequent GNN steps. In Equation (6), the attention score \(\alpha_{uv}\) between nodes \(u\) and \(v\) is computed. First, the feature vectors \(h_{u}\) and \(h_{v}\) of the two nodes are combined using a weighted operation with a weight matrix \(W\). This combined result is then passed through a non-linear activation function, such as SiLU, to obtain a transformed feature representation. The softmax function is applied to normalize the attention scores for all of node \(u\)'s neighbors, indicating how much importance should be given to each neighboring node in the information propagation. Next, Equation (7) calculates the message \(m_{v}\) for node \(v\) by aggregating information from its neighbors. The attention scores \(\alpha_{uv}\) calculated in the previous step are used to weight the feature vectors of neighboring nodes \(u\). These weighted feature vectors are summed to produce the message \(m_{v}\) that node \(v\) will receive from its neighbors, thus aggregating important information for the update process. Finally, in Equation (8), the updated feature vector \(h^{\prime}_{v}\) for node \(v\) is computed by combining its original feature \(h_{v}\) with the aggregated message \(m_{v}\) This combined feature vector is then passed through a linear transformation using a weight matrix \(W^{\prime}\) and a bias term \(b^{\prime}\), followed by an activation function like ReLU. This results in the updated feature vector, which captures both the local features of the node and the global context provided by its neighbors, much like a forward propagation step in traditional neural networks.