## 3 The Proposed Approach
### Improved TSM for Behavior Recognition  
Considering the particularities of a ship's bridge, this research improves the TSM model, as depicted in Figure 2. The process involves several stages: random sampling, feature extraction, feature augmentation, and classification. Firstly, videos are divided into multiple segments at the random sampling layer, where one frame is randomly selected from each segment to serve as the pre-input for the model. These sample frames then undergo pre-processing using various image enhancement techniques, such as padding, random cropping, and flipping, etc. This pre-processing step helps maintain relevant feature information, while reducing noise and improving the model's convergence rate. In the feature extraction layer, the EfficientNet-B3 network is employed as the core feature extraction module. Due to its reduced parameter count, it significantly reduces the computational costs, while enhancing recognition performance. After obtaining the final feature map, we introduce a feature enhancement layer that models the feature map in two dimensions, using the CA module. This allows the network to simultaneously extract internal potential connections in regard to both channel and spatial dimensions. Finally, the feature map is classified using a fully connected layer acting as a classifier. The fused final category score is determined by uniformly averaging the outputs of a set of frames through consensus. The consensus mechanism plays a pivotal role in this framework. Given that the model processes multiple frames sampled from video segments, their respective outputs may exhibit slight variations. To achieve robust result aggregation, the proposed method employs consensus-based averaging of classification scores across all the frame outputs. This critical processing stage effectively utilizes the inherent redundancy in multi-frame information to mitigate individual frame prediction errors, thereby generating more stable and accurate fused category scores. Table 1 outlines the structural parameters of the behavior recognition network, with each row describing a stage i containing \(\text{L}_{\text{i}}\) layers, input resolution \(\text{H}_{\text{i}}*\text{W}_{\text{i}}\), and output channels \(\text{C}_{\text{i}}\). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Stage** & **Operator** & **Resolution** & **Channels** & **Layers** \\
**i** & \(\text{F}_{\text{i}}\) & \(\text{H}_{\text{i}}*\text{W}_{\text{i}}\) & \(\text{C}_{\text{i}}\) & \(\text{L}_{\text{i}}\) \\ \hline
1 & Conv3 \(\times\) 3 & \(448\times 448\) & 32 & 1 \\
2 & MBConv1, k3 \(\times\) 3 & \(224\times 224\) & 16 & 2 \\
3 & MBConv6, k3 \(\times\) 3 & \(224\times 224\) & 24 & 3 \\
4 & MBConv6, k5 \(\times\) 5 & \(112\times 112\) & 40 & 3 \\
5 & MBConv6, k3 \(\times\) 3 & \(56\times 56\) & 80 & 4 \\
6 & MBConv6, k5 \(\times\) 5 & \(28\times 28\) & 112 & 4 \\
7 & MBConv6, k5 \(\times\) 5 & \(28\times 28\) & 192 & 5 \\
8 & MBConv6, k3 \(\times\) 3 & \(14\times 14\) & 320 & 2 \\
9 & Conv1 \(\times\) 1 & \(14\times 14\) & 1280 & 1 \\
10 & CA\_Block & \(14\times 14\) & 1280 & 1 \\
11 & Pooling\&FC & \(14\times 14\) & 7 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The backbone network. Figure 2: The network structure of an improved target behavior recognition module. In regard to the classical TSM, random cropping is employed to augment the training samples. Nonetheless, the bridge images typically have a rectangular shape and are essentially consistent with the characters. A direct random crop of the source image will remove the majority of the character information. The robustness of the model will suffer if random cropping is not applied. In order to guarantee data randomization and prevent the loss of significant image features, we fill the image grayscale according to a 1:1 ratio, before random cropping. Similarly, we apply an expansion coefficient and first enlarge the target box, before intercepting it when capturing the target image from the original video frame, after the target tracking stage.