# A New Multi-Person Pose Estimation Method Using the Partitioned CenterPose Network
## 4 Partitioned CenterPose Network
### Training and Inference  
_Training._ An improved \(l_{1}\) loss was designed for the PCP Network to better train the system to identify the offset between the joint and part center. As shown in Figure 4, the lengths of the offset vectors in the head part are short, but the structures of the offset vectors in different people are relatively similar. Thus, enhancing the weight of offset length in the loss function allows the network to understand small differences in head structure more accurately. Conversely, the offset vectors of the limbs of different people differ more in terms of angle while the lengths tend to be quite similar. Accordingly, based on the \(l_{1}\) loss, we designed two different loss functions for the offset vector in the head and in the limbs:  
\[L_{off}^{head}=\frac{1}{N}\sum_{i}^{N}\biggl{(}||\overset{\rightarrow}{O}_{ i}-\overset{\rightarrow}{O^{\prime}}_{i}||_{1}+0.5||\overset{\rightarrow}{O}_{i}- \overset{\rightarrow}{O^{\prime}}_{i}||_{2}\biggr{)} \tag{3}\]  
\[()()L_{off}^{limb}=\frac{1}{N}\sum_{i}^{N}\Biggl{(}||\overset{\rightarrow}{O}_{ i}-\overset{\rightarrow}{O^{\prime}}_{i}||_{1}+\left|arctan\frac{\overset{ \rightarrow}{O}_{i}}{||\overset{\rightarrow}{O}_{i}||_{2}}-arctan\frac{ \overset{\rightarrow}{O^{\prime}}_{i}}{||\overset{\rightarrow}{O^{\prime}} _{i}||_{2}}\right|\Biggr{)} \tag{4}\]  
where \(\overset{\rightarrow}{O}\) is the predicted offset vector and \(\overset{\rightarrow}{O^{\prime}}\) is the corresponding ground truth. \(N\) is the number of body joints in the body part. \(|\cdot|\) is the absolute value, and \(||\cdot||_{1}\) and \(||\cdot||_{2}\) are the \(l_{1}\)-norm and \(l_{2}\)-norm, respectively. In Section 5.4, we discuss an ablation experiment to demonstrate the effect of the improved \(l_{1}\) loss. The total loss of the improved \(l_{1}\) loss is shown below:  
\[L=L_{bct}+\alpha L_{bsize}+L_{off}^{pet}+L_{off}^{pj}+L_{bj} \tag{5}\]  
\[L_{off}^{pct}=L_{off}^{limb} \tag{6}\]  
\[L_{off}^{pj}=\left(L_{off}^{head}+4*L_{off}^{limb}\right)/5 \tag{7}\]  
where \(L_{bct}\) and \(L_{bj}\) denote the focal losses [29], which are used to train the network to detect the body center and body joint heatmaps, respectively. The focal loss is defined as:  
\[L_{focal}=\frac{-1}{N}\sum_{n}\Biggl{\{} \begin{array}{ll}\left(1-\hat{H}_{p} \right)^{\beta}\log\bigl{(}\hat{H}_{p}\bigr{)}&\text{if }H_{p}=1\\ \left(1-H_{p}\right)^{\gamma}\bigl{(}\hat{H}_{p}\bigr{)}^{\beta}\log\bigl{(}1 -\hat{H}_{p}\bigr{)}&\text{otherwise}\end{array}  \tag{8}\]  
where \(\beta\) and \(\gamma\) are hyper-parameters used to reduce the imbalance between an easy example and a hard example. \(H_{p}\) is the ground truth heatmap and \(\hat{H}_{p}\) is the heatmap of \(p^{k}\). Following [28], \(\beta\) is set to 2 and \(\gamma\) is set to 4. \(L_{bsize}\) is the \(l_{1}\) loss [30] used to regress the size of the bounding box. \(L_{off}^{pet}\) is the loss function used to train the offset between the part center and body center, while \(L_{off}^{pj}\) is the loss function used to train the offset between the joint and part center. \(\alpha\) is a constant weight parameter that is set to 0.1. _Inference._ Following PPR, we group the detected keypoints by offset vector. Given a test image of width \(W\) and height \(H\), the outputs of the PCP Network include a body center heatmap \(H_{bc}\in R^{W\times H\times 1}\), bounding box maps \(H_{bb}\in R^{W\times H\times 2}\), offset maps \(H_{off}\in R^{W\times H\times 34}\), joint heatmaps \(H_{bj}\in R^{W\times H\times 17}\). We first choose the top \(N_{\eta}\) high-confidence instances of people (100 was used in our implementation) and extract their body centers \(\left(\hat{x}_{0}^{k},\hat{y}_{0}^{k}\right)\) from \(H_{bc}\).