# A Pedestrian Detection Network Based on an Attention Mechanism and Pose Information
## 3 Methodology
### Pedestrian Recognition Network  
After generating candidate regions that may contain pedestrian objects, the proposed pedestrian recognition network optimizes the confidence scores of these candidate regions and reduces the number of false detections. We added an attention mechanism to the visual information to reduce the influence of local occlusion and background, because most false detections are caused by local occlusion or background clutter and visual descriptions are not robust to low-quality images affected by these factors. The convolutional block attention module (CBAM) [50] is an attention mechanism used in convolutional neural networks (CNNs), designed to enhance a model's ability to focus on specific regions of input data. The CBAM improves feature representation by applying attention mechanisms along both the channel and spatial dimensions, thereby enhancing the model performance. Compared with the CBAM, the original data generated by the visual feature module are input into the proposed pedestrian attention module. In the CBAM, channel attention can be applied before spatial attention (CBAM) or after spatial attention (reverse CBAM (RCBAM)); the weights in the latter are generated from the feature maps of the former. In this process, the preceding attention decorates the original input feature map, meaning that the attention mechanism following the decoration learns from the altered feature map. This affects the features learned by the subsequent attention module to a certain degree. Through experiments, we validated that this interference caused by \"sequential connection\" in pedestrian detection classification tasks can lead to instability in the effectiveness of attention modules. Therefore, we introduced an input of the original data generated by the visual feature module before the spatial attention mechanism. In addition to visual features, pose information provides crucial clues for judging pedestrian targets. Unlike visual descriptions, pedestrian pose information is composed of several key points on the human skeleton and their connections, which help to represent a pedestrian's structural information. The detection model uses the key points on the head and shoulders as the basis for judging whether the area is the targeted pedestrian body to overcome the problems that arise when local areas are blocked. Figure 3 shows that the visual feature module comprises the first twenty-two layers of ResNet50 [51] and some convolutional blocks. For each target candidate region, the size of the image is first converted to 256 \(\times\) 256, and then the image is input into the visual feature module to obtain a 128-dimensional visual feature description \(f_{p}\). For each target candidate proposal converted to 256 \(\times\) 256, the pedestrian pose module is used to obtain the corresponding pedestrian pose description. The pedestrian pose module is constructed by using an improved version of the pose estimation model OpenPose [16]. First, the first twenty-two layers of ResNet50 [51] are used to extract a visual feature map F. Second, two subnetworks are employed to predict a confidence map M and affinity field A, separately. The confidence graph represents the key points on the human skeleton, and the affinity field represents the connections between the key points. Each branch adopts an iterative prediction structure, optimizing the prediction results in successive phases. This iterative approach allows for the continuous refinement and improvement of the final pose estimation outcomes. The pose module generates a group of a confidence graph  
\(M_{1}=\rho_{1}(F)\) and an affinity field \(A_{1}=\varphi_{1}(F)\). \(\rho_{1}\) and \(\varphi_{1}\) are composed of three \(3\times 3\) and two \(1\times 1\) convolution layers, respectively.