## 3 Materials and Methods
### Data Acquisition for Video Inpainting and SR  
The performance of the neural network relies on reliable datasets. However, the property of the model is limited by the lack of datasets for video inpainting. To solve this problem, we need to build artificial video datasets with good diversity. The videos in our datasets should be in multiple scenes to ensure that the network will not be overfitted. In addition, the videos for the inpainting task should have the following characteristics: the masks should be different in size and shape to ensure that the network is able to handle a variety of masks rather than just one type. Secondly, the masks should be moving rather than static, and the moving track should be random.  
Following the above principles, we collect 340 suitable videos for training from three datasets, UCF101 [48], MOT16 [49], and FCVID [50]. The datasets we build are rich in diversity, containing outdoor and indoor videos, sports and landscape videos, videos with and without camera motion, and with other difference characteristic. From these videos, we extract 937 clips, and each clip contains 32 frames with a 160 \(\times\) 240 resolution as complete videos.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**D** & **Type** & **Kernel** & **Stride** & **Channel** & **BN** \\ \hline
1 & Input & - & - & 3 & - \\
2 & Conv & 3 & 1 & 16 & N \\
3 & Conv & 3 & 2 & 16 & Y \\
4 & Conv & 3 & 1 & 32 & Y \\
5 & Conv & 3 & 2 & 32 & Y \\
6 & Conv & 3 & 1 & 64 & Y \\
7 & Conv & 3 & 2 & 64 & Y \\
8 & Conv & 3 & 1 & 128 & Y \\
9 & Conv & 3 & 2 & 128 & Y \\
10 & Flatten & - & - & 614,400 & - \\
11 & Linear & - & - & 1024 & - \\ \hline \hline \end{tabular}
\end{table}
Table 4: The details of discriminator network architecture.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**R** & **Type** &
\begin{tabular}{c} **Connected** \\ **with** \\ \end{tabular} & **Kernel** & **Stride** & **Channel** \\ \hline
1 & Input & Encoder-1 & - & - & 9 \\
2 & Conv & - & 3 & 2 & 32 \\
3 & Conv & - & 3 & 2 & 64 \\
4 & Conv & - & 3 & 2 & 128 \\
5 & Conv & - & 3 & 2 & 256 \\
6 & Conv & 5 & 3 & 1 & 256 \\
7 & RConv & 4 & 3 & 2 & 1  
During the training course of the video SR task, the complete videos acquired above can be directly adopted as ground truth datasets, while they are treated as low-resolution input by conducting downsampling. Moreover, we adopt BSD100 [51] and Urban100 [50] as the test datasets for the SR task.  
For the video inpainting task, we need to simulate the various shapes of the holes in the video by selecting some suitable video segmentation labels from the A2D datasets and moving them randomly to synthesize the hole mask sequence. As a result, the hole mask sequences are stochastic, regardless of shape, size, or motion tendency. Furthermore, in some sequences, there are even two or more holes. We synthesize the incomplete video using the video clips and the mask sequences; the pixels in the video are constrained between 0 and 1 and the pixels in the hole are set to 1. Finally, we generate 937 videos, of which 900 are for training and the rest are for testing. Some examples of collected masks, synthetic mask sequences, and videos are shown in Figure 1. Based on these datasets, it is possible to train a neural network using a supervised method and to quantificationally compare the inpainting results with other algorithms.