Your browser is not supported. Please update it.

21 May 2020

NAB: MediaKind shows off Hybrid GAN 3-Fields UHD upscaling

It wouldn’t be a tradeshow without mention of machine learning (ML) and artificial intelligence (AI), and their potential transformative impact on the industry. In this instance, MediaKind’s Tony Jones was presenting a recent paper on the subject of using ML to upscale content to UHD – an ability that would have massive bandwidth saving potential.

Jones pointed out that UHD services have the same problem that faced services in the early days of ATSC – a lack of genuine UHD content. So, MediaKind wanted to know if you could solve this shortage by using ML techniques, to turn 1080i or 720p video into something that ticks the correct UHD boxes – at least in terms of resolution, as the arguments about HDR, bitrate, and even audio could rage for days.

The core technology is Generative Adversarial Networks (GAN), which were invented in 2014. They essentially pit two Convolutional Neural Networks (CNN) against each other, with one trying to solve a problem and the other trying to detect whether the proposed solution was generated ‘naturally’ or ‘synthetically.’ GANs can enable unsupervised learning, meaning that you don’t need humans on overwatch all the time, as well as reinforcement learning, to refine and improve the eventual model created.

Jones explained how MediaKind started out with CNNs, and later evolved to the GAN approach. To begin with, MediaKind’s Naïve CNNs are trained using a library of 800 images, from the Div 2K image library, which measure 3840×2160. Patches of the images, measuring 128×128 pixels, are taken, and then down-sampled to 1920×1080, and then fed into the CNN – to return to the ‘native’ resolution that the patch would have in the original 3840×2160 image.

By giving the CNN feedback, telling it when it has successfully upscaled the patch image, the model is trained to handle these patches in such a fashion that it can then handle full 1920×1080 images. The success is measured by comparing the source image with what the CNN reaches through upscaling, measuring the Mean Square Error, which in turn provides pass/fail feedback for the GNN training.

This then lays the groundwork to feed the source video into the CNN, and then outputs a video file in 2160p resolution – something that, to all intents and purposes, appears to be UHD to the end user.

Jones explained that while the process does work, one of the issues at hand is because a lot of content has a significant amount of image or video data where nothing much changes in the picture. This GNN technique tends to lead to a very soft up-conversion – which is much the same as the bicubic filters used to upscale video in the conventional non-ML fashion.

This is not what MediaKind wanted to achieve, and so it turned its attention to Generative Adversarial Networks (GAN), which were first explored in this upscaling use case back in 2017. Broadly, you are pitting two neural networks against each other, hence the ‘adversarial’ part of the name, with the goal of using the Generator CNN (G) to create an image that will successfully fool the Discriminator CNN (D) into thinking it is a native image, and not one that has been upscaled.

If the image gets past D, this becomes the feedback that improves G, which should then make G better at future attempts to beat D – although the D is also marking a degree of confidence, which it uses to get better at spotting the fakes.

Once you have sufficiently trained the neural network, you no longer need the D, and can use G by itself. However, Jones notes that while the GAN approach does succeed in ‘inventing new data,’ providing higher quality upscaling than the aforementioned Naïve CNN approach, it can go too far – and create data in the image where you didn’t want it to.

So, the solution to that problem is to combine the two approaches, so that you get the best of both worlds – so that you can use both Mean Square Error detection and the Discriminator CNN as feedback for the Generator CNN. This, Jones says, is the best balance between synthesizing new data for the upscaling, while avoiding too much divergence.

The results appear to be really quite impressive, although MediaKind is not able to show this live, on a UHD TV, due to the virtual nature of NAB this year. It seems clear that the Hybrid GAN approach has produced a much more detailed image than what can be achieved using just conventional bicubic upsampling.

So, if all of this has sounded too good to be true, Jones points out that TV has “the joy of interlaced to deal with,” to bring the room back down. Unsurprisingly, ML techniques can be used to solve that problem too – generating the 1080p output from source video in 2160p, then generating the required alternate fields with interlacing, in the traditional manner. Once you have the 1080i video, you can go about training your models.

MediaKind found that the most successful approach was to upconvert from the interlaced fields, without using a De-Interlacer tool entirely, and then using the Generator CNN to create the progressive UHD frames needed to recreate video. This was surprising, because it means using a 1920×540 field, from the interlaced source, and then upscaling that directly to 3840×2160. If you had De-Interlaced, you would have converted the two interlaced 1920×540 fields into a single 1920×1080 video, and then upconverted from that.

However, MediaKind was pretty sure it could do better, and did so by adding the temporal data that is lost in the conversion to interlaced from progressive, back into the Generator CNN. As Jones explained, this allows the G to see the interlaced frames that come before and after the one it is currently working on, which in turn teaches G how to de-interlace video.

This does, however, increase the complexity, as you have to work with sequenced data – processing frames in order, rather than being able to do it randomly. This approach is called Hybrid GAN with 3 Fields conversion – three fields, because the GAN is using three linked interlaced fields to reach its conclusion. Jones then showed snippets of the final videos, which did show a lot more detail in the video than the conventional bicubic upscaling.

Of course, the evolution of this approach is to incorporate it into the end-devices, so that TVs and media players can convert HD video feeds in real time, upsampling them to UHD. Of course, this will require a generational shift in processing power and techniques, but running the upsampling process on the end-devices would massively offload the bandwidth from the distribution networks.