Method and data processing system for lossy image or video encoding, transmission and decoding
Patent Information
- Application Number
- PCT/US2026/021120
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-28
- Filing Date
- 2026-03-27
- Publication Date
- 2026-10-01
Smart Images

Figure US2026021120_01102026_PF_FP_ABST
Abstract
Description
[0001] METHOD AND DATA PROCESSING SYSTEM FOR LOSSY IMAGE OR VIDEO ENCODING, TRANSMISSION AND DECODING
[0002] CROSS REFERENCE TO RELATED APPLICATIONS
[0003] This application claims priority to United Kingdom Patent Application No. GB 2504584.0, filed March 28, 2025, which is incorporated herein by reference in its entirety'. BACKGROUND
[0004] This invention relates to a method and system for lossy image or video encoding, transmission and decoding, a method, apparatus, computer program and computer readable storage medium for lossy image or video encoding and transmission, and a method, apparatus, computer program and computer readable storage medium for lossy image or video receipt and decoding.
[0005] There is increasing demand from users of communications networks for images and video content. Demand is increasing not just for the number of images viewed, and for the playing time of video; demand is also increasing for higher resolution content. This places increasing demand on communications networks and increases their energy use because of the larger amount of data being transmitted.
[0006] To reduce the impact of these issues, image and video content is compressed for transmission across the network. The compression of image and video content can be lossless or lossy compression. In lossless compression, the image or video is compressed such that all of the original information in the content can be recovered on decompression. However, when using lossless compression there is a limit to the reduction in data quantity that can be achieved. In lossy compression, some information is lost from the image or video during the compression process. Known compression techniques attempt to minimise the apparent loss of information by the removal of information that results in changes to the decompressed image or video that is not particularly noticeable to the human visual system. JPEG, JPEG2000, AVC. HEVC and AVI are examples of compression processes for image and / or video files.
[0007] In general terms, known lossy image compression techniques use the spatial correlations between pixels in images to remove redundant information during compression. For example, in an image of a blue sky. if a given pixel is blue, there is a high likelihood that the neighbouring pixels, and their neighbouring pixels, and so on, are also blue. There is accordingly no need to retain all the raw pixel data. Instead, we can retain only a subset of the pixels which take upfewer bits and infer the pixel values of the other pixels using information derived from spatial correlations.
[0008] A similar approach is applied in known lossy video compression techniques. That is. spatial correlations between pixels allow the removal of redundant information during compression. However, in video compression, there is further information redundancy in the form of temporal correlations. For example, in a video of an aircraft flying across a blue-sky background, most of the pixels of the blue sky do not change at all between frames of the video. The most of the blue sky pixel data for the frame at position t = 0 in the video is identical to that at position t = 10. Storing this identical, temporally correlated, information is inefficient. Instead, only the blue sk ' pixel data for a subset of the frames is stored and the rest are inferred from information derived from temporal correlations.
[0009] In the realm of lossy video compression in particular, the removal of redundant temporally correlated information in a video sequence is known as inter-frame redundancy.
[0010] One technique using inter-frame redundancy that is widely used in standard video compression algorithms involves the categorization of video frames into three types: I-frames, P-frames. and B-frames. Each frame type carries distinct properties concerning their encoding and decoding process, playing different roles in achieving high compression ratios while maintaining acceptable visual quality.
[0011] I-frames, or intra-coded frames, serve as the foundation of the video sequence. These frames are self-contained, each one encoding a complete image without reference to any other frame. In terms of compression, I-frames are least compressed among all frame ty pes, thus carrying the most data. However, their independence provides several benefits, including being the starting point for decompression and enabling random access, crucial for functionalities like fast-forwarding or rewinding the video.
[0012] P-frames. or predictive frames, utilize temporal redundancy in video sequences to achieve greater compression. Instead of encoding an entire image like an I-frame, a P-frame represents the difference between itself and the closest preceding I- or P-frame. The process, known as motion compensation, identifies and encodes only the changes that have occurred, thereby significantly reducing the amount of data transmitted. Nonetheless, P-frames are dependent on previous frames for decoding. Consequently, any error during the encoding or transmission process may propagate to subsequent frames, impacting the overall video quality.
[0013] B-frames, or bidirectionally predictive frames, represent the highest level of compression. Unlike P-frames, B-frames use both the preceding and following frames as references in their encoding process. By predicting motion both forwards and backwards intime, B-frames encode only the differences that cannot be accurately anticipated from the previous and next frames, leading to substantial data reduction. Although this bidirectional prediction makes B-frames more complex to generate and decode, it does not propagate decoding errors since they are not used as references for other frames. Artificial intelligence (Al) based compression techniques achieve compression and decompression of images and videos through the use of trained neural networks in the compression and decompression process. Typically, during training of the neutral networks, the difference between the original image and video and the compressed and decompressed image and video is analyzed and the parameters of the neural networks are modified to reduce this difference while minimizing the data required to transmit the content. However, Al based compression methods may achieve poor compression results in terms of the appearance of the compressed image or video or the amount of information required to be transmitted.
[0014] An example of an Al based image compression process comprising a hyper-network is described in Balle, Johannes, et al. "Variational image compression with a scale hyperprior." arXiv preprint arXiv: 1802.01436 (2018). which is incorporated herein by reference in its entirety.
[0015] An example of an Al based video compression approach is shown in Agustsson, E., Minnen, D., Johnston, N., Balle, J., Hwang, S. J., and Toderici, G. (2020), Scale-space flow for end-to-end optimized video compression. In Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition (pp. 8503-8512), which is incorporated herein by reference in its entirety.
[0016] A further example of an Al based video compression approach is shown in Mentzer, F., Agustsson, E., Balle, J., Minnen, D., Johnston, N., and Toderici, G. (2022, November). Neural video compression using gans for detail synthesis and propagation. In Computer Vision-ECCV 2022: 17th European Conference. Tel Aviv, Israel, October 23-27. 2022, Proceedings, Part XXVI (pp. 562-578), which is incorporated herein by reference in its entirety.
[0017] SUMMARY
[0018] According to an aspect, there provided a method for lossy image or video encoding and transmission, the method comprising: receiving a first image and classification information associated with the first image at a first computer system; with a first neural network, producing a latent representation of the first image using the classification information; transmitting the latent representation of the first image to a second computer system.According to an aspect, there provided a method for lossy image or video receipt and decoding, the method comprising: receiving at a second computer system a latent representation of a first image, the latent representation of the first image produced by a first neural network using the first image and classification information associated with the first image; with a second neural network, decoding the latent representation of the first image to produce an output image, wherein the output image is an approximation of the first image.
[0019] According to an aspect, there provided an apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving a first image and classification information associated with the first image at a first computer system; with a first neural network, producing a latent representation of the first image using the classification information; transmitting the latent representation of the first image to a second computer system.
[0020] According to an aspect, there provided an apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving at a second computer system a latent representation of a first image, the latent representation of the first image produced by a first neural network using the first image and classification information associated with the first image; with a second neural netw ork, decoding the latent representation of the first image to produce an output image, wherein the output image is an approximation of the first image.
[0021] Optionally, the classification information comprises a mask indicative of a presence of a class in one or more pixels of the first image.
[0022] Optionally, the classification information comprises a plurality of logits indicative of a present of text in one or more pixels of the first image.
[0023] Optionally, using the classification information comprises conditioning the latent representation of the first image on the classification information.
[0024] Optionally, comprising performing one or more convolution operations on the first image and one or more convolution operations on the classification information to produce respective feature map tensors, combining the feature map tensors into a combined feature map tensor, and producing the latent representation of the first image using the combined feature map tensor.
[0025] Optionally, comprising with a third neural network producing the classification information using the first image.
[0026] Optionally, the third neural network comprises between 1 and 16 convolution layers, preferably between 6 and 10 convolution layers, preferably 8 convolution layers.Optionally, the third neural network comprises between 1 and 14 activation layers, preferably between 5 and 9 activation layers, preferably 7 activation layers.
[0027] Optionally, the first image comprises a plurality of image channels and wherein using the first image comprises using a subset of the image channels.
[0028] Optionally, the first image comprises a YUV image with a luma channel and chroma channels, and w herein using a subset of the image channel comprises using the luma channel.
[0029] According to an aspect, there provided a method for residual information encoding and transmission, the method comprising: receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system; with a first neural network, producing a latent representation of residual information using the first image, the classification information associated with the first image, and the one or more second images, the residual information being indicative of a difference between the first image and the one or more second images; transmitting the latent representation of residual information to a second computer system.
[0030] According to an aspect, there provided a method for residual information receipt and decoding, the method comprising the steps of: receiving at a second computer system a latent representation of residual information, the latent representation of residual information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images of an image sequence, the residual information being indicative of a difference between the first image and the one or more second images; and with a second neural network, decoding the latent representation of residual information to produce an output image, wherein the output image is an approximation of the first image.
[0031] According to an aspect, there provided an apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system; with a first neural network, producing a latent representation of residual information using the first image, the classification information associated with the first image, and the one or more second images, the residual information being indicative of a difference between the first image and the one or more second images; transmitting the latent representation of residual information to a second computer system
[0032] According to an aspect, there provided an apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or moreprocessors are configured to perform: receiving at a second computer system a latent representation of residual information, the latent representation of residual information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images of an image sequence, the residual information being indicative of a difference between the first image and the one or more second images; and with a second neural network, decoding the latent representation of residual information to produce an output image, wherein the output image is an approximation of the first image.
[0033] Optionally, the classification information comprises a mask indicative of a presence of a class in one or more pixels of the first image.
[0034] Optionally, the classification information comprises a plurality of logits indicative of a present of text in one or more pixels of the first image.
[0035] Optionally, using the classification information comprises conditioning the latent representation of residual information on the classification information.
[0036] Optionally, comprising performing one or more convolution operations on the first image and one or more convolution operations on the classification information to produce respective feature map tensors, combining the feature map tensors into a combined feature map tensor, and producing the latent representation of the residual information using the combined feature map tensor.
[0037] Optionally, comprising with a third neural network producing the classification information using the first image.
[0038] Optionally, the third neural network comprises between 1 and 16 convolution layers, preferably between 6 and 10 convolution layers, preferably 8 convolution layers.
[0039] Optionally, the third neural network comprises between 1 and 14 activation layers, preferably between 5 and 9 activation layers, preferably 7 activation layers.
[0040] Optionally, the first image comprises a plurality of image channels and wherein using the first image comprises using a subset of the image channels.
[0041] Optionally, the first image comprises a YUV image with a luma channel and chroma channels, and wherein using a subset of the image channel comprises using the luma channel.
[0042] According to an aspect, there provided a method for flow encoding and transmission, the method comprising: receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system; with a first neural network, producing a latent representation of optical flow information using the first image, the classification information associated with the first image, and the one ormore second images, the optical flow information being indicative of a difference between the first image and the one or more second images; and transmitting the latent representation of the optical flow information to a second computer system.
[0043] According to an aspect, there provided method for flow receipt and decoding, the method comprising: receiving at a second computer system a latent representation of optical flow information, the latent representation of optical flow information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images, the optical flow information being indicative of a difference between the first image and the one or more second images; and with a second neural network, decoding the latent representation of optical flow information to produce an approximation of the optical flow information.
[0044] According to an aspect, there provided an apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system; with a first neural network, producing a latent representation of optical flow information using the first image, the classification information associated with the first image, and the one or more second images, the optical flow information being indicative of a difference between the first image and the one or more second images; and transmitting the latent representation of the optical flow information to a second computer system.
[0045] According to an aspect, there provided apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving at a second computer system a latent representation of optical flow information, the latent representation of optical flow information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images, the optical flow information being indicative of a difference between the first image and the one or more second images; andwith a second neural network, decoding the latent representation of optical flow information to produce an approximation of the optical flow information.
[0046] Optionally, the classification information comprises a plurality of logits indicative of a present of text in one or more pixels of the first image.
[0047] Optionally, using the classification information comprises conditioning the latent representation of optical flow information on the classification information.
[0048] Optionally, producing the latent representation of optical flow information comprises:performing a plurality of dow nsampling operations on the first image, the classification information, and the one or more second images to produce a sequence of increasingly lower resolution first images, classification information, and one or more second images; estimating a representation of optical flow information at a lowest resolution of the increasingly lower resolutions; and performing the steps of: using the estimated optical flow information to warp a first image at a higher resolution of the the sequence of increasingly lower resolutions; estimating a representation of optical flow information at the higher resolution using the warped first image at the higher resolution; repeating said steps a predetermined number of times to produce a final representation of optical flow information; and
[0049] with the first neural network producing the latent representation of optical flow information using the final representation of optical flow information.
[0050] Optionally, conditioning the latenet representation of optical flow information on the classification information comprises combining the classification information with each of the representations of optical flow7information at each of the higher resolutions.
[0051] Optionally, comprising performing one or more convolution operations on the classification information to produce respective feature map tensors, and wherein combining the classification information with each of the representation of optical flow information comprises combining the respective feature map tensors with the respective representations of optical flow7information.
[0052] Optionally, comprising with a third neural network producing the classification information using the first image.
[0053] Optionally, the third neural network comprises between 1 and 16 convolution layers, preferably between 6 and 10 convolution layers, preferably 8 convolution layers.
[0054] Optionally, the third neural network comprises between 1 and 14 activation layers, preferably between 5 and 9 activation layers, preferably 7 activation layers.
[0055] Optionally, the first image comprises a plurality of image channels and wherein using the first image comprises using a subset of the image channels.
[0056] Optionally, the first image comprises a YUV image with a luma channel and chroma channels, and wherein using a subset of the image channel comprises using the luma channel.
[0057] Optionally, the classification information comprises text classification information. According to an aspect, there is provided a computer program comprising instructions which, when the program is executed by a computer, cause the computer to carry out any of the above methods.According to an aspect, there is provided a computer-readable storage medium comprising instructions which, when executed by a computer, cause the computer to carry out any of the above methods.
[0058] BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Aspects of the invention will now be described by way of examples, with reference to the following figures in which:
[0060] Figure 1 illustrates an example of an image or video compression, transmission and decompression pipeline.
[0061] Figure 2 illustrates a further example of an image or video compression, transmission and decompression pipeline including a hyper-network.
[0062] Figure 3 illustrates an example of a video compression, transmission and decompression pipeline.
[0063] Figure 4 illustrates an example of a video compression, transmission and decompression system.
[0064] Figure 5 illustrates an example of a part of video compression, transmission and decompression pipeline.
[0065] Figure 6 illustrates an example of a part of video compression, transmission and decompression pipeline.
[0066] Figure 7 illustrates an example of a part of video compression, transmission and decompression pipeline.
[0067] Figure 8 illustrates an example of a part of video compression, transmission and decompression pipeline.
[0068] Figure 9 illustrates an example of a part of video compression, transmission and decompression pipeline.
[0069] Figure 10 illustrates an example of a part of video compression, transmission and decompression pipeline.
[0070] DETAILED DESCRIPTION OF THE DRAWINGS
[0071] Compression processes may be applied to any form of information to reduce the amount of data, or file size, required to store that information. Image and video information is an example of information that may be compressed. The file size required to store the information, particularly during a compression process when referring to the compressed file, may be referred to as the rate. In general, compression can be lossless or lossy. In both forms ofcompression, the file size is reduced. However, in lossless compression, no information is lost when the information is compressed and subsequently decompressed. This means that the original file storing the information is fully reconstructed during the decompression process. In contrast to this, in lossy compression information may be lost in the compression and decompression process and the reconstructed file may differ from the original file. Image and video files containing image and video data are common targets for compression.
[0072] In a compression process involving an image, the input image may be represented as x. The data representing the image may be stored in a tensor of dimensions H x W x C, where H represents the height of the image, W represents the width of the image and C represents the number of channels of the image. Each H x W data point of the image represents a pixel value of the image at the corresponding location. Each channel C of the image represents a different component of the image for each pixel which are combined when the image file is displayed by a device. For example, an image file may have 3 channels with the channels representing the red, green and blue component of the image respectively. In this case, the image information is stored in the RGB colour space, which may also be referred to as a model or a format. Other examples of colour spaces or formats include the CMKY and the YCbCr colour models. However, the channels of an image file are not limited to storing colour information and other information may be represented in the channels. As a video may be considered a series of images in sequence, any compression process that may be applied to an image may also be applied to a video. Each image making up a video may be referred to as a frame of the video.
[0073] The output image may differ from the input image and may be represented by x. The difference between the input image and the output image may be referred to as distortion or a difference in image quality. The distortion can be measured using any distortion function which receives the input image and the output image and provides an output which represents the difference between input image and the output image in a numerical way. An example of such a method is using the mean square error (MSE) between the pixels of the input image and the output image, but there are many other ways of measuring distortion, as will be known to the person skilled in the art. The distortion function may comprise a trained neural network.
[0074] Typically, the rate and distortion of a lossy compression process are related. An increase in the rate may result in a decrease in the distortion, and a decrease in the rate may result in an increase in the distortion. Changes to the distortion may affect the rate in a corresponding manner. A relation between these quantities for a given compression technique may be defined by a rate-distortion equation.Al based compression processes may involve the use of neural networks. A neural network is an operation that can be performed on an input to produce an output. A neural network may be made up of a plurality of layers. The first layer of the network receives the input. One or more operations may be performed on the input by the layer to produce an output of the first layer. The output of the first layer is then passed to the next layer of the network which may perform one or more operations in a similar way. The output of the final layer is the output of the neural network.
[0075] Each layer of the neural network may be divided into nodes. Each node may receive at least part of the input from the previous layer and provide an output to one or more nodes in a subsequent layer. Each node of a layer may perform the one or more operations of the layer on at least part of the input to the layer. For example, a node may receive an input from one or more nodes of the previous layer. The one or more operations may include a convolution, a weight, a bias and an activation function. Convolution operations are used in convolutional neural networks. When a convolution operation is present, the convolution may be performed across the entire input to a layer. Alternatively, the convolution may be performed on at least part of the input to the layer.
[0076] Each of the one or more operations is defined by one or more parameters that are associated with each operation. For example, the weight operation may be defined by a weight matrix defining the weight to be applied to each input from each node in the previous layer to each node in the present layer. In this example, each of the values in the weight matrix is a parameter of the neural network. The convolution may be defined by a convolution matrix, also known as a kernel. In this example, one or more of the values in the convolution matrix may be a parameter of the neural network. The activation function may also be defined by values which may be parameters of the neural network. The parameters of the network may be varied during training of the network.
[0077] Other features of the neural network may be predetermined and therefore not varied during training of the network. For example, the number of layers of the network, the number of nodes of the network, the one or more operations performed in each layer and the connections between the layers may be predetermined and therefore fixed before the training process takes place. These features that are predetermined may be referred to as the hyperparameters of the network. These features are sometimes referred to as the architecture of the netw ork.
[0078] To train the neural netw ork, a training set of inputs may be used for which the expected output, sometimes referred to as the ground truth, is known. The initial parameters of the neural network are randomized and the first training input is provided to the network. The output ofthe network is compared to the expected output, and based on a difference between the output and the expected output the parameters of the network are varied such that the difference between the output of the network and the expected output is reduced. This process is then repeated for a plurality of training inputs to train the network. The difference between the output of the network and the expected output may be defined by a loss function. The result of the loss function may be calculated using the difference between the output of the network and the expected output to determine the gradient of the loss function. Back-propagation of the gradient descent of the loss function may be used to update the parameters of the neural network using the gradients dL / dy of the loss function. A plurality of neural networks in a system may be trained simultaneously through back-propagation of the gradient of the loss function to each network.
[0079] In the context of image or video compression, this type of system, where simultaneous training with back-propagation through each element or the whole network architecture may be referred to as end-to-end, learned image or video compression. Unlike in traditional compression algorithms that use primarily handcrafted, manually constructed steps, an end-to-end learned system leams itself during training what combination of parameters best achieves the goal of minimising the loss function. This approach is advantageous compared to systems that are not end-to-end learned because an end-to-end system has a greater flexibility to leam weights and parameters that might be counter-intuitive to someone handcrafting features.
[0080] It will be appreciated that the term "training" or "learning" as used herein means the process of optimizing an artificial intelligence or machine learning model, based on a given set of data. This involves iteratively adjusting the parameters of the model to minimize the discrepancy between the model's predictions and the actual data, represented by the abovedescribed rate-distortion loss function.
[0081] The training process may comprise multiple epochs. An epoch refers to one complete pass of the entire training dataset through the machine learning algorithm. During an epoch, the model's parameters are updated in an effort to minimize the loss function. It is envisaged that multiple epochs may be used to train a model, with the exact number depending on various factors including the complexity of the model and the diversity of the training data.
[0082] Within each epoch, the training data may be divided into smaller subsets known as batches. The size of a batch, referred to as the batch size, may influence the training process. A smaller batch size can lead to more frequent updates to the model's parameters, potentially leading to faster convergence to the optimal solution, but at the cost of increased computational resources. Conversely, a larger batch size involves fewer updates, which can be morecomputationally efficient but might converge slower or even fail to converge to the optimal solution.
[0083] The learnable parameters are updated by a specified amount each time, determined by the learning rate. The learning rate is a hyperparameter that decides how much the parameters are adjusted during the training process. A smaller learning rate implies smaller steps in the parameter space and a potentially more accurate solution, but it may require more epochs to reach that solution. On the other hand, a larger learning rate can expedite the training process but may risk overshooting the optimal solution or causing the training process to diverge.
[0084] The training described herein may involve use of a validation set, which is a portion of the data not used in the initial training, which is used to evaluate the model's performance and to prevent overfitting. Overfitting occurs when a model leams the training data too well, to the point that it fails to generalize to unseen data. Regularization techniques, such as dropout or L1 / L2 regularization, can also be used to mitigate overfitting.
[0085] It will be appreciated that training a machine learning model is an iterative process that may comprise selection and tuning of various parameters and hyperparameters. As will be appreciated, the specific details, such as hyper parameters and so on, of the training process may vary and it is envisaged that producing a trained model in this way may achieved in a number of different ways w ith different epochs, batch sizes, learning rates, regularisations, and so on, the details of w hich are not essential to enabling the advantages and effects of the present disclosure, except where stated otherwise. The point at which an "untrained" neural network is considered be "trained" is envisaged to be case specific and depend on, for example, on a number of epochs, a plateauing of any further learning, or some other metric and is not considered to be essential in achieving the advantages described herein.
[0086] More details of an end-to-end, learned compression process will now be described. It will be appreciated that in some cases, end-to-end, learned compression processes may be combined with one or more components that are handcrafted or trained separately.
[0087] In the case of Al based image or video compression, the loss function may be defined by the rate distortion equation. The rate distortion equation may be represented by Loss — D + A * R, where D is the distortion function, A is a weighting factor, and R is the rate loss. A may be referred to as a lagrange multiplier. The langrange multiplier provides as weight for a particular term of the loss function in relation to each other term and can be used to control which terms of the loss function are favoured when training the network.
[0088] In the case of Al based image or video compression, a training set of input images may be used. An example training set of input images is the KODAK image set (for example atwww.cs.albany.edu / xypan / research / snr / Kodak.html). An example training set of input images is the IMAX image set. An example training set of input images is the Imagenet dataset (for example at www.image-net.org / download). An example training set of input images is the CLIC Training Dataset P ("professional") and M ("mobile") (for example at http: / / challenge.compression.cc / tasks / ).
[0089] An example of an Al based compression, transmission and decompression process 100 is shown in Figure 1. As a first step in the Al based compression process, an input image 5 is provided. The input image 5 is provided to a trained neural network 110 characterized by a function fgacting as an encoder. The encoder neural network 110 produces an output based on the input image. This output is referred to as a latent representation of the input image 5. In a second step, the latent representation is quantised in a quantisation process 140 characterised by the operation Q. resulting in a quantized latent. The quantisation process transforms the continuous latent representation into a discrete quantized latent. An example of a quantization process is a rounding function.
[0090] In a third step, the quantized latent is entropy encoded in an entropy encoding process 150 to produce a bitstream 130. The entropy encoding process may be for example, range or arithmetic encoding. In a fourth step, the bitstream 130 may be transmitted across a communication network.
[0091] In a fifth step, the bitstream is entropy decoded in an entropy decoding process 160. The quantized latent is provided to another trained neural network 120 characterized by a function ggacting as a decoder, which decodes the quantized latent. The trained neural network 120 produces an output based on the quantized latent. The output may be the output image of the Al based compression process 100. The encoder-decoder system may be referred to as an autoencoder.
[0092] Entropy encoding processes such as range or arithmetic encoding are typically able to losslessly compress given input data up to close to the fundamental entropy limit of that data, as determined by the total entropy of the distribution of that data. Accordingly , one way in which end-to-end, learned compression can minimise the rate loss term of the rate-distortion loss function and thereby increase compression effectiveness is to learn autoencoder parameter values that produce low entropy latent representation distributions. Producing latent representations distributed with as low an entropy as possible allows entropy encoding to compress the latent distributions as close to or to the fundamental entropy limit for that distribution. The lower the entropy of the distribution, the more entropy encoding can losslessly compress it and the lower the amount of data in the corresponding bitstream. In some caseswhere the latent representation is distributed according to a gaussian or Laplacian distribution, this learning may comprise learning optimal location and scale parameters of the gaussian or Laplacian distributions, in other cases, it allows the learning of more flexible latent representation distributions which can further help to achieve the minimising of the ratedistortion loss function in ways that are not intuitive or possible to do with handcrafted features. Examples of these and other advantages are described in W02021 / 220008A1, which is incorporated herein by reference in its entirety.
[0093] Something which is closely linked to the entropy encoding of the latent distribution and which accordingly also has an effect on the effectiveness of compression of end-to-end learned approaches is the quantisation step. During inference, a rounding function may be used to quantise a latent representation distribution into bins of given sizes, a rounding function is not differentiable everywhere. Rather, a rounding function is effectively one or more step functions whose gradient is either zero (at the top of the steps) or infinity (at the boundary between steps). Back propagating a gradient of a loss function through a rounding function is challenging. Instead, during training, quantisation by rounding function is replaced by one or more other approaches. For example, the functions of a noise quantisation model are differentiable everywhere and accordingly do allow backpropagation of the gradient of the loss function through the quantisation parts of the end-to-end, learned system. Alternatively, a straight-through estimator (STE) quantisation model or one other quantisation models may be used. It is also envisaged that different quantisation models may be used for during evaluation of different term of the loss function. For example, noise quantisation may be used to evaluate the rate or entropy loss term of the rate-distortion loss function while STE quantisation may be used to evaluate the distortion term.
[0094] In a similar manner to how learning parameters top produce certain distributions of the latent representation facilitates achieving better rate loss term minimisation, end-to-end learning of the quantisation process achieves a similar effect. That is, learnable quantisation parameters provide the architecture with a further degree of freedom to achieve the goal of minimising the loss function. For example, parameters corresponding to quantisation bin sizes may be learned which is likely to result in an improved rate-distortion loss outcome compared to approaches using hand-crafted quantisation bin sizes.
[0095] Further, as the rate-distortion loss function constantly has to balance a rate loss term against a distortion loss term, it has been found that the more degrees of freedom the system has during training, the better the architecture is at achieving optimal rate and distortion trade off.The system described above may be distributed across multiple locations and / or devices. For example, the encoder 110 may be located on a device such as a laptop computer, desktop computer, smart phone or server. The decoder 120 may be located on a separate device which may be referred to as a recipient device. The system used to encode, transmit and decode the input image 5 to obtain the output image 6 may be referred to as a compression pipeline.
[0096] The Al based compression process may further comprise a hyper-network 105 for the transmission of meta-information that improves the compression process. The hyper-network 105 comprises a trained neural network 115 acting as a hyper-encoder
[0097]
[0098] and a trained neural network 125 acting as a hyper-decoder g$ . An example of such a system is shown in Figure 2. Components of the system not further discussed may be assumed to be the same as discussed above. The neural network 115 acting as a hyper-encoder receives the latent that is the output of the encoder 110. The hyper-encoder 115 produces an output based on the latent representation that may be referred to as a hyper-latent representation. The hyper-latent is then quantized in a quantization process 145 characterised by Qhto produce a quantized hyper-latent. The quantization process 145 characterised by Qhmay be the same as the quantisation process 140 characterised by Q discussed above.
[0099] In a similar manner as discussed above for the quantized latent, the quantized hyper-latent is then entropy encoded in an entropy encoding process 155 to produce a bitstream 135. The bitstream 135 may be entropy decoded in an entropy decoding process 165 to retrieve the quantized hyper-latent. The quantized hyper-latent is then used as an input to the trained neural network 125 acting as a hyper-decoder. However, in contrast to the compression pipeline 100, the output of the hyper-decoder may not be an approximation of the input to the hyper-encoder 115. Instead, the output of the hyper-decoder is used to provide parameters for use in the entropy encoding process 150 and entropy decoding process 160 in the main compression process 100. For example, the output of the hyper-decoder 125 can include one or more of the mean, standard deviation, variance or any other parameter used to describe a probability model for the entropy encoding process 150 and entropy decoding process 160 of the latent representation. In the example shown in Figure 2, only a single entropy decoding process 165 and hyper-decoder 125 is shown for simplicity. However, in practice, as the decompression process usually takes place on a separate device, duplicates of these processes will be present on the device used for encoding to provide the parameters to be used in the entropy encoding process 150.
[0100] Further transformations may be applied to at least one of the latent and the hyper-latent at any stage in the Al based compression process 100. For example, at least one of the latentand the hyper latent may be converted to a residual value before the entropy encoding process 150,155 is performed. The residual value may be determined by subtracting the mean value of the distribution of latents or hyper-latents from each latent or hyper latent. The residual values may also be normalised.
[0101] To perform training of the Al based compression process described above, a training set of input images may be used as described above. During the training process, the parameters of both the encoder 110 and the decoder 120 may be simultaneously updated in each training step. If a hyper-network 105 is also present, the parameters of both the hyper-encoder 115 and the hyper-decoder 125 may additionally be simultaneously updated in each training step. The training process may further include a generative adversarial network (GAN). When applied to an Al based compression process, in addition to the compression pipeline described above, an additional neutral network acting as a discriminator is included in the system. The discriminator receives an input and outputs a score based on the input providing an indication of whether the discriminator considers the input to be ground truth or fake. For example, the indicator may be a score, with a high score associated with a ground truth input and a low score associated with a fake input. For training of a discriminator, a loss function is used that maximizes the difference in the output indication between an input ground truth and input fake.
[0102] When a GAN is incorporated into the training of the compression process, the output image 6 may be provided to the discriminator. The output of the discriminator may then be used in the loss function of the compression process as a measure of the distortion of the compression process. Alternatively, the discriminator may receive both the input image 5 and the output image 6 and the difference in output indication may then be used in the loss function of the compression process as a measure of the distortion of the compression process. Training of the neural network acting as a discriminator and the other neutral networks in the compression process may be performed simultaneously. During use of the trained compression pipeline for the compression and transmission of images or video, the discriminator neural network is removed from the system and the output of the compression pipeline is the output image 6.
[0103] Incorporation of a GAN into the training process may cause the decoder 120 to perform hallucination. Hallucination is the process of adding information in the output image 6 that was not present in the input image 5. In an example, hallucination may add fine detail to the output image 6 that was not present in the input image 5 or received by the decoder 120. The hallucination performed may be based on information in the quantized latent received by decoder 120.Details of a video compression process will now be described. As discussed above, a video is made up of a series of images arranged in sequential order. Al based compression process 100 described above may be applied multiple times to perform compression, transmission and decompression of a video. For example, each frame of the video may be compressed, transmitted and decompressed individually. The received frames may then be grouped to obtain the original video.
[0104] The frames in a video may be labelled based on the information from other frames that is used to decode the frame in a video compression, transmission and decompression process. As described above, frames which are decoded using no information from other frames may be referred to as I-frames. Frames which are decoded using information from past frames may be referred to as P-frames. Frames which are decoded using information from past frames and future frames may be referred to as B-frames. Frames may not be encoded and / or decoded in the order that they appear in the video. For example, a frame at a later time step in the video may be decoded before a frame at an earlier time.
[0105] The images represented by each frame of a video may be related. For example, a number of frames in a video may show the same scene. In this case, a number of different parts of the scene may be shown in more than one of the frames. For example, objects or people in a scene may be shown in more than one of the frames. The background of the scene may also be shown in more than one of the frames. If an object or the perspective is in motion in the video, the position of the object or background in one frame may change relative to the position of the object or background in another frame. The transformation of a part of the image from a first position in a first frame to a second position in a second frame may be referred to as flow, warping or motion compensation. The How may be represented by a vector. One or more flow s that represent the transformation of at least part of one frame to another frame may be referred to as a flow map.
[0106] An example Al based video compression, transmission, and decompression process 200 is shown in Figure 3. The process 200 shown in Figure 3 is divided into an I-frame part 201 for decompressing I-frames, and a P-frame part 202 for decompressing P-frames. It will be understood that these divisions into different parts are arbitrary and the process 200 may also be considered as a single, end-to-end pipeline.
[0107] As described above, 1-frames do not rely on information from other frames so the I-frame part 201 corresponds to the compression, transmission, and decompression process illustrated in Figures 1 or 2. The specific details will not be repeated here but, in summary, an input image x0is passed into an encoder neural network 203 producing a latent representationwhich is quantised and entropy encoded into a bitstream 204. The subscript 0 in x0indicates the input image corresponds to a frame of a video stream at position t = 0. This may be the first frame of an entire video stream or the first frame of a chunk of a video stream made up of, for example, an I-frame and a plurality of subsequent P-frames and / or B-frames. The bitstream 204 is then entropy decoded and passed into a decoder neural network 205 to reproduce a reconstructed image x0which in this case is an 1-frame. The decoding step may be performed both locally at the same location as where the input image compression occurs as well as at the location where the decompression occurs. This allows the reconstructed image x0to be available for later use by components of both the encoding and decoding sides of the pipeline.
[0108] In contrast to I-frames, P-frames (and B-frames) do rely on information from other frames. Accordingly, the P-frame part 202 at the encoding side of the pipeline takes as input not only the input image xtthat is to be compressed (corresponding to a frame of a video stream at position t), but also one or more previously reconstructed images xt-1from an earlier frame t-1. As described above, the previously reconstructed xt-ris available at both the encode and decode side of the pipeline and can accordingly be used for various purposes at both the encode and decode sides.
[0109] At the encode side, previously reconstructed images may be used for generating a flow map containing information indicative of inter-frame movement of pixels between frames. In the example of Figure 3, both the image being compressed xtand the previously reconstructed image from an earlier frame
[0110]
[0111] are passed into a flow module part 206 of the pipeline. The flow module part 206 comprises an autoencoder such as that of the autoencoder systems of Figures 1 and 2 but where the encoder neural network 207 has been trained to produce a latent representation of a flow map from inputs
[0112]
[0113] and xt. which is indicative of inter-frame movement of pixels or pixel groups between xt-and xt. The latent representation of the flow map is quantised and entropy encoded to compress it and then transmitted as a bitstream 208. On the decode side, the bitstream is entropy decoded and passed to a decoder neural network 209 to produce a reconstructed flow map f.
[0114] The reconstructed flow map f is applied to the previously reconstructed image
[0115]
[0116] to generate a warped image
[0117]
[0118] It is envisaged that any suitable warping technique may be used, for example bi-linear or tri-linear warping, as is described in Agustsson, E., Minnen, D., Johnston, N., Balle, J., Hwang, S. J., and Toderici, G. (2020), Scale-space flow for end-to-end optimized video compression. In Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition (pp. 8503-8512), which is incorporated herein by reference inits entirety. It is further envisaged that a scale-space flow approach as described in the above paper may also optionally be used. The warped image xt-l wis a prediction of how the previously reconstructed image xt-1might have changed between frame positions t-1 and t, based on the output flow map produced by the flow module part 206 autoencoder system from the inputs of xtand xt-i- As with the I-frame, the reconstructed flow map f and corresponding warped image xt-l wmay be produced both on the encode side and the decode side of the pipeline so they are available for use by other components of the pipeline on both the encode and decode sides.
[0119] In the example of Figure 3, both the image being compressed xtand the xt-l ware passed into a residual module part 210 of the pipeline. The residual module part 210 comprises an autoencoder system such as that of the autoencoder systems of Figures 1 and 2 but where the encoder neural network 211 has been trained to produce a latent representation of a residual map indicative of differences between the input mage xtand the warped image xt-l w. The latent representation of the residual map is then quantised and entropy encoded into a bitstream 212 and transmitted. The bitstream 212 is then entropy decoded and passed into a decoder neural network 213 which reconstructs a residual map r from the decoded latent representation.
[0120] Alternatively, a residual map may first be pre-calculated between xtand the xt-1;Wand the pre-calculated residual map may be passed into an autoencoder for compression only. This hand-crafted residual map approach is computationally simpler, but reduces the degrees of freedom with which the architecture may learn weights and parameters to achieve its goal during training of minimising the rate-distortion loss function.
[0121] Finally, on the decode side, the residual map r is applied (e.g., combined by addition, subtraction or a different operation) to the warped image to produce a reconstructed image xtwhich is a reconstruction of image xtand accordingly corresponds to a P-frame at position t in a sequence of frames of a video stream. It will be appreciated that the reconstructed image xtcan then be used to process the next frame. That is, it can be used to compress, transmit and decompress xt+1, and so on until an entire video stream or chunk of a video stream has been processed.
[0122] Alternatively, the residual autoencoder may be trained to reconstruct the frame xtdirectly from the entropy decoded bitstream by removing the connection between
[0123]
[0124] and the output of the residual block 210, thereby eliminating any direct combination step with the warped previously decoded image to speed up inference. In this case, the flow information isintuitively understood to be indirectly captured within the residual information, which the residual decoder is able to leam to use to directly reconstruct the output image xt.
[0125] Alternatively, the residual autoencoder may be trained to reconstruct the frame xtdirectly from the entropy decoded bitstream in combination with some representation of flow injected into one or more layers of the residual decoder. In this case, the flow information is intuitively understood to be indirectly captured within the injected information, which the residual decoder is able to leam to use while decoding the latent representation of flow information to directly reconstruct the output image xt.
[0126] Thus, for a block of video frames comprising an I-frame and n subsequent P-frames, the bitstream may contain (i) a quantised, entropy encoded latent representation of the I-frame image, and (ii) a quantised, entropy encoded latent representation of a flow map and residual map of each P-frame image. For completeness, whilst not illustrated in Figure 3, any of the autoencoder systems of Figure 3 may comprise hyper and hyper-hyper networks such as those described in connection with Figure 2. Accordingly, the bitstream may also contain hyper and hyper-hyper parameters, their latent quantised, entropy encoded latent representations and so on, of those networks as applicable.
[0127] Finally, the above approach may generally also be extended to B-frames, for example as is described in Pourreza, R., and Cohen, T. (2021). Extending neural p-frame codecs for b-frame coding. In Proceedings of the IEEE / CVF International Conference on Computer Vision (pp. 6680-6689).
[0128] The above-described flow and residual based approach is highly effective at reducing the amount of data that needs to be transmitted because, as long as at least one reconstructed frame (e.g.. I-frame Xf- is available, the encode side only needs to compress and transmit a flow map and a residual map (and any hyper or hyper-hyper parameter information, as applicable) to reconstruct a subsequent frame.
[0129] Figure 4 shows an example of an Al image or video compression process such as that described above in connection with Figures 1-3 implemented in a video streaming system 400. The system 400 comprises a first device 401 and a second device 402. The first and second devices 401, 402 may be user devices such as smartphones, tablets, AR / VR headsets or other portable devices. In contrast to known systems which primarily perform inference on GPUs such as Nvidia A100, Geforce 3090, Geforce 4090 GPU cards, the system 400 of Figure 4 performs inference on a CPU of the first and second devices respectively. That is, compute for performing both encoding and decoding are performed by the respective CPUs of the first and second devices 401, 402. This places very different power usage, memory and runtimeconstraints on the implementation of the above methods than when implementing Al-based compression methods on GPUs. In one example, the CPU of first and second devices 401, 402 may comprise a Qualcomm Snapdragon CPU.
[0130] The first device 401 comprises a media capture device 403, such as a camera, arranged to capture a plurality of images, referred to hereafter as a video stream 404, of a scene 405. The video stream 404 is passed to a pre-processing module 406 which splits the video stream into blocks of frames, various frames of which will be designated as I-frames, P-frames, and / or B-frames. The blocks of frames are then compressed by an Al-compression module 407 comprising the encode side of the Al-based video compression pipeline of Figure 3. The output of the Al-compression module is accordingly a bitstream 408a which is transmitted from the first device 401, for example via a communications channel, for example over one or more of a WiFi, 3G, 4G or 5G channel, which may comprise internet or cloud-based 409 communications.
[0131] The second device 402 receives the communicated bitstream 408b which is passed to an Al-decompression module 410 comprising the decode side of the Al-based video compression pipeline of Figure 3. The output of the Al-decompression module 410 is the reconstructed 1-frames, P-frames and / or B-frames which are passed to a post-processing module 411 where they can prepared, for example passed into a buffer, in preparation for streaming 412 to and rendering on a display device 413 of the second device 402.
[0132] It is envisaged that the system 400 of Figure 4 may be used for live video streaming at 30fps of a 1080p video stream, which means a cumulative latency of both the encode and decode side is below substantially 50ms, for example substantially 30ms or less. Achieving this level of runtime performance with only CPU compute on user devices presents challenges which are not addressed by known methods and systems or in the wider Al-compression literature.
[0133] For example, execution of different parts of the compression pipeline during inference may be optimized by adjusting the order in which operations are performed using one or more known CPU scheduling methods. Efficient scheduling can allow for operations to be performed in parallel, thereby reducing the total execution time. It is also envisaged that efficient management of memory resources may be implemented, including optimising caching methods such as storing frequently-accessed data in faster memoy locations, and memory reuse, which minimizes memory allocation and deallocation operations.
[0134] A number of concepts related to the Al compression processes and / or their implementation in a hardware system discussed above will now be described. Although eachconcept is described separately, one or more of the concepts described below may be applied in an Al based compression process as described above.
[0135] Concept 1: Conditioning on classification information
[0136] Figures 5 to 7 illustratively show components of a flow residual Al-based compression, transmission and decompression pipeline, such as that of Figure 3.
[0137] Figure 5 illustrates the components of an I-frame part comprising an encoder neural network 501 (such as the encoder neural network 203 of Figure 3) and a decoder neural network 502 (such as the decoder neural network 205 of Figure 3)
[0138] The encoder neural network 501 in Figure 5 may be considered as a single neural network or as a plurality of neural network components made up of an encoder 503, a hyper encoder 504, and a hyper hyper encoder 505, as well as a decoder 506, a hyper decoder 507, and a hyper hyper decoder 508, with corresponding entropy encoding modules 509. 510, 511 that together use the outputs of the decoders 506, 507, 508 to entropy encode the latent representation outputs of the encoders 503, 504, 505 into a bitstream.
[0139] The decoder neural network 502 in Figure 5 may be considered as a single neural network or as a plurality of neural network components made up of a decoder 506, a hyper decoder 507, and a hyper hyper decoder 508 with corresponding entropy decoding modules 512, 513, 514 that together use the bitstreams and respective outputs of each other to entropy decode the bitstream and reconstruct the various latent representations into an output image x0, which is a lossy approximation of an input image x0.
[0140] Figure 6 illustrates the components of a flow part of a pipeline comprising a flow encoder neural network 601 (such as the encoder neural network 207 of Figure 3) and a flow decoder neural network 602 (such as the decoder neural network 209 of Figure 3)
[0141] The flow encoder neural network 601 in Figure 6 may be considered as a single neural network or as a plurality of neural network components made up of a flow encoder 606, a flow hyper encoder 608, a flow hyper hyper encoder 609, a flow decoder 610, a flow hyper decoder 611 and a flow hyper hyper decoder neural network 612. Also provided are respective entropy encoding modules 613, 614, 615 that together use the outputs of the flow decoders 610, 611, 612 to entropy encode the latent representation outputs of the flow encoders 606, 608, 609 into a bitstream.
[0142] The flow decoder neural network 602 in Figure 6 may be considered as a single neural network or as a plurality of neural network components made up of a flow decoder 610, a flow hyper decoder 611. and a flow hyper hyper decoder 612 with corresponding entropy decodingmodules 616, 617, 618 that together use the bitstreams and respective outputs of each other to entropy decode the bitstream and reconstruct the various latent representations into a representation of optical flow information indicative of a difference between an input previously decoded image xt-xand an input current image xt. The representation of optical flow information is used to warp the previously decoded image xt-1to produce a warped representation of the previously decoded image xt-l wfor later use by the residual part of the pipeline.
[0143] Figure 7 illustrates the components of aresidual part of a pipeline comprising an encoder neural network 701 (such as the encoder neural network 211 of Figure 3) and a decoder neural network 702 (such as the decoder neural network 213 of Figure 3)
[0144] The encoder neural network 701 in Figure 7 may be considered as a single neural network or as a plurality of neural network components made up of: a residual encoder neural network 704, a residual hyper encoder neural network 705, a residual hyper hyper encoder neural network 706, a residual decoder neural network 707, a residual hyper decoder neural network 708 and a residual hyper hyper decoder neural network 709, together with corresponding entropy encoding modules 710, 711, 712 that together use the outputs of the decoders 707, 708, 709 to entropy encode the latent representation outputs of the encoders 704, 705, 706 into a bitstream. As shown in Figure 7, the latent representation outputs of the encoders are based on the current image xtand the warped representation of the previously decoded imaget-ljW, produced by the flow part of the pipeline.
[0145] The residual decoder neural network 702 in Figure 7 may be considered as a single neural network or as a plurality of neural network components made up of a residual decoder 707, a residual hyper decoder 708 and a residual hyper hyper decoder 709, with corresponding entropy decoding modules 713, 714, 715 that together use the bitstreams and respective outputs of each other to entropy decode the bitstream and reconstruct the various latent representations into an output image xtwhich is a lossy approximation of the input current image xtfed into the residual encoder 704. Note that the operation of the one or more of the residual decoder 707, the residual hyper decoder 708, the residual hyper hyper decoder 709 of the residual decoder neural network 702 may be conditioned on the warped representation of the previously decoded image xt-l wproduced by the flow part of the pipeline, for example by combining its tensor into an input or output of one or more layers of the networks.
[0146] The flow part and residual part of the pipeline shown in Figures 6 and 7 may be combined into a P- and / or B-frame module, which may be combined with the I-frame part ofthe pipeline, which together may be used as an end-to-end, Al-based I-frame, P- and / or B-frame video compression pipeline. That is, the I-frame part may compress, transmit, and reconstruct a first frame of an image sequence as an 1-frame, and then a plurality of other frames of the image sequence may be compressed, transmitted, and reconstructed as P- and / or B-frames, together forming a group of pictures (GOP).
[0147] One problem of end-to-end, Al-based compression pipelines such as those described above in Figures 1-7, is poor performance (e.g. poor rate distortion scores) whenever there is text present in one or more image of image sequence being compressed. Specific examples of such sequences include video game scenes with text overlays, movie credit scenes, and so on. More generally, such scenes end up with significant compression artifacts after reconstruction on the decode side whereby any text contained in the images is in many cases unreadable.
[0148] One approach to addressing this poor performance is to bias training dataset to increase a proportion of images in the training data that containing text. However, it has been found that taking this approach significantly reduces rate distortion performance on images that do not contain text. Conceptually, increasing the proportion of text containing images during training lets the networks specialize in such images but this comes at the cost of the networks losing their ability to generalize images that do not contain text.
[0149] The inventors have found an alternative approach that not only significantly improves rate distortion performance on images containing text and fixes almost all artefacts on text, but that also unexpectedly improves rate distortion across the board on all types of images.
[0150] More specifically, the inventors have found that conditioning outputs of one or more of the encoder neural networks on a text classifier output results in improved rate distortion performance across all types of scenes (both with and without text) and significantly reduced artefacts in the reconstructed frames.
[0151] Figure 8 illustrates this approach based on the compression pipeline of Figure 2. Like-numbered references refer to like-numbered components and are not repeated here. Unlike in Figure 2, figure 8 further illustrates a text classification network 801 represented as fQextthat receive as input the current frame x and outputs an element-wise text mask (e.g. a 1 or 0) indicative of the presence (or lack thereof) of text at those spatial locations in the input frame x. This output text mask may then be fed as an additional input into the encoder neural network fQof Figure 8. The two inputs may then be further transformed with one or more convolution operations, activation layers, pixel shuffle or un-shuffle operations and so on to produce intermediate tensors of the same shape, after which they may be combined, for example by way of element-wise addition, element-wise multiplication, and so on. In this w ay, the textclassification information captured in the output of the text classification network 801 is encompassed in a combined tensor which is then further processed into the latent representation(s).
[0152] The inventors have found that including a text mask as an input has the effect of hinting to the network that certain regions of the input frame are likely to contain text and thus the networks, if it is advantageous to do so for a given frame, may learn to assign more or fewer bits to different regions of a frame by way of producing latent representations with distributions that can be entropy encoded more or less easily, as determined by the shape of said distributions.
[0153] An exemplary text classification network 801 architecture is set out below where k is the weight kernel shape e.g. k3 means a 3x3 weight kernel shape, where s is the stride e.g. si means a stride of 1, and where c is the number of output channels e.g. cl6 means 16 output channels. This exemplary network architecture runs on a single input channel with spatial dimensions of 1080 x 1920 pixels. This may be for example a luma channel of a YUV colour space. However it is envisaged that other input shapes and colour spaces may also be used.
[0154] Input: tensor[l x 1080 x 1920]
[0155] PixelUnshuffle(4)
[0156] conv, k3slcl6
[0157] relu
[0158] conv, k3slcl6
[0159] relu
[0160] conv, k3s2cl
[0161] relu
[0162] conv, k3slcl6
[0163] relu
[0164] conv, k3slcl6
[0165] relu
[0166] skip-connection} (+)
[0167] conv, k3slcl6
[0168] relu
[0169] upsample(2x)
[0170] skip-connection(+)
[0171] conv, k3slcl6
[0172] reluconv, k3slcl6
[0173] PixelShuffle(4)
[0174] sigmoid
[0175] threshold(0.5)
[0176] Output: tensor[l x 1080 xl920]
[0177] The input tensor of shape 1x1080x1920 is provided and a pixel unshuffle with downsampling factor of a 4 is performed. After this, the network applies a 3x3 convolution with stride 1 and 16 output channels, followed by aReLU activation. This pattern repeats with another 3x3 convolution (stride 1, 16 channels) and ReLU. The network then downsamples using a 3x3 convolution with stride 2 and 16 channels, followed by ReLU. Two more identical blocks of 3x3 convolution (stride 1, 16 channels) with ReLU follow. A skip connection adds the output with a previous feature map. Another 3x3 convolution (stride 1, 16 channels) with ReLU is applied, followed by 2x upsampling. A second skip connection adds these features with an earlier layer. After applying two more 3x3 convolutions (stride 1, 16 channels) with ReLU on the second one, a pixel shuffle with upsampling factor of 4 returns the tensor to the original spatial dimensions. This tensor is thus a tensor of logits in the original spatial dimensions. Finally, to produce the text mask, a sigmoid activation is performed to transform the logits into probabilities and then a threshold operation with value 0.5 is performed to convert the probabilities into a binary’ mask, thus producing the output text mask tensor of shape 1x1080x1920. It will be appreciated that this architecture is exemplary only and other text mask producing architectures are also envisaged, as will be appreciated by the skilled person.
[0178] In order to combine the information in this text mask tensor with the information in the input current frame tensor that is being encoded, the text mask tensor may be passed through whatever convolution and activation operations are being performed the input current frame tensor. For example, if the first layers of the encoder neural network fthetacomprise a first convolution layer with a 4x4 kernel that transforms a 1x1080x1920 shaped luma channel tensor into a first intermediate tensor with shape 16x270x480 and a second convolution layer with a 3x3 kernel that transforms the first intermediate tensor into a second intermediate tensor with shape 64x270x480, then the text mask may also be transformed with corresponding convolution layers into a transformed text mask tensor with shape 64x270x480, which can then be combined by way of element-wise addition or multiplication and so on with the second intermediate tensor which has the same shape. As the tensors are further transformed by the encoder neural network,the information in the text mask thus becomes part of the input frame information, and any output can thus be said to be based on or conditioned on the input text mask.
[0179] It will again be appreciated that these convolution operations and associated input and output tensor shapes are illustrative only and are not intended to be limiting. These are provided only to illustrate how the text mask may be combined into the input frame tensor.
[0180] An additional consideration of Al-based codecs is that it can be challenging to perform real time or near real time encoding and / or decoding (for example at or around 30fps). Running a text classification neural network increases runtime of the compression pipeline. Thus the inventors have found that whilst producing the text mask and conditioning the output of one or more of the encoders on the text mask significantly improves rate distortion performance, the trade off is slower run time.
[0181] However, the inventors have found that omitting the actual production of a text mask and instead conditioning the outputs of one or more of the encoders on the logits produced by the text classification network results in a comparable improvement in rate distortion performance relative to the conditioning on the text mask. The omission of the (element-wise) sigmoid and thresholding operation from the text classification neural network has the effect of reducing the runtime of the text classification neural network and thus partially helps to facilitate real time or near real time operation of the compression pipeline. Thus, instead of combining a tensor associated with the input image with the text mask tensor, the tensor associated with the input image may be combined with a text classification logit tensor for improved runtime that maintains good rate distortion performance on images that contain text, as well as more generally on all types of images.
[0182] Thus, producing the logit tensor may be performed using this illustrative text classitfication network:
[0183] Input: tensor [1 1080 x 1920]
[0184] PixelUnshuffle(4)
[0185] conv, k3slcl6
[0186] relu
[0187] conv, k3slcl6
[0188] relu
[0189] conv, k3s2cl6
[0190] relu
[0191] conv, k3slcl6relu
[0192] conv, k3slcl6
[0193] relu
[0194] skip-connection(+)
[0195] conv, k3slcl6
[0196] relu
[0197] upsample(2x)
[0198] skip-connection(+)
[0199] conv, k3slcl6
[0200] relu
[0201] conv, k3slcl6
[0202] PixelShuffle(4)
[0203] Output: tensor[l x 1080 x 1920]
[0204] The input tensor of shape 1x1080x1920 is provided and a pixel unshuffle with downsampling factor of a 4 is performed. After this, the network applies a 3x3 convolution with stride 1 and 16 output channels, followed by aReLU activation. This pattern repeats with another 3x3 convolution (stride 1, 16 channels) and ReLU. The network then downsamples using a 3x3 convolution with stride 2 and 16 channels, followed by ReLU. Two more identical blocks of 3x3 convolution (stride 1. 16 channels) with ReLU follow. A skip connection adds the output with a previous feature map. Another 3x3 convolution (stride 1, 16 channels) with ReLU is applied, followed by 2x upsampling. A second skip connection adds these features with an earlier layer. After applying two more 3x3 convolutions (stride 1, 16 channels) with ReLU on the second one, a pixel shuffle with upsampling factor of 4 returns the tensor to the original spatial dimension of 1x1080x1920. This tensor is the output tensor of logits now in the original spatial dimensions of the input.
[0205] Figures 9 and 10 illustratively show where the inventors have found it to be particularly advantageous to condition outputs of one or more encoders on the text mask tensor or text logits tensor of the text classification network.
[0206] Figure 9 shows a residual part of a compression pipeline corresponding to Figure 7. Like-numbered references refer to like-numbered elements and are not repeated here. Figure 9 additionally shows a text classification neural netw ork 901 , for example having the architecture as described above with reference to Figure 8, or any other text classification neural network architecture. The text classification neural network 901 outputs a text mask tensor or a text logittensor (for faster run time) that is fed into the residual encoder 704, transformed by one or more convolution operations, activations and so on to get it into the same shape as the other input tensors, before all the input tensors are combined by an element-wise addition operation or multiplication operation. The information associated with the text classification neural network 901 output is thus embedded in the tensors as they work their way through the encoders and decoders of the pipeline. It will be appreciated that the text mask tensor or logit tensor may also or alternatively be combined into inputs or outputs of other layers of the residual encoder 704.
[0207] Figure 10 shows a flow part of a compression pipeline corresponding to Figure 6. Like-numbered references refer to like-numbered elements and are not repeated here. Figure 10 additionally shows a text classification neural network 1001, for example having the architecture described above with reference to Figure 8, or any other text classification neural network architecture. The text classification neural network 1001 outputs a text mask tensor or a text logit tensor (for faster run time) that is fed into the flow encoder 606, transformed by one or more convolution operations, activations and so on to get it into the same shape as whatever input or intermediate tensors it is to be combined with. For example, the flow encoder 606 may comprise a pyramid structure whereby the input current frame and reference frame are consecutively downsampled to produce tensors of increasingly lower spatial resolutions, and whereby a flow estimation on the lowest resolution tensor is used to warp the tensor of the next resolution up, which in turn is used to estimate flow and warp the tensor of the next resolution up and so on until the final flow estimation at the full resolution of the initial input current and reference frame. In this structure, the text mask tensor or logit tensor may be combined with the optical flow tensors of each of the resolutions of the pyramid. Accordingly one or more convolution operations, pixel shuffle or un-shuffle operations, max pooling layers and so on may be used to transform the text mask tensor or logit tensor into the right shape to facilitate element wise addition or multiplication with the respective flow tensors at each resolution.
[0208] It will be appreciated that the text classification neural network has been described and illustrated separately in each of Figures 8, 9, and 10. However, if it is being implemented in more than just one of the I-frame part, flow- part and / or residual part then it only needs to be run once and its output text mask tensor or logit tensor may be used across all of the parts of the compression pipeline where it is used as an input.
[0209] The text classification neural netw orks described above may be trained in a standalone manner from the rest of the neural netw orks of the compression pipeline using any suitable training data set and training regime, including but not limited to supervised learning. Such a training dataset may include synthetic data, for example frames of widely used videocompression benchmark sequences with overlaid text synthetically added to the sequences. Alternatively, it is also envisaged that the text classification neural networks described above may be trained end-to-end with the rest of the networks.
[0210] It will also be appreciated that conditioning on binary or logit masks is not limited to text classification but it is also envisaged that the same approach may be taken for improving rate distortion performance on images and / or image sequences that contain other feature, object, and / or class types where Al-based compression may under perform.
[0211] For example, image sequences that simultaneously contain real world footage and 3D or 2D cartoons are often difficult for Al-codecs to encode and decode well. In this case, the classification neural network described above may be trained to produce a binary or logit mask identifying pixels where 3D or 2D cartoon objects are likely to be in the image and the outputs of one or more of the other neural networks may be conditioned on these masks.
[0212] In another example, image sequences that image sequences that contain areas with very high frequency detail and texture are often difficult for Al-codecs to encode and decode well. In this case, the classification neural network described above may be trained to produce a binary or logit mask identifying pixels where such high frequency detail and texture is likely to be and the outputs of one or more of the other neural networks may be conditioned on these masks.
[0213] These examples are not intended to be limiting. It is envisaged that there are many other such features, objects and / or class types where the use of a classification network and conditioning on binary or logit masks may be used to improve performance on images and / or image sequences containing such features, objects and / or class types, which the present disclosure is envisaged to encompass.
[0214] The subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. The subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or in addition, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The computer storage medium can be a machine-readablestorage device, a machine-readable storage substrate, a random or serial access memory' device, or a combination of one or more of them. The computer storage medium is not, however, a propagated signal.
[0215] The term "data processing apparatus" encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). The apparatus can also include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0216] A computer program (which may also be referred to or described as a program, software, a software application, a module, a software module, a script, or code) can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub programs, or portions of code. A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
[0217] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
[0218] Computers suitable for the execution of a computer program include, by way of example, can be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read only memory or a random access memory’ or both. The essential elements of a computer are a central processing unit for performing or executing instructions and one or morememory7devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a VR headset, a game console, a Global Positioning System (GPS) receiver, a server, a mobile phones, a tablet computer, a notebook computer, a music player, an e-book reader, a laptop or desktop computer, a PDAs, a smart phone, or other stationary or portable devices, that includes one or more processors and computer readable media, or a portable storage device, e.g., a universal serial bus (USB) flash drive, to name just a few.
[0219] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks. The processor and the memory' can be supplemented by, or incorporated in, special purpose logic circuitry.
[0220] The subject matter described in this specification can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network ("LAN") and a wide area network ("WAN"), e.g., the Internet.
[0221] The computing system can include clients and servers. A client and server are generally remote from each other and ty pically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
[0222] While this specification contains many specific implementation details, these should be construed as descriptions of features that may be specific to particular examples of particular inventions. Certain features that are described in this specification in the context of separate examples can also be implemented in combination in a single example. Conversely, variousfeatures that are described in the context of a single example can also be implemented in multiple examples separately or in any suitable sub-combination.
[0223] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the examples described above should not be understood as requiring such separation in all examples, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Claims
CLAIMS1. A method for lossy image or video encoding and transmission, the method comprising: receiving a first image and classification information associated with the first image at a first computer system;with a first neural network, producing a latent representation of the first image using the classification information;transmitting the latent representation of the first image to a second computer system.
2. A method for lossy image or video receipt and decoding, the method comprising:receiving at a second computer system a latent representation of a first image, the latent representation of the first image produced by a first neural network using the first image and classification information associated with the first image;with a second neural network, decoding the latent representation of the first image to produce an output image, wherein the output image is an approximation of the first image.
3. An apparatus comprising one or more processors and at least one memory' coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving a first image and classification information associated with the first image at a first computer system;with a first neural network, producing a latent representation of the first image using the classification information;transmitting the latent representation of the first image to a second computer system.
4. An apparatus comprising one or more processors and at least one memory' coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving at a second computer system a latent representation of a first image, the latent representation of the first image produced by a first neural network using the first image and classification information associated with the first image;with a second neural network, decoding the latent representation of the first image to produce an output image, wherein the output image is an approximation of the first image.
5. The method of claim 1 or 2 or the apparatus of claim 3 or 4, wherein the classification information comprises a mask indicative of a presence of a class in one or more pixels of the first image.
6. The method of claim 1 or 2 or the apparatus of claim 3 or 4, wherein the classification information comprises a plurality of logits indicative of a present of a class in one or more pixels of the first image.
7. The method of any one of claims 1, 5 or 6 or the apparatus of any one of claims 3, 5 or 6, wherein using the classification information comprises conditioning the latent representation of the first image on the classification information.
8. The method of any one of claims 1 or 5 to 7 or the apparatus of any one of claims 3 or 5 to 7. comprising performing one or more convolution operations on the first image and one or more convolution operations on the classification information to produce respective feature map tensors, combining the feature map tensors into a combined feature map tensor, and producing the latent representation of the first image using the combined feature map tensor.
9. The method of any one of claims 1 or 5 to 8 or the apparatus of any one of claims 3 or 5 to 8, comprising with a third neural network producing the classification information using the first image.
10. The method of claim 9 or the apparatus of claim 9, wherein the third neural network comprises between 1 and 16 convolution layers, preferably between 6 and 10 convolution layers, preferably 8 convolution layers.
11. The method of claim 9 or 10 or the apparatus of claim 9 or 10, wherein the third neural network comprises between 1 and 14 activation layers, preferably between 5 and 9 activation layers, preferably 7 activation layers.
12. The method of any one of claims 1, 2 or 5 to 11 or the apparatus of any one of claims 3 to 11, wherein the first image comprises a plurality of image channels and wherein using the first image comprises using a subset of the image channels.
13. The method of claim 12 or the apparatus of claim 12. wherein the first image comprises a YUV image with a luma channel and chroma channels, and wherein using a subset of the image channels comprises using the luma channel.
14. A method for residual information encoding and transmission, the method comprising: receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system;with a first neural network, producing a latent representation of residual information using the first image, the classification information associated with the first image, and the one or more second images, the residual information being indicative of a difference between the first image and the one or more second images;transmitting the latent representation of residual information to a second computer system.
15. A method for residual information receipt and decoding, the method comprising:receiving at a second computer system a latent representation of residual information, the latent representation of residual information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images of an image sequence, the residual information being indicative of a difference between the first image and the one or more second images; andwith a second neural network, decoding the latent representation of residual information to produce an output image, wherein the output image is an approximation of the first image.
16. An apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system;with a first neural network, producing a latent representation of residual information using the first image, the classification information associated with the first image, and the one or more second images, the residual information being indicative of a difference between the first image and the one or more second images;transmitting the latent representation of residual information to a second computer system.
17. An apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving at a second computer system a latent representation of residual information, the latent representation of residual information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images of an image sequence, the residual information being indicative of a difference between the first image and the one or more second images; andwith a second neural network, decoding the latent representation of residual information to produce an output image, wherein the output image is an approximation of the first image.
18. The method of claim 14 or 15 or the apparatus of claims 16 or 17, wherein the classification information comprises a mask indicative of a presence of a class in one or more pixels of the first image.
19. The method of claim 14 or 15 or the apparatus of claims 16 or 17, wherein the classification information comprises a plurality of logits indicative of a present of a class in one or more pixels of the first image.
20. The method of any one of claims 14, 18 or 19 or the apparatus of any one of claims 16, 18 or 19, wherein using the classification information comprises conditioning the latent representation of residual information on the classification information.
21. The method of any one of claims 14 or 18 to 20 or the apparatus of any one of claims 1 or 18 to 20, comprising performing one or more convolution operations on the first image and one or more convolution operations on the classification information to produce respective feature map tensors, combining the feature map tensors into a combined feature map tensor, and producing the latent representation of the residual information using the combined feature map tensor.
22. The method of any one of claims 14 or 18 to 21 or the apparatus of any one of claims 16 or 18 to 21, comprising with a third neural network producing the classification information using the first image.
23. The method of claim 22 or the apparatus of claim 22. wherein the third neural network comprises between 1 and 16 convolution layers, preferably between 6 and 10 convolution layers, preferably 8 convolution layers.
24. The method of claim 22 or 23 or the apparatus of claim 22 or 23. wherein the third neural network comprises between 1 and 14 activation layers, preferably between 5 and 9 activation layers, preferably 7 activation layers.
25. The method of any one of claims 14, 15, or 18 to 24 or the apparatus of any one of claims 16 to 24, wherein the first image comprises a plurality of image channels and wherein using the first image comprises using a subset of the image channels.
26. The method of claim 25 or the apparatus of claim 25, wherein the first image comprises a YUV image with a luma channel and chroma channels, and wherein using a subset of the image channels comprises using the luma channel.
27. A method for flow encoding and transmission, the method comprising:receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system;with a first neural network, producing a latent representation of optical flow information using the first image, the classification information associated with the first image, and the one or more second images, the optical flow information being indicative of a difference between the first image and the one or more second images; andtransmitting the latent representation of the optical flow information to a second computer system.
28. A method for flow receipt and decoding, the method comprising:receiving at a second computer system a latent representation of optical flow information, the latent representation of optical flow information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images, the optical flow information being indicative of a difference between the first image and the one or more second images; andwith a second neural network, decoding the latent representation of optical flow information to produce an approximation of the optical flow information.
29. An apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving a first image, classification information associated with the first image, and one or more second images of an image sequence at a first computer system;with a first neural network, producing a latent representation of optical flow information using the first image, the classification information associated with the first image, and the one or more second images, the optical flow information being indicative of a difference between the first image and the one or more second images; andtransmitting the latent representation of the optical flow information to a second computer system.
30. An apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to perform: receiving at a second computer system a latent representation of optical flow information, the latent representation of optical flow information produced with a first neural network using a first image, classification information associated with the first image, and one or more second images, the optical flow information being indicative of a difference between the first image and the one or more second images; andwith a second neural network, decoding the latent representation of optical flow information to produce an approximation of the optical flow information.
31. The method of claim 27 or 28 or the apparatus of claim 29 or 30 wherein the classification information comprises a mask indicative of a presence of a class in one or more pixels of the first image.
32. The method of claim 27 or 28 or the apparatus of claim 29 or 30, wherein the classification information comprises a plurality of logits indicative of a present of a class in one or more pixels of the first image.
33. The method of any one of claims 27, 31 or 32 or the apparatus of any one of claims 29, 31 or 32, wherein using the classification information comprises conditioning the latent representation of optical flow information on the classification information.
34. The method of any one of claims 27 or 31 to 33 or the apparatus of any one of claims 29 or 31 to 33, wherein producing the latent representation of optical flow information comprises:performing a plurality of downsampling operations on the first image, the classification information, and the one or more second images to produce a sequence of increasingly lower resolution first images, classification information, and one or more second images;estimating a representation of optical flow information at a lowest resolution of the increasingly lower resolutions;and performing the steps of:using the estimated optical flow information to warp a first image at a higher resolution of the sequence of increasingly lower resolutions;estimating a representation of optical flow information at the higher resolution using the warped first image at the higher resolution;repeating said steps a predetermined number of times to produce a final representation of optical flow information; andwith the first neural network producing the latent representation of optical flow information using the final representation of optical flow information.
35. The method of claim 34 or the apparatus of claim 34 when dependent on claim 33, wherein conditioning the latent representation of optical flow information on the classification information comprises combining the classification information with each of the representations of optical flow information at each of the higher resolutions.
36. The method of claim 35 or the apparatus of claim 35. comprising performing one or more convolution operations on the classification information to produce respective feature map tensors, and wherein combining the classification information with each of the representation of optical flow information comprises combining the respective feature map tensors with the respective representations of optical flow information.
37. The method of any one of claims 27 or 31 to 36 or the apparatus of any one of claims 29 or 31 to 36, comprising with a third neural netw ork producing the classification information using the first image.
38. The method of claim 37 or the apparatus of claim 37, wherein the third neural network comprises between 1 and 16 convolution layers, preferably between 6 and 10 convolution layers, preferably 8 convolution layers.
39. The method of claim 37 or 38 or the apparatus of claim 37 or 38, wherein the third neural network comprises between 1 and 14 activation layers, preferably between 5 and 9 activation layers, preferably 7 activation layers.
40. The method of any one of claims 27, 28 or 31 to 39 or the apparatus of any one of claims 29 to 39, wherein the first image comprises a plurality of image channels and wherein using the first image comprises using a subset of the image channels.
41. The method of claim 40 or the apparatus of claim 40, wherein the first image comprises a YUV image with a luma channel and chroma channels, and w herein using a subset of the image channels comprises using the luma channel.
42. The method of any one of claims 1, 2, 5 to 15, 18 to 28 or 31 to 41 or the apparatus of any one of claims 3 to 13, 16 to 26 or 29 to 41, wherein the classification information comprises text classification information.
43. A computer program comprising instructions which, when the program is executed by a computer, cause the computer to carry out the method of any one of claims 1, 2, 5 to 15, 18 to 28 or 31 to 42.
44. A computer-readable storage medium comprising instructions which, when executed by a computer, cause the computer to carry out the method of any one of claims 1, 2, 5 to 15, 18 to 28 or 31 to 42.