# Object Tracking Algorithm Based on Multi-Layer Feature Fusion and Semantic Enhancement
## 2 Method
### Construction of Object Semantic Enhancement Model  
#### 2.1.1 Extraction of Multi-Layer Fusion Features  
The feature vectors used by TransT are extracted from the ResNet50 [23] backbone network. ResNet50 is a variant of the deep Residual Network, with a structure of 50 layers, used to solve the degradation problem in deep convolutional neural networks (CNNs), where the training set error increases as the network depth increases. The main hierarchical structure of ResNet50 is [Layer1, Layer2, Layer3, Layer4]. Through the progressive deepening from preliminary features to advanced features, it provides rich and hierarchical feature representations for the model. Due to their different levels of abstraction, features at different levels can have different application values for tracking tasks. Low-level features capture fine-grained details, whereas high-level features convey more abstract and semantic information. This hierarchical feature representation improves the model's ability to adapt to external variations in the object, such as changes in lighting, occlusion, and fast motion. At the same time, it also improves the robustness of the model in different scenarios and background conditions. From Figure 2, it can be observed that the outputs of [Layer1, Layer2, Layer3, Layer4] in ResNet50 provide continuous feature representations from low to high levels. Layer1 features contain fewer channels but can capture finer feature details such as finer edges and texture features. As the depth increases, Layer2 can capture more abstract and high-level features, and the feature map begins to display partial shape and key structural parts, and the basic composition of the object can be understood. The number and depth of channels in Layer3 are further deepened to capture more complex features and relationships. Feature maps contain higher-level abstract features, which can provide more stable feature representations for objects with significant changes, helping to  
Figure 1: The overall framework of the tracking algorithm proposed in this paper. maintain the continuous tracking of objects in complex scenes. Layer4 provides the highest level of abstract features, which are more global and semantic, helping to identify the category of the object. In object tracking tasks, the appearance of the object often undergoes significant changes across frames due to factors such as illumination variation, occlusion, and viewpoint changes. Using single-level features may result in insufficient representation capacity or poor robustness. While low-level features can capture fine details like edges and textures, they lack semantic abstraction and are prone to background interference; high-level features, on the other hand, offer strong semantic representation but often lose spatial structure and local information. Hence, integrating multi-level features allows the model to capitalize on their complementary advantages in capturing spatial details and semantic information, thereby enhancing its ability to adapt to object appearance changes and improving the stability and accuracy of tracking. Since template and search images often differ due to viewpoint changes, occlusions, or background clutter, directly combining multi-level features using concatenation or weighted averaging may introduce redundant or misleading information, causing the model to focus on incorrect regions. In contrast, the cross-attention mechanism adaptively captures corresponding regions between the template and search images based on their mutual relationships, enhancing attention to key areas while suppressing irrelevant backgrounds. This facilitates more accurate and distinctive feature integration, which in turn enhances the model's robustness and stability when dealing with complex scenarios. Therefore, this paper adopts cross-attention to fuse multi-level features. In order to balance the specificity and abstraction of features, this paper selects the outputs of Layer2 and Layer3 as the feature information for this tracking task.