## 3 Materials and Methods
### Upscaling Performance  
As discussed, there are various interpolation-based approaches that can be used for frame-by-frame video upscaling. The performances of four interpolation-based upscaling approaches along with the ground truth and the super-resolution image obtained by our implementation of GLEAN are provided in Figure 4. The results are provided for a single frame from a surveillance video belonging to the \"fighting\" class. Nearest neighbor and bilinear interpolation are the simplest and fastest methods to upscale an image but create the lowest-quality results. The difference between them is that bilinear interpolation provides a smoother image by using blurring, whereas nearest neighbor provides a boxing effect, and the choice of which one to use mainly depends on the intended application. Lanczos and bicubic are the next level of quality for upscaling and involve greater computational complexity. Lanczos has better detail preservation and a sharper appearance, while bicubic interpolation provides a smoother appearance. Because the targeted scenario for super resolution involves videos with a large number of frames, we use bicubic interpolation (Equation (3)) to upscale the video, which allows for a thorough comparison to the super-resolution videos.  
\[I^{\prime}(x^{\prime},y^{\prime})=\sum_{i=-1}^{2}\sum_{j=-1}^{2}I(x+i,y+j)\cdot K (x^{\prime}-x+i)\cdot K(y^{\prime}-y+j) \tag{3}\]  
A super-resolution image produced using the modified GLEAN model is of much higher quality compared to its counterparts in terms of preservation of details and reconstruction of the structure. The modified GLEAN model includes improved architectural features and training strategies that allow for more effective detail preservation during the upscaling process. This entails a more sophisticated latent space representation or a fine-tuned generator network, which allow the model to capture and reproduce intricate details in the low-resolution input. The modified GLEAN model's superior quality of super-resolution images results from its advanced architecture and training strategies, which enable effective preservation of details and accurate reconstruction of complex structures when compared to other methods. To extract \(f_{i}\) features (Equations (4) and (5)) from a low-resolution image, we employed \(E_{i}\) sequence operations followed by Convolutional layers and fully connected layers to generate a matrix C of representative features.  
\[f_{i}=E_{i}(f_{i-1}),\text{ for }i\in\{1,\dots,N\} \tag{4}\]  
\[C=E_{N+1}(f_{N}) \tag{5}\]  
Moreover, it is evident from Figure 4 that a super-resolution image has higher overall contrast as compared to the ground truth image, which is due to the use of the latent feature bank containing a pre-trained StyleGAN.  
Figure 4: Video frame upscaling results for fighting scene.  
Algorithms 1 and 2 are simplified pseudocode of the proposed \"TempoFuseNet\", with a focus on video super resolution using the modified GLEAN framework and anomaly classification using the two-stream architecture. This pseudocode is intended to provide an algorithmic and high-level representation of anomaly classification for real-world scenarios in 5G and IoT environments.  
```
Data: low_resolution_video Result: super_resolved_video
1 GLEAN_model = initialize_GLEAN_with_StyleGAN(); foreachframe in low_resolution_video do
2 super_resolved_frame = GLEAN_model.forward_pass(frame);
3 Save super_resolved_frame; return super_resolved_video;
```  
**Algorithm 1**Video Super Resolution with GLEAN