# Pose Tracking and Object Reconstruction Based on Occlusion Relationships in Complex Environments
## 2 Methods
### Key-Frame Pool Strategy Based on Dual-Layer Mask
#### 2.2.2 Key-Frame Pool  
In our approach, we use a key-frame pool to store historical information, as opposed to relying on a merged global model, which helps to reduce drift in long-term tasks [12]. The key idea behind the creation of the key-frame pool is to preserve observations of the target object from different viewpoints as comprehensively as possible. This allows for a more sparse allocation of memory frames in space, while still maintaining a sufficient level of multi-view consistency. However, under this strategy, the system tends to prioritize earlier observations and discard later ones from the same viewpoint, regardless of frame quality. This poses a risk for tracking in complex scenes. To address this issue, we introduce a dynamic memory pool, which retains a subset of historical frames for subsequent optimization and error correction. Additionally, we propose a more universally applicable maintenance strategy to ensure robustness across different scenarios. The principle guiding the update of the key-frame pool is to capture as much object appearance information as possible while maintaining frame storage sparsity. The pose of the current frame, denoted as \(\xi_{t}\), is updated accordingly. If the updated frame can maintain consistency with other historical frames in the pool and provides information not currently present, it is added to the key-frame pool. This newly added frame will then be involved in subsequent optimization processes and the learning of neural object fields. In scenarios where long-term frequent occlusion occurs, maintaining a compact and accurate key-frame pool is essential for ensuring robustness against interference. To achieve this, we propose a key-frame pool maintenance strategy based on occlusion relationships, as outlined in Algorithm 1. The process starts with adding the first frame \(F_{0}\) by default, which serves to establish a reference coordinate system for the new object. The next 10 frames are also added directly to the key-frame pool, allowing for a rapid understanding of the target object's appearance. After this initialization phase, each new incoming frame undergoes a coarse pose estimation and is subject to graph optimization with historically stored frames that share co-visibility relationships. This step updates the initial pose of the new frame. More specifically, the pose \(\xi_{t}\) of the current frame is compared to the poses of existing frames in the key-frame pool. First, the optimization error function ensures that adding the new frame will not disrupt the consistency of the pool. Then, if the current frame provides observations from a new viewpoint or reveals previously occluded regions, it is added to the key-frame pool. For planar objects, rotations around the camera's optical axis do not yield new information and are thus ignored. This strategy helps distribute key frames more sparsely in space while preserving the essential multi-view consistency information. ```
0: Current frame \(F_{t}\), Frame pool \(\mathcal{P}\). 0: Updated frame pool \(\mathcal{P}\). 1. Initialize frame pool \(\mathcal{P}\) with first frame \(F_{0}\) and set its canonical coordinate system. 2. Compare \(F_{i}\) with frames in \(\mathcal{P}\) to update its initial pose \(\lambda_{t}\). 3.if observation of \(F_{t}\) comes from a new viewpoint or sees previously occluded areas then
4. Add \(F_{t}\) to \(\mathcal{P}\). 5.endif
6.if occlusion relationship of \(F_{t}\) changes then
7.if foreground occlusion area of \(F_{t}\) isses than theast frame or the nearest key-frame then
8. Add \(F_{t}\) to \(\mathcal{P}\). 9. Replace frame in \(P\) that has the same angle as \(F_{t}\) but aarger foreground occlusion area with \(F_{t}\). 10.endif
11.endif
```  
**Algorithm 1** **Self-Adaption Key-Frame Pool Maintenance Strategy**When the occlusion relationships of the current frame \(F_{t}\) change, the system employs an adaptive strategy upgrade.