## 5 Experiments and Results
### Multi-Person Pose Estimation and Tracking
#### 5.1.2 Inference  
During the inference stage, we first employ detection models integrated with our feature sampling and aggregation modules, as described in Section 3.1, to predict bounding boxes around each person instance. By default, we utilize Cascade R-CNN with ResNet-101 DCN as our baseline detector. Subsequently, the deconvolution head network [26] is used to predict the body joint landmarks within each bounding box. Similar to previous work [7], we discard low-confidence and potentially incorrect detections to prevent track drifting and reduce false positives. This approach may slightly decrease the mAP score for pose estimation but improve the MOTA score for pose tracking. We set thresholds for bounding box detections at 0.5 and keypoints at 0.4. We then employ a greedy matching algorithm to compute the similarity between bounding boxes and landmarks across nearby frames for each instance. A cost matrix is generated using an ensemble cost metric based on the bounding box overlap cost criterion (\(\omega_{1}=0.9\)), and pose similarity (\(\omega_{2}=0.1\)), which calculates the bodyjoint landmarks distance between two instances using the head-normalized probability of correct keypoint metric (PCKh) [41]. The matching process starts with the highest confidence match and iteratively selects the most suitable edge in the cost matrix, removing the two connected nodes from consideration. This process of associating detected boxes and keypoints with previous frames is repeated from the first to the last frame of the given video.  
Additional details regarding our inference process are presented in Algorithm 1. Given a video comprising consecutive frames and a specified sampling and aggregation range S, our feature sampling and aggregation modules sequentially process each supporting frame. To address GPU memory constraints, we utilize N to represent the number of supporting frames preceding the reference frame and S supporting frames following it. Initially, the feature extraction network is employed to process the initial S supporting frames, and their corresponding features are cached in memory (L1-L3 in Algorithm 1). Subsequently, our model iterates over all frames in the video to conduct person detection while concurrently updating the feature cache with new information. For each reference frame, denoted as t, the relevant feature information from the supporting frames is sampled, and their adaptive weights are computed (L4-L8). The newly sampled features are then aggregated and forwarded to the detection network for person detection, with the feature map of the (t + k)-th frame being added to the memory cache (L9-L12). Finally, a non-maximum suppression (NMS) post-processing step is applied, utilizing a threshold of 0.4 to eliminate redundant bounding boxes based on a cost criterion.  
```
1:route:
2:rotor t = 0 to S do
3:
4:for t = 0 to \(\infty\)do
5:for t + k = max (0, t - S) t + S do
6:\(\mathrm{F}_{\mathrm{t}},\mathrm{F}_{\mathrm{t}+k}^{\mathrm{e}}=\mathrm{E}\big{(} \mathrm{F}_{\mathrm{t}},\mathrm{F}_{\mathrm{t}+k}\big{)}\)
7:\(\omega_{\mathrm{t}+k}=\exp\bigg{(}\frac{\mathrm{F}_{\mathrm{t}},\mathrm{F}_{ \mathrm{t}+k}}{|\mathrm{F}_{\mathrm{t}}||\mathrm{F}_{\mathrm{t}+k}|}\bigg{)}\)
8:end for
9:\(\overline{\mathrm{U}}_{\mathrm{t}}=\sum_{\mathrm{s}=-\infty}^{\infty}\omega_{ \mathrm{t}+k}\cdot\mathrm{U}_{\mathrm{t}+k}\)
10:\(\mathrm{p}_{\mathrm{t}}=\mathcal{N}_{\mathrm{det}}(\overline{\mathrm{U}}_{ \mathrm{t}})\)
11:\(\mathrm{F}_{\mathrm{t}+k}=\mathcal{N}_{\mathrm{feat}}(\mathrm{I}_{\mathrm{t}+k})\)
12: end for
13: Ensure:
13:output: person detection results: \(\{\mathrm{p}_{\mathrm{t}}\}\)
```  
**Algorithm 1** Inference algorithm of spatiotemporal sampling module