## 3 CGST Codec Simulation for Processing Images
### CGST-Compressed Image Postprocessing Using Neural Networks  
To solve the problem of distorted images, one option is to use a priori knowledge about the image that is being recovered. This can be achieved using supervised machine learning methods. With enough visual data, an intelligent algorithm can restore the distorted information due to its generalizing ability. Such an approach showed excellent performance for restoring medical images that had distortions in local areas, such as noise and artifacts caused by a reduction in the sampling rate or a decrease in the patient's radiation dose [53; 54; 55; 56]. The operation time of an NN can be reduced by processing RGB channels instead of the entire image, which simplifies the data to a vector of pixel brightness values. To meet the video broadcast encoding delay requirements [57], the minimum decode delay is 133 ms at 30 fps or 160 ms at 25 fps; however, these values can be reduced to 33 ms and \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Metric**} & **Source and Received Image** & **Source and Received Image** \\  & **Comparison without Filtering** & **Comparison Using Filtering** \\ \hline MSE & 43.9445 & 37.1378 \\ MN & 76.9161 & 67.5922 \\ SSIM & 0.0381 & 0.18605 \\ CW-SSIM & 0.5075 & 0.4779 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Imagequality before and after filtering. Figure 5: Image processing: (**a**) original PNG image, (**b**) PNG image encoded with modified CGST, (**c**) PNG image encoded with modified CGTT and restored using a Gaussian low-pass filter. 40 ms with the group-of-pictures setting. In simulations, the average operating time of the extrapolation block and the encoding matrix on the receiver is 20 ms. Therefore, the NN response time should be at most 113 ms at 30 fps and 140 ms at 25 fps (13 ms at 30 fps and 20 ms at 25 fps with the group-of-pictures setting). The most commonly used NN types in image quality upgrade applications are fully connected, convolution, and recurrent. One of the most popular and effective intelligent methods for improving image quality nowadays is the application of deep convolution neural networks (CNNs) [58; 59; 60; 61]. However, even if the structure is optimized, the response time of an NN is usually too long for its implementation in real-time systems [62]. Another promising method is a CNN, which parametrizes the hyperplane in the Fourier space and has shown less estimated time and greater accuracy than traditional CNNs [63]. Each NN type works effectively with various free parameters and, therefore, with various response times. Thus, the performance of different NN types strongly depends on their settings and the number of frames per second they process. In our research, the NN structure was designed to process the RGB channel values of a CGST-compressed image in parallel and then concatenate them (Figure 6). We compared the RGB channels of an image postprocessed by a NN with those of the original image to calculate the error function and fix the total error. The performance of the NN was evaluated using the same image quality assessment metrics, which we applied after the Gaussian low-pass filter. Considering the allowable image processing time, we used fully connected NNs with three hidden layers operating simultaneously on the RGB channels, a four-layer convolutional NN, and a long-term short-term memory (LSTM) NN with three repeating layers. Additionally, we included fully connected layers in the input and output of the NNs for concatenation and decatenation, respectively. The dataset used for NN training was created from 200 images obtained through SASGIS. Out of these, 150 images were assigned to the training set, while the remaining 50 were used as the testing set. We used the Adam optimization algorithm and the StepLR learning rate control function during the training process. This function reduces the number of free parameters by a gamma with each epoch, depending on the set image processing time (with or without the group-of-pictures setting).