## 2 Method  
The overall structure of MLGW-VIS network includes two stages: feature extraction and post-processing. As shown in Figure 1, in the feature extraction stage, we set frame \(t\) and frame \(t+\mu\) of the current video are input into the ResNet50 [36] backbone network to extract semantic features C1, C2, C3, C4, C5, respectively. Then, FPN is used to perform top-down upsampling and addition operation to fuse high-level and low-level features to obtain feature maps with multi-scale semantic information P3, P4, P5. Aiming at the lack of spatial location information of high-level semantic features in FPN, a multi-scale positioning feature pyramid is proposed. The FPN high-level features not only have rich semantic information, but also obtain more spatial location information to locate the object.  
P3, P4, and P5 receive the output features F3, F4, F5 of the multi-scale localization feature pyramid after supplementing the spatial location information by the spatial information refinement module. The features P6, P7 are obtained after two-time downsampling. In the post-processing stage, the multi-scale positioning feature pyramid output features F3, F4, F5, P6, P7 generate prediction heads, respectively, and use F3, F4, F5 for upsampling and additional operation to generate mask features. Then, the relative position matrix and mask features are spliced and sent to the mask head dynamic convolution. Among them, the mask dynamic convolution structure is controlled by the adjusting head as a variable matrix, and finally the mask dynamic convolution outputs the instance mask. Instance masks are divided into static instance masks and dynamic instance masks. In the mask generation part in Figure 1, the solid line represents the static instance mask, the dotted line represents the dynamic instance mask obtained by cross-learning, the red represents the mask generation process of the frame \(t\), and the blue represents the mask generation process of the \(t+\mu\) frame image. The process of generating static instance masks for frames \(t+\mu\) and \(t\) can be expressed as follows:  
\[M_{x,y}(t)=MaskHead(\hat{F}_{x,y}(t);\theta_{x,y}(t)) \tag{1}\]  
\[M_{x^{\prime},y^{\prime}}(t+\mu)=MaskHead(\hat{F}_{x^{\prime},y^{\prime}}(t+ \mu);\theta_{x^{\prime},y^{\prime}}(t+\mu)) \tag{2}\]  
The dynamic instance mask generation process obtained by cross-learning the \(t\) frame and the \(t+\mu\) frame can be expressed as follows:  
\[M_{x,y}^{\times}(t)=MaskHead(\hat{F}_{x,y}(t);\theta_{x^{\prime},y^{\prime}}( t+\mu)) \tag{3}\]  
\[M_{x^{\prime},y^{\prime}}^{\times}(t+\mu)=MaskHead(\hat{F}_{x^{\prime},y^{ \prime}}(t+\mu);\theta_{x,y}(t)) \tag{4}\]  
In the above equations, \(MaskHead\) represents the mask dynamic convolution, which takes the mask feature as input to generate the prediction mask after it is located in the mask  
Figure 1: The overall working pipeline of MLGW-VIS.  
branch. As shown in Figure 1, the output features of FPN F3, F4, F5, P6, and P7 are used as the input of shared heads such as classification head, regression head, center position head, and adjustment head. The dynamic convolution structure of the mask is changed by adjusting the parameters of the head so that different convolution layers are generated with the change in parameters. The mask dynamic convolution is used to generate appropriate mask structures for different frames of each video, and the mask features are input into the mask dynamic convolution to generate the prediction mask. Compared with the fixed mask convolution layer, the segmentation accuracy is greatly improved.