Image encoding and decoding, video encoding and decoding methods, systems and training methods
Patent Information
- Application Number
- JP2023524846
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-10-23
- Filing Date
- 2021-10-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-10-25
AI Technical Summary
The increasing demand for high-resolution image and video content is straining communication networks and energy resources, leading to higher costs and environmental impact, while existing compression methods do not efficiently reduce data transmission without compromising quality.
A computer-implemented method using neural networks for lossy or lossless image and video compression, involving encoding with an encoder and hyperencoder, quantizing latent representations, and using implicit encoding solvers to reduce computational cost and time.
This method significantly reduces energy consumption and encoding/decoding times in portable devices by optimizing compression algorithms, allowing faster training and lower computational effort in AI-based pipelines.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical Field]
[0001] 1. Field of the invention The field of the invention relates to computer-implemented methods and systems for image encoding and decoding, computer-implemented methods and systems for video encoding and decoding, computer-implemented training methods, and related computer program products. [Background technology]
[0002] 2.Technical background Users of communication networks are increasingly demanding image and video content. This increases the number of images displayed and the duration of video playback, as well as the need for higher resolution, lower distortion content. This increases demands on communication networks and increases energy usage, which can have adverse effects on costs and the environment, for example.
[0003] Although image and video content is typically transmitted over communications networks in compressed form, it is desirable to increase compression while maintaining the displayed image quality, or to increase the displayed image quality without increasing the amount of data actually transmitted over the communications network, thereby reducing the demands on the communications network compared to what would otherwise be required.
[0004] 3. Considerations regarding related technologies U.S. Patent No. 10,373,300 B1 discloses a system and method for lossy image and video compression and transmission that utilizes a neural network as a function to map a known noisy image to a desired or target image, and transfers only the hyperparameters of the function, rather than a compressed version of the image itself. This allows any system receiving the hyperparameters to reproduce a high-quality approximation of the target image, provided it has the same noisy image and a similar neural network. Compared to existing image compression techniques, the amount of data required to transmit an image of a given image quality is dramatically reduced. Because video is simply a series of images, applying this image compression system and method allows video content to be transmitted at a higher rate than conventional techniques for the same image quality.
[0005] US Patent No. 10,489,936 B1 discloses a system and method for lossy image and video compression that utilizes a meta-network to generate a set of hyper-parameters required for an image coding network to reconstruct a desired image from a given noisy image. Summary of the Invention
[0006] An advantage of the computer-implemented methods, computer systems, and computer program products described below is reduced energy consumption.
[0007] The decoding computer system described below can be implemented as a portable or mobile device (e.g., a smartphone, a tablet computer, or a laptop computer), with the advantage being that the battery charge consumption of the portable or mobile device is reduced.
[0008] According to a first aspect of the present invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission, the method comprising: (i) receiving an input image; (ii) encoding the input image using the encoder-trained neural network to generate a latent representation of y; (iii) encoding the y latent representation using a hyper-encoder trained neural network to generate a z hyper-latent representation; (iv) quantizing the z hyper-latent representations using a predetermined entropy parameter to generate quantized z hyper-latent representations; (v) entropy encoding the quantized z hyper-latent representation into a first bitstream using a predetermined entropy parameter; (vi) A hyperdecoder trained neural network is used to process the quantized Z hyperlatent representation to obtain the location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the context matrix A y and obtaining (vii) Using an implicit coding solver, we obtain the latent representation of y and the location entropy parameter μ y , and the context matrix A y to obtain a quantized latent residual; (viii) Entropy scale parameter σ y entropy coding the quantized latent residual into a second bitstream using (ix) transmitting the first bitstream and the second bitstream.
[0009] The advantage is that ground truth variables (image or latent) can be easily used during training of the compression algorithm, which speeds up training. Since the implicit coding solver (IES) also returns the quantized y latent representation, the quantized y latent representation is already given, eliminating the need to run a separate decoding solver during training to recover the quantized y latent representation from the latent residual. This speeds up training. The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline is only a small fraction of the computation of the entire pipeline. The advantage is reduced encoding time.
[0010] The method further comprises, in step (iv), determining whether the predetermined entropy parameter is a predetermined position entropy parameter μ z and in step (v), the predetermined entropy parameter is a predetermined position entropy parameter μ z and a given entropy scale parameter σ z The advantage is that the entropy parameters are processed faster, resulting in shorter coding times.
[0011] The method may be one in which an implicit coding solver solves an implicit equation; (I) The quantized latent residual is the sum of the latent representations of y - μ y - A operates on the quantized latent representation of y y is equal to the quantization function of (II) The quantized y latent representation is the quantized latent residual + μ y + A operates on the quantized y latent representation y is equal to.
[0012] The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computational effort in the entire pipeline. The advantage is reduced encoding time.
[0013] The method may be one in which the implicit coding solver solves the implicit equation by defining B=IA, where A is an m×m matrix and I is an m×m identity matrix, where (a) if B is lower triangular, then iterative forward substitution is used, or (b) if B is upper triangular, then successive backsubstitution is used, or (c) B is factorized as a triangular decomposition, then B * y = μ + ξ (hat: a letter with the symbol ^ above it; the same applies below), where ξ (hat) is the quantized residual, solved by inverting the lower triangular factor by forward substitution and the upper triangular factor by backward substitution, or (d) B is factorized by QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y = LR -1 Q t μ, Qt is Q-transpose, or B is factored using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, and Q is inverted by its transpose, R is inverted by backsubstitution, and L is inverted by forward substitution, respectively, and the solution is y=L -1 Q t μ, or y=Q t R -1 μ, or y=Q t L -1 μ, or (e) B=D+L+U, where D is a diagonal matrix, where L is strictly lower triangular and U is strictly upper triangular, and an iterative Jacobi method is applied until a convergence criterion is met, or (f) the Gauss-Seidel method is used, or (g) the iterative accelerated relaxation method is used, or (h) the conjugate gradient method is used.
[0014] The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computational complexity of the entire pipeline. The advantage is reduced encoding time.
[0015] In the method, the implicit coding solver may use an iterative solver to solve the implicit equations, and the iterations may be terminated when a convergence criterion is met. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computational complexity of the entire pipeline. An advantage is that the coding time is reduced.
[0016] The method may be one in which the implicit coding solver returns a residual and a quantized latent representation y. An advantage is that because the implicit coding solver (IES) also returns a quantized y latent representation, there is no need to run a separate decoding solver during training to recover the quantized y latent representation from the latent residual, which accelerates training because the quantized y latent representation is already given.
[0017] The method may be such that matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse banded structure, or A is a block matrix, or A is constructed such that its matrix norm is less than 1, or A is parameterized by a matrix decomposition such as LU decomposition or QR decomposition. The advantage is faster encoding time.
[0018] According to a second aspect of the present invention, there is provided an encoding computer system for lossy or lossless image or video compression and transmission, the encoding computer system comprising an encoding computer, an encoder-trained neural network, a hyper-encoder-trained neural network and a hyper-decoder-trained neural network; (i) an encoding computer configured to receive an input image; (ii) the encoding computer is configured to encode the input image using the encoder-trained neural network to generate y latent representations; (iii) the encoding computer is configured to encode the y latent representation using a hyper-encoder trained neural network to generate a z hyper-latent representation; (iv) the encoding computer is configured to quantize the z hyper-latent representation using a predetermined entropy parameter to generate a quantized z hyper-latent representation; (v) the encoding computer is configured to entropy encode the quantized z hyper-latent representation into a first bitstream using a predetermined entropy parameter; (vi) The encoding computer processes the quantized Z hyper-latent representation using a hyper-decoder trained neural network to obtain a location entropy parameter μ y , the entropy scale parameter σy, and the context matrix A of the y latent representation y configured to obtain (vii) The encoding computer uses an implicit encoding solver to generate a latent representation of y, a location entropy parameter μy, and a context matrix A y to obtain a quantized latent residual; (viii) The encoding computer determines the entropy scale parameter σ y configured to entropy encode the quantized latent residual into a second bitstream using (ix) An encoding computer system is provided, wherein the encoding computer is configured to transmit the first bitstream and the second bitstream.
[0019] The system may be configured to carry out the method of any of the first aspects of the present invention.
[0020] According to a third aspect of the present invention, there is provided a computer implemented method for lossy or lossless image or video decoding, the method comprising: (i) receiving a first bitstream and a second bitstream; (ii) decoding the first bitstream using an arithmetic decoder with a predetermined entropy parameter to generate a quantized z hyper-latent representation; (iii) Using a hyperdecoder-trained neural network, we decode the quantized z hyperlatent representation to obtain the location entropy parameter μ y , the entropy scale parameter σ y , and the context matrix A of the latent representation of y y obtaining a (iv) In the arithmetic decoder, the entropy scale parameter σ y decoding the second bitstream using (v) quantized latent residual, location entropy parameter μ y , and the context matrix A y with a (e.g., implicit) (e.g., linear) decoding solver to obtain a quantized y latent representation; (vi) decoding the quantized y latent representation using a decoder-trained neural network to obtain a reconstructed image.
[0021] The computational cost of using an iterative linear solver in an AI-based compression pipeline is a small fraction of the total computational complexity of the entire pipeline, resulting in faster decoding times.
[0022] The method further comprises: in step (ii), determining whether the predetermined entropy parameter is a predetermined position entropy parameter μ z and a given entropy scale parameter σ z The advantage is that the entropy parameters are processed faster and the decoding time is reduced.
[0023] The method may include the step of (vii) storing the reconstructed image.
[0024] The method involves a (e.g., implicit) (e.g., linear) decoding solver, where the quantized y latent representation is decomposed into a quantized latent residual + μ y + A operates on the quantized y latent representationy , the advantage is that the decoding time is reduced.
[0025] The method may be one in which the (e.g., implicit) (e.g., linear) decoding solver solves the (e.g., implicit) equation by defining B=IA, where A is an m×m matrix and I is an m×m identity matrix, where (a) if B is lower triangular, then iterative forward substitution is used, or (b) if B is upper triangular, then successive backward substitution is used, or (c) B is factorized as a triangular decomposition, then B * y = μ + ξ(∇∇∇), where ξ(∇∇∇) is the quantized residual, solved by inverting the lower triangular factors by forward substitution and inverting the upper triangular factors by backward substitution, or (d) B is factorized by QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y = LR -1 Q t μ, Qt is Q-transpose, or B is factored using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, and Q is inverted by its transpose, R is inverted by backsubstitution, and L is inverted by forward substitution, respectively, and the solution is y=L -1 Q t μ, or y=Q t R -1 μ, or y=Q t L -1 μ, or (e) B=D+L+U, where D is a diagonal matrix, where L is strictly lower triangular and U is strictly upper triangular, and an iterative Jacobi method is applied until a convergence criterion is met, or (f) the Gauss-Seidel method is used, or (g) the iterative accelerated relaxation method is used, or (h) the conjugate gradient method is used.
[0026] The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computational complexity of the entire pipeline. The advantage is reduced decoding time.
[0027] The method may use an iterative solver that terminates its iterations when a convergence criterion is reached. The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computation for the entire pipeline. The advantage is reduced decoding time.
[0028] The method may be such that the (eg, implicit) (eg, linear) decoding solver (eg, any linear equation solver) is not necessarily the same type of solver (eg, it is different) as the solver used in encoding.
[0029] The method may be such that matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse band structure, or A is a block matrix, or A is constructed such that its matrix norm is less than 1, or A is parameterized by a matrix decomposition such as LU decomposition or QR decomposition. The advantage is that the decoding time is reduced.
[0030] According to a fourth aspect of the present invention, there is provided a decoding computer system for lossy or lossless image or video decoding, the decoding computer system comprising a decoding computer, a decoder-trained neural network, and a hyper-decoder-trained neural network; (i) a decoding computer configured to receive a first bitstream and a second bitstream; (ii) the decoding computer is configured to decode the first bitstream using an arithmetic decoder with a predetermined entropy parameter to generate a quantized z hyper-latent representation; (iii) The decoding computer decodes the quantized z hyper-latent representation using a hyper-decoder trained neural network to obtain a location entropy parameter μ y , the entropy scale parameter σ y , and y is the latent representation context matrix A y configured to obtain (iv) a decoding computer, an entropy scale parameter σ in the arithmetic decoder; y to output a quantized latent residual; (v) a decoding computer, using a (e.g., implicit) (e.g., linear) decoding solver, to compute the quantized latent residual, the position entropy parameter μ y and the context matrix A y to obtain a quantized y latent representation; (vi) Decoding Computer: A decoding computer system is provided that is configured to decode the quantized Y latent representation using a decoder training neural network to obtain a reconstructed image.
[0031] The system may be configured to carry out the method of any aspect according to the third aspect of the invention.
[0032] According to a fifth aspect of the present invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission and lossy or lossless image or video decoding, the method including the method of any aspect of the first aspect of the present invention and the method of any aspect of the third aspect of the present invention.
[0033] The advantage is that ground truth variables (image or latent) can be easily used during training of the compression algorithm, which speeds up training. The advantage is that the implicit coding solver (IES) also returns the quantized y latent representation, so there is no need to run a separate decoding solver during training to recover the quantized y latent representation from the latent residual; the quantized y latent representation is already given, which speeds up training. The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline is a small fraction of the total computational complexity of the entire pipeline. The advantage is reduced encoding time. The advantage is reduced decoding time.
[0034] According to a sixth aspect of the present invention, there is provided a system for lossy or lossless image or video compression and transmission, and lossless image or video decoding, the system including any of the systems of the second aspect of the present invention and any of the systems of the fourth aspect of the present invention.
[0035] According to a seventh aspect of the present invention, there is provided a computer-implemented method of training an encoder neural network, a decoder neural network, a hyperencoder neural network, and a hyperdecoder neural network, and entropy parameters, the neural networks and entropy parameters being for use in lossless image or video compression, transmission, and decoding, the method comprising: (i) receiving input training images; (ii) encoding the input training images using an encoder neural network to generate y latent representations; (iii) encoding the y latent representation using a hyperencoder neural network to generate a z hyper-latent representation; (iv) quantizing the z hyper-latent representation using one of the entropy parameters to generate a quantized z hyper-latent representation; (v) entropy encoding the quantized z hyper-latent representation into a first bitstream using the entropy parameter; (vi) Process the quantized z hyper-latent representation using a hyper-decoder neural network to obtain the location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the context matrix A y and obtaining (vii) Using an implicit coding solver, we obtain the latent representation of y and the location entropy parameter μ y and the context matrix A y to obtain a quantized latent residual; (viii) Entropy scale parameter σ y entropy coding the quantized latent residual into a second bitstream using (ix) decoding the first bitstream using an arithmetic decoder with the entropy parameter to generate a quantized z hyper-latent representation; (x) Using a hyper-decoder neural network, the quantized z hyper-latent representation is decoded to obtain the location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the context matrix A y and obtaining (xi) In the arithmetic decoder, the entropy scale parameter σ y to obtain a quantized latent residual output; (xii) Using a (e.g., implicit) (e.g., linear) decoding solver, the quantized latent residual, the position entropy parameter μ y , and the context matrix A y to obtain a quantized latent representation of y; (xiii) decoding the quantized y latent representation using a decoder neural network to obtain a reconstructed image; (xiv) evaluating a loss function based on the difference between the reconstructed images and the input training images and a rate term; (xv) evaluating the gradient of the loss function; (xvi) backpropagating the gradient of the loss function through the decoder neural network, through the hyperdecoder neural network, through the hyperencoder neural network, through the encoder neural network, and updating the weights of the encoder, decoder, hyperencoder, and hyperdecoder using the entropy parameter; and updating the entropy parameter. (xvii) repeating steps (i) through (xvi) with a set of training images to generate a trained encoder neural network, a trained hyper-encoder neural network, a trained decoder neural network, a trained hyper-decoder neural network, and a trained entropy parameter; (xviii) storing weights of the training encoder neural network, the trained decoder neural network, the trained hyper-encoder neural network, and the trained hyper-decoder neural network, and storing trained entropy parameters.
[0036] The advantage is that ground truth variables (image or latent) can be easily used during training of the compression algorithm. The advantage is that the implicit coding solver (IES) also returns the quantized y latent representation, so there is no need to run a separate decoding solver during training to recover the quantized y latent representation from the latent residual. The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline is a small fraction of the total computational complexity of the compression pipeline. The computational complexity of the entire pipeline can be reduced. The advantage is faster encoding time. The advantage is faster decoding time.
[0037] The method further comprises the step (iv) of determining the entropy parameter as a position entropy parameter μ z and in steps (v), (ix) and (xvi) to (xviii), the entropy parameter is the position entropy parameter μ z and the entropy scale parameter σ z An advantage is that faster processing of the entropy parameters is provided, thus reducing the encoding time.An advantage is that faster processing of the entropy parameters is provided, thus reducing the decoding time.
[0038] The method may be one in which an implicit coding solver solves an implicit equation; (I) The quantized latent residual is the sum of the latent representations of y - μ y - A operates on the quantized latent representation of y y is equal to the quantization function of (II) The quantized y latent representation is the quantized latent residual + μ y + A operates on the quantized y latent representation y is equal to.
[0039] The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computational effort in the entire pipeline. The advantage is reduced encoding time.
[0040] The method may be one in which a (e.g., implicit) (e.g., linear) decoding solver solves the (e.g., implicit) equation that the quantized y latent representation is equal to the quantized latent residual + μ + A acting on the quantized y latent representation. The advantage is that the decoding time is reduced.
[0041] The method may be one in which ground truth variables (image or latent) are used during training of the compression algorithm. The advantage is that the encoding time is reduced.
[0042] The method may be one in which the implicit coding solver solves the implicit equation by defining B=IA, where A is an m×m matrix and I is an m×m identity matrix, where (a) if B is lower triangular, then iterative forward substitution is used, or (b) if B is upper triangular, then successive backsubstitution is used, or (c) B is factorized as a triangular decomposition, then B * y = μ + ξ(∇∇∇), where ξ(∇∇∇) is the quantized residual, solved by inverting the lower triangular factors by forward substitution and inverting the upper triangular factors by backward substitution, or (d) B is factorized by QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y = LR -1 Q tμ, Qt is Q-transpose, or B is factored using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, and Q is inverted by its transpose, R is inverted by backsubstitution, and L is inverted by forward substitution, respectively, and the solution is y=L -1 Q t μ, or y=Q t R -1 μ, or y=Q t L -1 μ, or (e) B=D+L+U, where D is a diagonal matrix, L is strictly lower triangular, and U is strictly upper triangular; an iterative Jacobi algorithm is applied until a convergence criterion is met; or (f) a Gauss-Seidel algorithm is used; or (g) a sequentially accelerated relaxation algorithm is used; or (h) a conjugate gradient algorithm is used. The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computational complexity of the entire pipeline. The advantage is reduced encoding time.
[0043] The method may be one in which the (e.g., implicit) (e.g., linear) decoding solver solves an implicit equation by defining B=IA, where A is an m×m matrix and I is an m×m identity matrix, where (a) if B is lower triangular, then iterative forward substitution is used, or (b) if B is upper triangular, then successive backward substitution is used, or (c) B is factorized as a triangular decomposition, then B * y = μ + ξ(∇∇∇), where ξ(∇∇∇) is the quantized residual, solved by inverting the lower triangular factors by forward substitution and inverting the upper triangular factors by backward substitution, or (d) B is factorized by QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y = LR -1 Q t μ, Qt is Q-transpose, or B is factored using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, and Q is inverted by its transpose, R is inverted by backsubstitution, and L is inverted by forward substitution, respectively, and the solution is y=L -1 Q t μ, or y=Q t R-1 μ, or y=Q t L -1 μ, or (e) B=D+L+U, where D is a diagonal matrix, L is strictly lower triangular, and U is strictly upper triangular; an iterative Jacobi algorithm is applied until a convergence criterion is met; or (f) a Gauss-Seidel algorithm is used; or (g) a sequentially accelerated relaxation algorithm is used; or (h) a conjugate gradient algorithm is used. The advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computational complexity of the entire pipeline. The advantage is reduced decoding time.
[0044] The method may be such that the quantized y latent representation returned by the solver is used elsewhere in the data compression pipeline, thus eliminating the need to run the decoding solver during training, which may significantly reduce the time required to train an AI-based compression algorithm.
[0045] The method may be such that the implicit solver solves the implicit equations using an iterative solver, the iterations being terminated when a convergence criterion is met.
[0046] The method may be one in which the implicit coding solver returns a residual and a quantized latent representation y.
[0047] The method may be one in which matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, A has a sparse banded structure, A is a block matrix, A is configured such that its matrix norm is less than 1, or A is parameterized via a matrix decomposition such as LU or QR decomposition. An advantage is reduced encoding time. An advantage is reduced decoding time.
[0048] The method may be such that the (e.g., implicit) (e.g., linear) decoding solver (e.g., any linear equation solver) is not necessarily the same type of solver (e.g., different from) the solver used in encoding.
[0049] According to an eighth aspect of the present invention there is provided a computer program product executable on a processor for training an encoder neural network, a decoder neural network, a hyperencoder neural network and a hyperdecoder neural network and entropy parameters, wherein the neural networks and entropy parameters are for use in lossless image or video compression, transmission and decoding, the computer program product being executable on a processor; (i) receiving input training images; (ii) Encode the input training images using an encoder neural network to generate a latent representation; (iii) encoding the y latent representation using a hyperencoder neural network to generate a z hyperlatent representation; (iv) quantizing the z hyperlatent representation using one entropy parameter of the entropy parameters to generate a quantized z hyperlatent representation; (v) entropy encoding the quantized z hyper-latent representation into a first bitstream using an entropy parameter; (The vi hyperdecoder neural network processes the z quantized hyper latent representations and calculates the position entropy parameter μy and the entropy scale parameter σy of the y latent representation.) y , and the context matrix A y Get (vii) Using an implicit coding solver, we obtain the latent representation of y and the location entropy parameter μ y , and the context matrix A y to obtain the quantized latent residual, (viii) Entropy scale parameter σ y entropy coding the quantized latent residual into a second bitstream using (ix) decoding the first bitstream using an arithmetic decoder using the entropy parameter to generate a quantized z hyper-latent representation; (x) Decode the quantized z hyper-latent representation using a hyper-decoder neural network to obtain the location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the context matrix A y Get (xi) In the arithmetic decoder, the entropy scale parameter σ y decode the second bitstream using (xii) Using a (e.g., implicit) (e.g., linear) decoding solver, the quantized latent residual, the position entropy parameter μ y and the context matrix A y to obtain the quantized latent representation of y, (xiii) using a decoder neural network to decode the quantized y latent representation to obtain a reconstructed image; (xiv) Evaluating a loss function based on the difference between the reconstructed image and the input training image, and a rate term; (xv) Evaluate the gradient of the loss function; (xvi) backpropagating the gradient of the loss function through the decoder neural network, through the hyperdecoder neural network, through the hyperencoder neural network, and through the encoder neural network, and updating the weights of the encoder, decoder, hyperencoder, and hyperdecoder neural networks using the entropy parameter, and updating the entropy parameter; (xvii) repeating (i) to (xvi) using a set of training images to generate a trained encoder neural network, a trained decoder neural network, a trained hyperencoder neural network, and a trained hyperdecoder neural network, as well as trained entropy parameters; (xviii) A computer program product is provided that stores weights for a training encoder neural network, a trained decoder neural network, a trained hyper-encoder neural network, and a trained hyper-decoder neural network, and stores training entropy parameters.
[0050] The computer program product may be executable on a processor to perform the method of any of the seventh aspect of the present invention.
[0051] According to a ninth aspect of the present invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission, the method comprising: (i) receiving an input image; (ii) encoding the input image using an encoder-trained neural network to generate a latent representation of y; (iii) encoding the y latent representation using a hyperencoder-trained neural network to generate a z hyperlatent representation; (iv) quantizing the z hyper-latent representations using the pre-trained entropy parameters to generate quantized z hyper-latent representations; (v) entropy encoding the quantized z hyper-latent representation into a first bitstream using an arithmetic encoder with a one-dimensional discrete probability mass function that depends on pre-trained entropy parameters, including the pre-trained entropy parameter; (vi) A hyperdecoder trained neural network is used to process the quantized z hyperlatent representation to obtain the location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the L-context matrix L y obtaining a (vii) Using an implicit coding solver, we obtain the latent representation of y, the location entropy parameter μ y , L-context matrix Ly to obtain a quantized latent residual; (viii) One-dimensional discrete probability mass function and entropy scale parameter σ y entropy encoding the quantized latent residual into a second bitstream using an arithmetic encoder; (ix) transmitting the first bitstream and the second bitstream.
[0052] The advantage is that the encoding can be done quickly by solving a simple implicit equation. The advantage is that the encoding time is reduced. The advantage is that the parameters of the autoregressive model are conditioned on the quantized hyper-latent representation.
[0053] The method further comprises, in step (iv), converting the pre-trained entropy parameter into a pre-trained position entropy parameter μ z and in step (v), the pre-trained entropy parameter is converted into the pre-trained position entropy parameter μ z and a given entropy scale parameter σ z The advantage is that the entropy parameters are processed faster, resulting in shorter coding times.
[0054] The method may be such that in step (viii) the one-dimensional discrete probability mass function has zero mean.
[0055] The method may be one in which an implicit coding solver solves an implicit equation; (I) The quantized latent residual is the sum of the latent representations of y - μ y -L operates on the quantized y latent representation y is equal to the rounding function of (II) The quantized y latent representation is the quantized latent residual + μ y + L operates on the quantized y latent representation yThe advantage is that the encoding time is reduced.
[0056] In this method, the quantized latent representation y(hat) is calculated by the quantized value of the y latent representation, the position entropy parameter μ, the L-context matrix acting on the quantized y latent representation y(hat), the position entropy parameter μ, and the L-context matrix L acting on the quantized y latent representation y(hat). ij is solved, which is solved successively by operating on pixels according to the order of dependency in the autoregressive model, where all pixels are iterated through in the autoregressive order,
number
[0057] The method may utilize the autoregressive structure defined by the sparse context matrix L to parallelize components of successive decoding passes. The method first creates a dependency graph, a directed acyclic graph (DAG), that defines dependencies between latent pixels. The dependency graph is constructed based on the sparse structure of the L matrix. Then, pixels within the same level of the DAG that are conditionally independent of each other are all calculated in parallel without affecting the calculation of other pixels within those levels. The graph is iterated by starting from the root node and processing the levels of the DAG, with all nodes at each level being processed in parallel. The advantage is reduced encoding time. The advantage is reduced decoding time.
[0058] The method may be one in which the trained L-context module is used in an entropy model for the quantized latent representation y.
[0059] According to a tenth aspect of the present invention, there is provided an encoding computer system for lossy or lossless image or video compression and transmission, the encoding computer system comprising an encoding computer, an encoder-trained neural network, a hyper-encoder-trained neural network and a hyper-decoder-trained neural network; (i) an encoding computer configured to receive an input image; (ii) the encoding computer is configured to encode the input image using the encoder-trained neural network to generate y latents; (iii) the encoding computer is configured to encode the y latent representation using a hyper-encoder trained neural network to generate a z hyper-latent representation; (iv) the encoding computer is configured to quantize the z hyper-latent representation using a predetermined entropy parameter to generate a quantized z hyper-latent representation; (v) the encoding computer is configured to entropy encode the quantized z hyper-latent representation into a first bitstream using a predetermined entropy parameter; (vi) The encoding computer processes the quantized Z hyper-latent representation using a hyper-decoder trained neural network to obtain a location entropy parameter μ y , the entropy scale parameter σ y , and the L-context matrix L of the y latent representation y configured to obtain (vii) The encoding computer uses an implicit encoding solver to generate a latent representation of y, a location entropy parameter μ y and a context matrix Ay to obtain a quantized latent residual; (viii) The encoding computer is a one-dimensional discrete probability mass function and an entropy scale parameter σ y configured to entropy encode the quantized latent residual into a second bitstream using an arithmetic encoder; (ix) An encoding computer system is provided, wherein the encoding computer is configured to transmit the first bitstream and the second bitstream.
[0060] The system may be configured to carry out the method of any of the ninth aspects of the invention.
[0061] According to an eleventh aspect of the present invention, there is provided a computer-implemented method for lossy or lossless image or video decoding, the method comprising: (i) receiving a first bitstream and a second bitstream; (ii) decoding the first bitstream using an arithmetic decoder with a one-dimensional discrete probability mass function that depends on the pre-trained position entropy parameter to generate a quantized z hyper-latent representation; (iii) Using a hyper-decoder trained neural network, we decode the quantized hyper-latent representation of z to obtain the location entropy parameter μ of the latent representation of y. y , the entropy scale parameter σ y , and the L-context matrix L y and obtaining (iv) an arithmetic decoder, a one-dimensional discrete probability mass function, and an entropy scale parameter σ y decoding the second bitstream using (v) Using a (e.g., implicit) (e.g., linear) decoding solver, the quantized latent residual, the position entropy parameter μ y , L-context matrix L y to obtain a quantized latent representation of y; (vi) decoding the quantized y latent representation using a decoder-trained neural network to obtain a reconstructed image.
[0062] The advantage is that the decoding passes of the L-context modeling step can be performed in parallel rather than as a serial procedure, thereby reducing the decoding time.The advantage is that the parameters of the autoregressive model are conditioned on the quantized hyper-latent representation.
[0063] The method further comprises the step (ii) of determining the pre-trained entropy parameter as a pre-trained position entropy parameter μ z and the pre-trained entropy scale parameter σ z The advantage is that the entropy parameters are processed faster and the encoding time is reduced.
[0064] The method may be such that in step (iv) the one-dimensional discrete probability mass function has zero mean.
[0065] The method may include the step of (vii) storing the reconstructed image.
[0066] The method involves a (e.g., implicit) (e.g., linear) decoding solver that decodes the quantized y latent representation into a quantized latent residual + μ y + L operates on the quantized y latent representation y , the advantage is that the decoding time is reduced.
[0067] The method may be one in which the equation system is lower triangular and standard forward substitution is used to solve the (e.g. implicit) equations. The advantage is a reduced decoding time.
[0068] The method utilizes the autoregressive structure defined by the sparse context matrix L to parallelize the components of successive decoding passes. First, a dependency graph, a directed acyclic graph (DAG), is created that defines the dependencies between latent pixels. This dependency graph is constructed based on the sparse structure of the L matrix. The quantized latent of y is then recovered from the quantized residual by iterating through the layers of the DAG and processing all pixels of a level in parallel using a linear decoding equation. The advantage is reduced decoding time.
[0069] The method may be such that the decoding passes of the LL-context modeling step can be performed in parallel rather than in a serial procedure, with the advantage being that the decoding time is reduced.
[0070] Since the method is such that recovering the quantized residual from the second bitstream is not autoregressive, the process may be extremely fast. The advantage is that the decoding time is reduced.
[0071] The method may be such that the L-context module is used if an L-context module was used in the encoding, with the advantage that the decoding time is reduced.
[0072] According to a twelfth aspect of the present invention, there is provided a decoding computer system for lossy or lossless image or video decoding, the decoding computer system comprising a decoding computer, a decoder-trained neural network, and a hyper-decoder-trained neural network; (i) a decoding computer configured to receive a first bitstream and a second bitstream; (ii) the decoding computer is configured to decode the first bitstream using an arithmetic decoder with a predetermined entropy parameter to generate a quantized z hyper-latent representation; (iii) The decoding computer decodes the quantized z hyper-latent representation using a hyper-decoder trained neural network to obtain a location entropy parameter μ y , the entropy scale parameter σ y , and the L-context matrix L of the y latent representation y configured to obtain (iv) the decoding computer determines an entropy scale parameter σ in the arithmetic decoder; y to output a quantized latent residual; (v) The decoding computer uses a (e.g., implicit) (e.g., linear) decoding solver to decode the quantized latent residual, the position entropy parameter μ y and the L-context matrix L y to obtain a quantized latent representation of the image, (vi) A decoding computer system is provided, wherein the decoding computer is configured to decode the quantized Y latent representation using a decoder training neural network to obtain a reconstructed image.
[0073] The system may be configured to carry out the method of any aspect according to the eleventh aspect of the invention.
[0074] According to a thirteenth aspect of the present invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission, and lossy or lossless image or video decoding, including any of the methods according to the ninth aspect of the present invention and any of the methods according to the eleventh aspect of the present invention. An advantage is that encoding can be performed quickly by solving simple "implicit" equations. An advantage is that encoding time is reduced. An advantage is that parameters of the autoregressive model are conditioned on the quantized hyper-latent representation. An advantage is that decoding passes of the L-context modeling step can be performed in parallel rather than as a serial procedure, thereby reducing decoding time. An advantage is that decoding time is reduced.
[0075] According to a fourteenth aspect of the present invention there is provided a system for lossy or lossless image or video compression and transmission and a system for lossy or lossless image or video decoding, the system comprising a system according to any of the aspects of the tenth aspect of the present invention and a system according to any of the aspects of the twelfth aspect of the present invention.
[0076] According to a fifteenth aspect of the present invention, there is provided a computer-implemented method of training an encoder neural network, a decoder neural network, a hyper-encoder neural network, and a hyper-decoder neural network, and entropy parameters, wherein the neural networks and entropy parameters are for use in lossy or video compression, transmission and decoding, the method comprising: (i) receiving input training images; (ii) encoding the input training images using an encoder neural network to generate a latent representation of y; (iii) encoding the y latent representation using a hyperencoder neural network to generate a z hyper-latent representation; (iv) quantizing the z hyper-latent representation using one of the entropy parameters to generate a quantized z hyper-latent representation; (v) entropy encoding the quantized z hyper-latent representations into a first bitstream using an arithmetic encoder with a one-dimensional discrete probability mass function that depends on the entropy parameter; (vi) Process the quantized z hyper-latent representation using a hyper-decoder neural network to obtain the location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the L-context matrix L y and obtaining (vii) Using an implicit coding solver, we obtain the latent representation of y and the location entropy parameter μ y , L-context matrix L y to obtain a quantized latent residual; (viii) One-dimensional discrete probability mass function and entropy scale parameter σ y entropy encoding the quantized latent residual into a second bitstream using an arithmetic encoder using (ix) decoding the first bitstream using an arithmetic decoder to generate a quantized z hyper-latent representation using a one-dimensional discrete probability mass function that depends on the entropy parameter; (x) Using a hyper-decoder neural network, the quantized z hyper-latent representation is decoded to obtain the location entropy parameter μ of the y latent representation. y , entropy scale parameter σ y , and the L-context matrix L y and obtaining (xi) Arithmetic decoder, 1D discrete probability mass function, and entropy scale parameter σ y decoding the second bitstream using (xii) Using a (e.g., implicit) (e.g., linear) decoding solver, the quantized latent residual, the position entropy parameter μ y and the L-context matrix L y to obtain a quantized Y latent representation; (xiii) decoding the quantized y latent representation using a decoder neural network to obtain a reconstructed image; (xiv) evaluating a loss function based on the difference between the reconstructed images and the input training images and a rate term; (xv) evaluating the gradient of the loss function; (xvi) backpropagating the gradient of the loss function through the decoder neural network, through the hyper-decoder neural network, through the hyper-encoder neural network, through the encoder neural network, and updating the weights of the encoder, decoder, hyper-encoder, and hyper-decoder neural networks using the entropy parameter, and updating the entropy parameter; (xvii) repeating steps (i) through (xvi) using a set of training images to generate a trained encoder neural network, a trained decoder neural network, a trained hyper-encoder neural network, a trained hyper-decoder neural network, and a trained entropy parameter; (xviii) storing weights of the trained encoder neural network, the trained decoder neural network, the trained hyper-encoder neural network, and the trained hyper-decoder neural network, and storing the trained entropy parameter.
[0077] Advantage: Faster encoding by solving simple implicit equations. Advantage: Reduced encoding time. Advantage: Autoregressive model parameters are conditioned on quantized Hyper-Latin representations. Advantage: Reduced decoding time because the decoding passes of the L-context modeling step can be performed in parallel rather than serially. Advantage: Reduced decoding time.
[0078] The method further comprises the step (iv) of determining the entropy parameter as a position entropy parameter μ z and in steps (v), (ix) and (xvi) to (xviii), the entropy parameter is the position entropy parameter μ z and the entropy scale parameter σ z An advantage is that faster processing of the entropy parameters is provided, thus reducing the encoding time.An advantage is that faster processing of the entropy parameters is provided, thus reducing the decoding time.
[0079] The method may be such that in steps (viii) and (xi) the one-dimensional discrete probability mass function has zero mean.
[0080] The method may be one in which an implicit coding solver solves an implicit equation; (I) The quantized latent residual is the sum of the latent representations of y - μ y -L operates on the quantized y latent representation y is equal to the rounding function of (II) The quantized y latent representation is the quantized latent residual + μ y + L operates on the quantized y latent representation y The advantage is that the encoding time is reduced.
[0081] The method involves a (e.g., implicit) (e.g., linear) decoding solver that decodes the quantized y latent representation into a quantized latent residual + μ y+ L operates on the quantized y latent representation y , the advantage is that the decoding time is reduced.
[0082] In this method, the quantized latent representation y(hat) is calculated by the quantized value of the y latent representation, the position entropy parameter μ, the L-context matrix acting on the quantized y latent representation y(hat), the position entropy parameter μ, and the L-context matrix L acting on the quantized y latent representation y(hat). ij is solved, which is solved successively by operating on pixels according to the order of dependency in the autoregressive model, where all pixels are iterated through in the autoregressive order,
number
[0083] The method may utilize the autoregressive structure defined by the sparse context matrix L to parallelize components of successive decoding passes. The method first creates a dependency graph, a directed acyclic graph, that defines dependencies between latent pixels. This dependency graph is constructed based on the sparse structure of the L matrix. Then, pixels within the same level of the DAG that are conditionally independent of each other are all computed in parallel without affecting the computation of other pixels within those levels. The graph is iterated, starting from the root node and processing the levels of the DAG, with all nodes at each level processed in parallel. The advantage is reduced decoding time.
[0084] According to a sixteenth aspect of the present invention, there is provided a computer program product executable on a processor for training an encoder neural network, a decoder neural network, a hyper-encoder neural network, and a hyper-decoder neural network, and entropy parameters, wherein the neural networks and entropy parameters are for use in lossy or video compression, transmission and decoding, the computer program product executable on a processor comprising: (i) receiving input training images; (ii) encoding the input training images using an encoder neural network to generate y latent representations; (iii) encoding the y latent representation using a hyperencoder neural network to generate a z hyperlatent representation; (iv) quantizing the z hyper-latent representation using one entropy parameter of the entropy parameters to generate a quantized z hyper-latent representation; (v) entropy encoding the quantized z hyper-latent representations into a first bitstream using an arithmetic encoder with a one-dimensional discrete probability mass function that depends on the entropy parameter; (vi) Process the quantized z hyper-latent representation using a hyper-decoder neural network to obtain the location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the L-context matrix L y Get (vii) Using an implicit coding solver, we obtain the latent representation of y and the location entropy parameter μ y , L-context matrix L y to obtain the quantized latent residual, (viii) entropy encoding the quantized latent residual into a second bitstream using an arithmetic encoder with a one-dimensional discrete probability mass function and an entropy scale parameter σ; (ix) decoding the first bitstream using an arithmetic decoder to generate a quantized z hyper-latent representation using a one-dimensional discrete probability mass function that depends on the entropy parameter; (x) Using a hyper-decoder neural network, the quantized z hyper-latent representation is decoded to obtain the location entropy parameter μy and the entropy scale parameter σ of the y latent representation. y , and the L-context matrix L y Get (xi) Arithmetic decoder, 1D discrete probability mass function, and entropy scale parameter σ y decode the second bitstream using (xii) Using a (e.g., implicit) (e.g., linear) decoding solver, the quantized latent residual, the position entropy parameter μ y and the L-context matrix L y to obtain the quantized latent representation of Y, (xiii) using a decoder neural network to decode the quantized y latent representation to obtain a reconstructed image; (xiv) evaluating a loss function based on the difference between the reconstructed image and the input training image and a rate term; (xv) Evaluate the gradient of the loss function; (xvi) backpropagating the gradient of the loss function through the decoder neural network, through the hyper-decoder neural network, through the hyper-encoder neural network, and through the encoder neural network, and updating the weights of the encoder, decoder, hyper-encoder, and hyper-decoder neural networks using the entropy parameter, and updating the entropy parameter; (xvii) repeating steps (i) through (xvi) using the set of training images to generate a trained encoder neural network, a trained decoder neural network, a trained hyperencoder neural network, a trained hyperdecoder neural network, and a trained entropy parameter; (xviii) A computer program product is provided that stores weights of a trained encoder neural network, a trained decoder neural network, a trained hyper-encoder neural network, and a trained hyper-decoder neural network, and stores trained entropy parameters.
[0085] The computer program product may be executable on a processor to perform any of the aspects of the fifteenth aspect of the present invention.
[0086] According to a seventeenth aspect of the present invention, there is provided a computer-implemented method for training a full neural network, including a neural network for modifying encoder-decoder performance, the full neural network being parameterized by a parameter θ, including encoder and decoder neural networks for use in transmitting and decoding lossy image or video compression, the method comprising: (i) receiving input training images x; (ii) encoding the processor input training images using a processor encoder neural network to generate latent representations; (iii) quantizing the latent representation to generate a quantized latent y(hat); (iv) using a decoder neural network to generate an output image x from the quantized latents, where the output image is an approximation of the input image; (v) estimating a Lagrangian loss function including a Lagrangian multiplier λ based on an evaluation of a distortion function of the difference between the output image and the input training image, and based on the difference between the compression rate function of the quantized latent R(y) and the target compression rate r; (vi) computing all neural network parameter gradients using backpropagation of the estimated Lagrangian loss function; (vii) updating all network parameters θ by performing a descent step of a Lagrangian loss function with respect to all network parameters θ based on the all neural network parameter gradients evaluated in step (vi); (viii) updating the Lagrangian multipliers by performing an ascent step of the Lagrangian loss function with respect to the Lagrangian multipliers; (ix) repeating steps (i) through (viii) using a set of training images to generate a training set of parameters θ, and optionally a target compression rate r0; (x) storing a training set of parameters θ.
[0087] The advantage is that, given a target compression rate, distortion is minimized under the constraint that the average model compression rate is equal to the target compression rate. The advantage is that this minimizes image distortion at a specific target compression rate. The advantage is that deep neural networks can be reliably trained to a specified rate target averaged over the entire test set. Advantages include reliable application of the constraint and stability.
[0088] According to an eighteenth aspect of the present invention, there is provided a computer-implemented method for training a full neural network, including a neural network for modifying encoder-decoder performance, the full neural network being parameterized by a parameter θ, including encoder and decoder neural networks for use in transmitting and decoding lossy image or video compression, the method comprising: (i) receiving input training images x; (ii) encoding the processor input training images using a processor encoder neural network to generate latent representations; (iii) quantizing the latent representation to generate a quantized latent y(hat); (iv) using a decoder neural network to generate an output image x from the quantized latents, where the output image is an approximation of the input image; (v) evaluating an augmented Lagrangian loss function including a Lagrangian multiplier λ based on an evaluation of a distortion function of the difference between the output image and the input training image, and based on the difference between the compression rate function of the quantized latent R(y) and the target compression rate r; (vi) computing all neural network parameter gradients using backpropagation of the estimated augmented Lagrangian loss function; (vii) updating the overall network parameters θ by performing an optimizer step in which the SGD or SGD-like optimizer optimizes the overall network parameters θ based on the learning rate of the network parameter optimizer and the overall neural network parameter gradients evaluated in step (vi); (viii) evaluating the gradient of the Lagrangian multiplier by evaluating the augmented Lagrangian loss function quadratic term weight I A multiplied by the difference between the quantized latent compression rate function and the target compression rate; (ix) updating the Lagrangian multiplier by running an optimizer step in which the SGD or SGD-like optimizer optimizes the Lagrangian multiplier based on a learning rate of the Lagrangian multiplier optimizer; (x) repeating steps (i) through (ix) using a set of training images to generate a training set of parameters θ; (xi) storing a training set of parameters θ.
[0089] The advantage is that it minimizes image distortion at a fixed rate. The advantage is that it reliably trains a deep neural network to a specified rate target averaged over a test set. Benefits include reliable constraint enforcement, stability, robustness to hyperparameter variation, and recovering the original rate-distortion objective as the loss is minimized.
[0090] The method may include clipping the gradient for the Lagrangian multiplier evaluated in step (viii) and updating the Lagrangian multiplier by performing an optimizer step in which an SGD or SGD-like optimizer optimizes the Lagrangian multiplier based on a learning rate for the Lagrangian multiplier optimizer and the clipped gradient for the Lagrangian multiplier.
[0091] The method may be such that the trained parameter set θ is the converged parameter set θ.
[0092] The method is such that the augmented Lagrangian loss function is
number
[0093] The method may be such that step (x) includes modifying the Lagrangian multiplier by multiplying a learning rate of the Lagrangian multiplier optimizer by a quadratic term weight of the loss function and the difference between the quantized latent compression rate function and the target compression rate. An advantage is that the multiplier converges in a reasonable time.
[0094] The method may be that, through the introduction of a coefficient for the learning rate of the Lagrangian multiplier optimizer, decoupling the learning rate of the Lagrangian multiplier from the weight of the quadratic term of the loss function means that the weight of the quadratic term of the loss function can be kept small, while the multiplier converges in a reasonable time. The advantage is that the multiplier converges in a reasonable time.
[0095] The method may be one in which the SGD-like optimizer that optimizes the Lagrange multipliers is an Adam optimizer. Advantages include increased stability, adaptability, and significant robustness to variations in architecture, rate objectives, and hyperparameter choices.
[0096] The method may use a training quantization function to calculate the quantized latent compression rate in the forward pass steps (iii), (iv) and backward pass steps (v)-(viii) (i.e., in the gradient calculation) when updating all neural network parameters θ, and use an inference quantization function to calculate the quantized latent compression rate when making updates to the Lagrange multiplier steps (viii) and (ix) of the augmented Lagrangian method. An advantage is that convergence to a target rate on the training set of images provides a reasonable guarantee that the same constraint will be satisfied on the test set of images.
[0097] The method may use an inference quantization function to compute the quantization latency in forward pass steps (iii) and (iv), and a training quantization function to compute the quantization latency in backward pass steps (v)-(viii) (i.e., in the gradient calculation). The advantage is that convergence to a target rate on a training set of images is reasonably guaranteed to satisfy the same constraint on a test set of images.
[0098] In this method, the set of training images used to train the encoder and decoder is modified to compress to a target compression rate, and the distortion function in step (v) is reduced by a scale factor s (e.g., approximately 2 initially), and the running average scaled distortion is updated during training. At a given iteration of training, the scale factor s is adjusted proportionally to the running average (e.g., by a factor of 2), and the Lagrangian multiplier is modified by a factor inversely proportional to the adjustment of the scale factor. The advantage is that it ensures that the loss function is approximately the same scale regardless of the target rate.
[0099] The method may be one in which the running average is one of an arithmetic mean, a median, a geometric mean, a harmonic mean, an exponential moving average, a smoothed moving average, a linearly weighted moving average. An advantage is that this method ensures that the loss function is approximately the same magnitude regardless of the target rate.
[0100] In this method, the quantized latents are represented using a probability distribution in the latent space, which may include a location parameter and a scale parameter σ, which may decrease as the computer-implemented method of training progresses, e.g., using a decaying scale threshold. The advantage is that this allows the training of the neural network to avoid bad local minima, resulting in improved overall image encoding and decoding performance, i.e., reduced reconstructed image distortion, at a fixed rate.
[0101] The method may be such that the probability distribution is Gaussian or Laplacian.
[0102] The method may be to decrease σ as the computer-implemented training method progresses until it reaches a final value.
[0103] The method may use a gradually decreasing threshold t that decreases as the computer-implemented training method progresses. The advantage is that this allows the neural network training to avoid bad local minima, resulting in improved overall image encoding and decoding performance, i.e., reduced reconstructed image distortion, at a fixed rate.
[0104] The method may be such that σ decreases as the computer-implemented method of training progresses, causing t to decay linearly with respect to the number of training iterations.
[0105] The method may be such that σ decreases as the computer-implemented method of training progresses, causing t to decay exponentially with respect to the number of training iterations.
[0106] The method may be such that σ decreases as the computer-implemented method of training progresses, causing t to decay with respect to the loss metric.
[0107] The method may be such that the quantized latent is represented using a probability distribution in the latent space, the probability distribution including a location parameter and a scale parameter σ, and all observed values of σ are thresholded to a fixed value.
[0108] The method may be such that all real images of σ are mapped to a defined domain by a strictly positive codomain function, such as a soft plus operation, a square operation with a threshold, or an absolute value operation with a threshold.
[0109] According to a nineteenth aspect of the present invention, there is provided a computer program product executable on a processor for training a full neural network, including a neural network for modifying encoder-decoder performance, the full neural network being parameterized by a parameter θ, the full neural network including encoder and decoder neural networks for use in lossy image or video compression, transmission and decoding, the computer program product being executable on a processor; (i) receiving input training images x; (ii) encoding the input training images using an encoder neural network to generate latent representations; (iii) quantizing the latent representation to generate a quantized latent y(hat); (iv) using a decoder neural network to generate an output image x from the quantized latents, where the output image is an approximation of the input image; (v) estimating a Lagrangian loss function including a Lagrangian multiplier λ based on an evaluation of a distortion function of the difference between the output image and the input training image, and based on the difference between the compression rate function of the quantized latent R(y) and the target compression rate r; (vi) calculating all neural network parameter gradients using backpropagation of the estimated Lagrangian loss function; (vii) updating all network parameters θ by performing a descent step of a Lagrangian loss function with respect to all network parameters θ based on the all neural network parameter gradients evaluated in (vi); (viii) updating the Lagrangian multipliers by performing an ascent step of the Lagrangian loss function with respect to the Lagrangian multipliers; (ix) repeating (i) through (viii) using a set of training images to generate a training set of parameters θ, and optionally a target compression rate ro; (x) A computer program product is provided that stores a training set of parameter sets θ.
[0110] The computer program product may be executable on a processor to perform the method of any of the seventeenth aspects of the present invention.
[0111] According to a twentieth aspect of the present invention, there is provided a computer program product executable on a processor for training a full neural network, including a neural network for modifying encoder-decoder performance, the full neural network being parameterized by a parameter θ, the full neural network including encoder and decoder neural networks for use in transmitting and decoding lossy image or video compression, the computer program product executable on a processor comprising: (i) receiving input training images x; (ii) encoding the processor input training images using a processor-encoder neural network to generate latent representations; (iii) quantizing the latent representation to generate a quantized latent y(hat); (iv) generating an output image x from the quantized latents using a decoder neural network, where the output image is an approximation of the input image; (v) evaluating an augmented Lagrangian loss function including a Lagrangian multiplier λ based on an evaluation of a distortion function of the difference between the output image and the input training image, and based on the difference between the compression rate function of the quantized latent R(y) and the target compression rate r; (vi) calculating all neural network parameter gradients using backpropagation of the evaluated augmented Lagrangian loss function; (vii) based on the learning rate of the network parameter optimizer and the overall neural network parameter gradient evaluated in step (vi), the SGD or SGD-like optimizer updates the overall network parameters θ by performing an optimizer step that optimizes the overall network parameters θ; (viii) evaluating the gradient of the Lagrangian multiplier by evaluating a quadratic term weight μ of the augmented Lagrangian loss function multiplied by the difference between the quantized latent compression rate function and the target compression rate; (ix) the SGD or SGD-like optimizer updates the Lagrangian multiplier by running an optimizer step that optimizes the Lagrangian multiplier based on a learning rate of the Lagrangian multiplier optimizer; (x) repeating steps (i) through (ix) using a set of training images to generate a training set of parameters θ; (xi) A computer program product is provided that stores a training set of parameters θ.
[0112] The computer program product may be executable on a processor to perform the method of any of the eighteenth aspects of the present invention.
[0113] According to a twenty-first aspect of the present invention, there is provided a computer-implemented method for training an encoder neural network to reduce encoder distortion, the encoder neural network being parameterized by a parameter θ, the encoder being a neural network for use in lossy image or video compression, the method comprising: (i) receiving input training images x; (ii) encoding the input training images using an encoder neural network to generate an image reconstruction y; (iii) passing the input training images x through a feature embedding network pre-trained on a training set of images to generate features including output x (tilde: a letter with the symbol ~ above it; the same applies below); (iv) passing the image reconstruction y through a feature embedding network to generate features with output y(tilde); (v) The output x(tilde) is converted into N equal-sized feature vectors X(tilde) = {x i (tilde)}; (vi) The output y(tilde) is expressed as N equal-sized feature vectors Y(tilde) = {y i (tilde)}; (vii) feature vector x i (tilde) and yj For each pair of (tildes), the distance element d i,j , for example evaluating the cosine distance; (viii) Each distance element d i,j For the normalized distance element d i,j (tilde), e.g., d i,j / (min k d i,k +ε), where ε is a small positive constant; (ix) Each normalized distance element d i,j (tilde) vs. d i,j (tilde) exponentially decreasing similarity factors wi,j, e.g., exp((1-d i,j Calculate ((tilde)) / h), where h is a positive value and is the bandwidth parameter, and (x) Each similar element w i,j About w i,j / (Σ k w i,k ) is c i,j and calculating (xi) calculating the context loss; (xii) evaluating a loss function that is the sum of the context loss and an additional loss for the generator that is a function of x and y; (xiii) backpropagating the loss function; (xiv) optimizing the encoder neural network parameterized by the parameter θ; (xv) repeating steps (i) through (xiv) using a set of training images to generate a training set of parameters θ; (xvi) storing a training set of parameters θ.
[0114] The advantage is that the human-perceived visual quality of the reconstructed image coded by the encoder neural network is strongly improved.
[0115] In this method, the context loss is minus C(X(tilde),Y(tilde)), where C(X(tilde),Y(tilde)) is (Σj max i c i,j ) divided by N. The advantage is that the human-perceived visual quality of the reconstructed image coded by the encoder neural network is strongly improved.
[0116] In this method, the context loss is the arithmetic mean of minus C(X(tilde),Y(tilde)) and minus C(Y(tilde),X(tilde)), where C(X(tilde),Y(tilde)) is (Σj max i c i,j ) divided by N. The advantage is that the human-perceived visual quality of the reconstructed image coded by the encoder neural network is strongly improved.
[0117] In this method, the context loss is the weighted average of minus C(X(tilde),Y(tilde)) and minus C(Y(tilde),X(tilde)), where C(X(tilde),Y(tilde)) is (Σj max i c i,j ) divided by N. The advantage is that the human-perceived visual quality of the reconstructed image coded by the encoder neural network is strongly improved.
[0118] The method may further include a context loss including a Deep Render Adversarial Video Multimethod Assessment Fusion (VMAF) proxy, or a Learned Perceptual Image Patch Similarity (LPIPS) or a generative adversarial loss. The advantage is that the human-perceived visual quality of the reconstructed image encoded by the encoder neural network is strongly improved.
[0119] The method may be such that this approach results in a strongly improved perceived visual quality of the reconstructed image as perceived using the human visual system.
[0120] The method may be one in which statistical distances between representations of images in a latent feature space are used. The advantage is that the human-perceived visual quality of the reconstructed image encoded by the encoder neural network is strongly improved.
[0121] According to a twenty-second aspect of the present invention there is provided a computer program product executable on a processor for training an encoder neural network to reduce encoder distortion, the encoder neural network being parameterized by a parameter θ, the encoder being a neural network for use in lossy image or video compression, the computer program product being executable on a processor; (i) receiving input training images x; (ii) encoding the input training image using an encoder neural network to generate an image reconstruction y; (iii) Passing the input training images x through a feature embedding network pre-trained on a training set of images to generate output x (tilde) containing features; (iv) passing the image reconstruction y through a feature embedding network to generate an output y (tilde) containing features; (v) The output x(tilde) is converted into N equal-sized feature vectors X(tilde) = {x i (tilde)}, (vi) The output y(tilde) is expressed as N equal-sized feature vectors Y(tilde) = {y i (tilde)}, (vii) For each pair of feature vectors x(tilde) and y(tilde), the distance element d i,j , e.g., evaluate the cosine distance, (viii) Each distance element d i,j For the normalized distance element d i,j (tilde), e.g., d i,j / (min k d i,k +ε), where ε is a small positive constant, (ix) Each normalized distance element d i,j (tilde) i,j Similarity factors wi,j are exponentially decreasing functions of (tilde), e.g., exp((1-d i,j Calculate ((tilde)) / h), where h is a positive bandwidth parameter, (x) Each similar element w i,j About w i,j / (Σ k w i,k ) is c i,j Calculate (xi) Calculate the context loss, (xii) Evaluate a loss function that is the sum of the context loss and the generator additional loss, which is a function of x and y; (xiii) Backpropagating the loss function, (xiv) Optimize the encoder neural network parameterized by the parameter θ, (xv) Repeat steps (i) to (xiv) using a set of training images to generate a training set of parameters θ; (xvi) A computer program product is provided that stores a training set of parameters θ.
[0122] The computer program product may be executable on a processor to carry out the method of any of the twenty-first aspects of the present invention.
[0123] According to a twenty-third aspect of the present invention, there is provided a computer-implemented method for training an encoder neural network to reduce encoder distortion, the encoder neural network being parameterized by a parameter θ, the encoder being a neural network for use in lossy image or video compression, the method comprising: (i) receiving input training images x; (ii) encoding the input training images using an encoder neural network to generate an image reconstruction y; (iii) passing the input training images x through a feature embedding network pre-trained on a training set of images to generate an output x (tilde) containing features; (iv) passing the image reconstruction y through a feature embedding network to generate an output y (tilde) containing features; (v) Run a function on y (tilde) so that the gradient does not follow the function executed later, and output y nograd generating a (tilde); (vi) The output x (tilde) is passed through a classifier network to obtain a probability value P discr,real providing a (vii) Output y nograd (tilde) is passed through the classifier network to obtain the probability value P discr,pred providing a (viii)P discr,real Classification loss and P of classifier networks for real images acting on discr,pred obtaining a classifier loss, which is the sum of classification losses of the classifier network for the predicted image operating on (ix) backpropagating the classifier loss; (x) optimizing the classifier network; (xi) The output y (tilde) is passed through a classifier network to obtain a probability value P gen,pred providing a (xii)P gen,pred obtaining an adversarial loss, which is the classification loss of the encoder on the predicted image operating on (xiii) obtaining a loss function that is the sum of the adversarial loss and an additional loss of the encoder that is a function of x and y; (xiv) backpropagating the loss from step (xiii); (xv) optimizing the encoder neural network parameterized by a parameter θ; (xvi) repeating steps (i) through (xv) using a set of training images to generate a training set of parameters θ; (xvii) storing a training set for the parameter set θ.
[0124] The advantage is that the human-perceived visual quality of the reconstructed image coded by the encoder neural network is strongly improved.
[0125] The method may be one in which the classifier network has an architecture that accepts one input tensor.
[0126] The method may be such that the classifier network is a classifier network as shown in FIG.
[0127] The method may be one in which the classifier network comprises a convolutional neural network (CNN) architecture consisting of multiple sub-networks, each using tensor connectivity along the channel dimension.
[0128] The method may be such that the classifier network is a classifier network as shown in FIG.
[0129] The method may be one in which the classifier network comprises an architecture in which a separate classifier is assigned to every feature, and the overall classifier is defined as a function of the probabilities of all the individual classifiers.
[0130] The method may be such that the classifier network is a classifier network as shown in FIG.
[0131] The method may be one in which the loss function further includes a Deep Render Adversarial Video Multimethod Assessment Fusion (VMAF) proxy, or a Learned Perceptual Image Patch Similarity (LPIPS) or generative adversarial loss.
[0132] According to a twenty-fourth aspect of the present invention, there is provided a computer program product executable on a processor for training an encoder neural network to reduce encoder distortion, the encoder neural network being parameterized by a parameter θ, the encoder being a neural network for use in lossy image or video compression, the computer program product executable on a processor comprising: (i) receiving input training images x; (ii) encoding the input training image using an encoder neural network to generate an image reconstruction y; (iii) Passing the input training images x through a feature embedding network pre-trained on a training set of images to generate output x (tilde) containing features; (iv) passing the image reconstruction y through a feature embedding network to generate an output y (tilde) containing features; (v) Run a function on y (tilde) so that the gradient does not follow the function executed later, and output y nograd (tilde), (vi) The output x (tilde) is passed through a classifier network to obtain a probability value P discr,real provide (vii) Output y nograd (tilde) is passed through the classifier network to obtain the probability value P discr,pred provide (viii)P discr,real Classification loss and P of classifier networks for real images acting on discr,pred Obtain the classifier loss, which is the sum of the classification losses of the classifier network for the predicted image acting on (ix) Backpropagate the classifier loss; (x) optimizing the classifier network; (xi) The output y (tilde) is passed through a classifier network to obtain a probability value P gen,pred provide (xii)P gen,pred We obtain the adversarial loss, which is the classification loss of the encoder on the predicted image acting on (xiii) Obtain a loss function that is the sum of the adversarial loss and the encoder's additional loss, which is a function of x and y, (xiv) backpropagating the loss from step (xiii); (xv) optimizing the encoder neural network parameterized by the parameter θ; (xvi) repeating steps (i) through (xv) using a set of training images to generate a training set of parameters θ; (xvii) A computer program product is provided that stores a training set for parameter set 0.
[0133] The computer program product may be executable on a processor to carry out the method of any of the twenty-third aspects of the present invention.
[0134] Aspects of the present invention may be combined.
[0135] In the above methods and systems, the image may be a single image, the image may be a video image, or the image may be, for example, a collection of video images.
[0136] The above methods and systems may be applied in the video domain.
[0137] For each of the above methods, an associated system may be provided that is arranged to carry out the method.
[0138] For each of the above training methods, an associated computer program product may be provided. [Brief explanation of the drawings]
[0139] Aspects of the present invention will now be described, by way of example, with reference to the following drawings, in which: [Figure 1]Schematic diagram of an artificial intelligence (AI)-based compression process involving encoding an input image x using a neural network E(...) and decoding it using a neural network D(...) to provide an output image x(hat), where runtime issues are associated with the encoder. Runtime issues are associated with the decoder. Examples of issues associated with parts of the process are identified. [Figure 2] 1 is a schematic diagram of an artificial intelligence (AI)-based compression process that involves encoding an input image x using a neural network E(...) and decoding it using a neural network D(...) to provide an output image x(hat), in which a hyper-encoder and a hyper-decoder are provided. "Dis" denotes an element of a classifier network. [Figure 3] This paper presents an example of the structure of an autoencoder with hyperpliers, where the hyperplier "W" encodes information about the latent entropy parameter Φz, which enables the encoding / decoding of the hyperplier "z". The model optimizes the parameters of all relevant encoder / decoder modules, as well as the hyper latent entropy parameter Φw. Note that this hierarchical structure of hyperpliers can be applied recursively without theoretical restrictions. [Figure 4] 1 is a schematic diagram illustrating an example encoding phase of an AI-based compression algorithm using a linear implicit system (with a corresponding implicit encoding solver) for video or image compression. Related explanations are provided in Section 1.4.2. [Figure 5] 1 is a schematic diagram illustrating an example decoding phase of an AI-based compression algorithm (with a corresponding decoding solver) using an implicit linear system for video or image compression. Related explanations are provided in Section 1.4.2. [Figure 6]A working example of constructing a Directed Acyclic Graph (DAG) given the dependencies generated by the L-context matrix. (a) shows the L-context parameters associated with the i-th pixel in this example. Neighboring context pixels are the pixel directly above the current pixel and the neighboring pixel to the left. (b) shows the pixels listed in raster scan order. Pixels at the same level in the Directed Acyclic Graph are colored the same. (c) shows the resulting DAG. Pixels at the same level are conditionally independent of each other and can be coded / decoded in parallel. [Figure 7] 2 shows an example of an encoding process using a predicted context matrix Ly in an example AI-based compression pipeline. In this figure, a general-purpose implicit solver is depicted, but this may be, for example, any one of the methods described in Section 2.2.1. [Figure 8] 2 illustrates an exemplary decoding process using a predicted context matrix Ly in an exemplary AI-based compression pipeline. In this diagram, a linear equation solver is depicted, which may be, for example, any one of the methods discussed in Section 2.2.2. [Figure 9] We show an example of an original image G (left) and its compressed reconstruction H (right) trained using a reconstruction loss incorporating the context similarity formula (4.5). The compressed image has 0.16 bits per pixel and a peak signal-to-noise ratio of 29.7. [Figure 10] An example of an original image G (left) and its compressed reconstruction H (right) trained using a reconstruction loss that incorporates the adversarial loss formula (4.11) on VGG features. The compressed image has 0.17 bits per pixel and a peak signal-to-noise ratio of 26. [Figure 11] An example of an original image G (left) and its compressed reconstruction H (right) trained using a reconstruction loss incorporating an adversarial loss and incorporating the adversarial loss formula (4.11) on VGG features. The compressed image has 0.18 bits per pixel and a peak signal-to-noise ratio of 26. [Figure 12]FIG. 1 illustrates an example of an exemplary classifier architecture 1. [Figure 13] FIG. 2 illustrates an example of an exemplary classifier architecture 2. [Figure 14] FIG. 1 illustrates an example of an exemplary classifier architecture 3. DETAILED DESCRIPTION OF THE INVENTION
[0140] Technology overview Provides a high-level overview of artificial intelligence (AI)-based (e.g., image and / or video) compression techniques.
[0141] In general, compression can be lossless or lossy. Lossless and lossy compression reduces the file size, sometimes called the "rate."
[0142] However, lossy compression allows the input to be altered. After reconstructing the bitstream for the compressed image, the output image x (hat) is not the same as the input image x. The hat over the "x" represents the possibility that the output image x (hat) may differ from the input image x. The difference between x and x (hat) is sometimes referred to as "distortion" or "image quality difference." Lossy compression can be characterized by "output quality" or "distortion."
[0143] Pipelines may also include lossless compression, but generally pipelines use lossy compression.
[0144] Typically, as the rate increases, the distortion decreases. The relationship between these quantities for a given compression scheme is called the "rate-distortion equation." For example, the goal of improving compression techniques is to reduce distortion while maintaining a constant compressed file size, thereby obtaining an improved rate-distortion equation. For example, distortion can be measured using the mean squared error (MSE) between pixels x and x (hat), although many other methods for measuring distortion exist, as will be apparent to those skilled in the art. Known compression / decompression schemes include, for example, JPEG, JPEG2000, AVC, HEVC, and AVI.
[0145] Approaches include using deep learning and AI to provide an improved compression / decompression scheme or improved compression / decompression schemes.
[0146] In one example of an artificial intelligence (AI)-based compression process, an input image x is provided. A neural network characterized by a function E(...) is provided that encodes the input image x. This neural network E(...) generates a latent representation, which we'll call y. The quantized latent representation is fed into another neural network characterized by a function D(...), which is the decoder. The decoder provides an output image, which we'll call x. The quantized latent representation y is entropy coded into a bitstream.
[0147] For example, the encoder may be a library installed on a user device such as a laptop, desktop computer, or smartphone. The encoder generates a y latent quantized to y, which is entropy encoded to provide a bitstream that is transmitted over the Internet to a recipient device. The recipient device entropy decodes the bitstream to provide y and provides an output image x using a decoder, which is a library installed on the recipient device (e.g., laptop computer, desktop computer, smartphone).
[0148] E is y=E θ (x) where D is the convolution matrix θ.
number
[0149] We need to find a way to learn the neural network parameters θ and Ω.
[0150] The compression pipeline can be parametrized using a loss function L. One example uses backpropagation of gradient descent of the loss function using the chain rule,
number
[0151] The loss function is a trade-off between rate and distortion. The distortion function is
number
number
[0152] For example, we use an input image, obtain a loss function, perform backpropagation, and train a neural network. This is repeated on a training set of input images until the pipeline is trained. The trained neural network can provide high-quality output images.
[0153] An example of an image training set is the KODAK image set (e.g., www.cs.albany.edut-xypan / research / snr / Kodak.html). An example of an image training set is the IMAX image set. An example of an image training set is the Imagenet dataset (e.g., www.image-net.org / download). An example of an image training set is the CLIC training datasets P ("Professional") and M ("Mobile") (e.g., http: / / challenge.compression.cc / tasks / ).
[0154] In an embodiment, the generation of the bitstream from y is lossless compression.
[0155] Based on the Shannon entropy in information theory, the minimum rate (corresponding to the best possible lossless compression) is
number
[0156] Various entropy coding algorithms are known, such as range coding / decoding and arithmetic coding / decoding.
[0157] As an example, entropy coding (EC) is a method for coding y and P y(ハット) In an embodiment, the entropy decoding ED uses the bitstream and P y(ハット) to provide y. The encoding / decoding process in this example is lossless.
[0158] How can we find the file size in a differentiable way? Use Shannon entropy, or something similar to Shannon entropy. The formula for Shannon entropy is completely differentiable. Neural networks require a differentiable loss function. Shannon entropy is the theoretically smallest entropy value. The entropy coding used may not reach the theoretical minimum, but it is expected to reach a value close to the theoretical minimum.
[0159] The pipeline needs a loss that can be used for training, and that loss needs to resemble a rate-distortion tradeoff.
[0160] The losses that can be used to train a neural network are:
number
[0161] There are several problems with this rate equation.
[0162] Shannon entropy H is the sum of y(hat) and P y(ハット) function, i.e., H(y(hat),P y(ハット) ) is given a minimum file size. The problem is to y(ハット) In fact, the question is how we can know y(ハット) So, P y(ハット) It is necessary to approximate P y(ハット) As an approximation of q y(ハット) Use P y(ハット) instead of q y(ハット) Therefore, we evaluate the cross-entropy rather than the entropy. Cross-entropy CE(y(hat),q y(ハット) ) is a probability distribution q y(ハット) Gives the minimum file size of y (hat) when given.
[0163]
number
[0164] In a perfect world, we would use Shannon entropy to train the rate equation, but that is P y(ハット) This means we know the distribution q, which we don't know. What we know is the assumed distribution q y(ハット) That's all.
[0165] Therefore, to achieve a small file compression size, q y(ハット) P y(ハット) One category of our inventions is the use of q y(ハット) Regarding.
[0166] For example, q y(ハット) Assume that is a factorized parametric distribution.
[0167] One of our innovations is q y(ハット) The goal is to make the assumptions about q more flexible. y(ハット) HA P y(ハット) can be better approximated, resulting in a smaller compressed file size.
[0168] For example, P y(ハット)Consider a multivariate normal distribution with a mean μ vector and a covariate matrix Σ. Σ has size NxN, where N is the number of pixels in the latent space. If y (hat) has size 1x12x512x512 (e.g., associated with a 512x512 pixel image), then the size of Σ is 2.5 million to the power of 5, or about 5 trillion, so there are 5 trillion parameters of Σ to estimate. This is computationally infeasible. That is, it is usually computationally infeasible to assume a multivariate normal distribution.
[0169] Here, P y(ハット) Think about it. P y(ハット) As we have seen, is too complicated to know accurately. This joint probability density function p(y(hat)) can be expressed as a conditional probability function, as shown in the second line of the equation below.
number
[0170] In many cases, p(y(hat)) is a factorized probability density function
number
[0171] The factorized probability density function is computationally relatively easy to calculate. The factorized probability density function, q y(ハット) " and then weaken this condition to get closer to the conditional probability function, the joint probability density function p(y(hat)), and get a smaller compressed file size. This is one class of innovation that we have.
[0172] Distortion functions that correlate well with the human visual system
number
[0173] We want users viewing image and video content on their devices to have a pleasant visual experience while minimizing the file size transmitted to their device. Therefore, we focused on providing an improved distortion function that correlates better with the human visual system. Modern distortion functions often include a neural network that transforms the input and output into a perceptual space before comparing them. This neural network can be a generative adversarial network (GAN) that performs hallucination processing. Some stabilization is also possible. We find that humans appear to evaluate image quality using density functions. We use a generative method, e.g., a GAN, to ensure that p(x(hat)) matches p(x).
[0174] An illusion is the fine detail in an image that can be generated for the viewer. It is not necessary to transmit all of the fine, higher spatial frequency detail exactly, but it is possible to generate some of the fine detail at the receiver if the appropriate cues for generating the fine detail are sent from the transmitter.
[0175] What should the neural networks E(...), D(...) look like? How is the architecture of these neural networks optimized? How is the performance of these neural networks optimized? Performance relates to file size, distortion, and runtime performance in real time. There are trade-offs between these goals. For example, increasing the size of the neural network can subsequently reduce distortion and / or file size, but requires more computational resources and therefore reduces runtime performance. Optimizing the architecture of such neural networks can make computationally intensive neural networks run faster.
[0176] We provide an innovation regarding the quantization function Q. The problem with the standard quantization function is that the gradient is zero, which makes it difficult to train in neural network environments that rely on backpropagation of gradient descent loss functions. Therefore, we provide a custom gradient function that enables gradient propagation, making it possible to train neural networks.
[0177] Post-processing can be performed that affects the output image. Additional information can be included in the bitstream. This additional information can be information about the convolution matrix Ω, where D is parametrized by the convolution matrix Ω.
[0178] The additional information about the convolution matrix Ω may be image-specific. An existing convolution matrix may be updated with the additional information about the convolution matrix Ω, and then decoding is performed using the updated convolution matrix.
[0179] Another option is to fine-tune y using additional information about E. The additional information about E can be image-specific.
[0180] The entropy decoding process needs access to the same probability distribution (if any) that was used in the entropy encoding process. It is conceivable that the entropy encoding process has some probability distribution that is also used in the entropy decoding process. This probability distribution may be one to which all users have access, such as one contained in a compression library, or one contained in a decompression library. It is also possible that the entropy encoding process generates a probability distribution that is also used in the entropy decoding process, and the entropy decoding process is given access to the generated probability distribution. The entropy decoding process may be given access to the generated probability distribution by including parameters characterizing the generated probability distribution in the bitstream. The generated probability distribution may be image-specific.
[0181] FIG. 1 is a schematic diagram of an artificial intelligence (AI)-based compression process that involves encoding an input image x using a neural network and decoding it using a neural network to provide an output image x(hat).
[0182] In one example of an encoder neural network layer, the layer contains a convolution, a bias, and an activation function. In one example, four such layers are used.
[0183] In one example, q y(ハット) Assume that is a factorized normal distribution, and y={y1,y2...y N}, y(hat)={y1(hat),y2(hat)...y N (hat)}. Each y i Assume that (hat) (i=1~N) follows a normal distribution N with mean μ of 0 and standard deviation σ of 1. It can be defined as y(hat) = Int(y-μ) + μ, where Int() is the rounding of an integer.
[0184] The rate loss in the quantized latent space is obtained by summing (Σ) for i=1 to N,
number
[0185] The output image x(hat) can be fed into a discriminative network such as a GAN network to provide scores, which can then be combined to provide a distortion loss.
[0186] q y(ハット) By making P y(ハット) We hope to better model q and reduce the gap between Shannon entropy and cross entropy. y(ハット) This makes it more flexible. In the latent space of y, there is another neural network called a hyperencoder. There is another latent space called z, which is quantized to z (hat). Then, the z latent space is decoded into distribution parameters such as μ and σ. These distribution parameters are used in the rate equations.
[0187] Here, for a more flexible allocation, the rate loss is the sum of (Σ) for i=1 to N,
number
[0188] Therefore, q y(ハット) This makes the system more flexible, but at the cost of sending meta-information.
number
[0189] Here, the z latency gets its own bitstream z, which is transmitted along with the bitstream y. The decoder then first decodes the bitstream z, then runs a hyperdecoder to obtain the distribution parameters (μ,σ), then uses the distribution parameters (μ,σ) to decode y, which the decoder then runs to obtain the output image x.
[0190] Now we need to send a bitstream z, whose effect is to make the bitstream y smaller, so that the sum of the new bitstream y and bitstream z is smaller than the bitstream y without the hyperencoder. This is a powerful technique called hyperplier, which makes the entropy model more flexible by transmitting meta-information. The loss equation is:
number
[0191] It is further possible to use a hyperhyperencoder for z in a more advanced approach, such as using it optionally and recursively.
[0192] The entropy decoding process of the quantized z latents needs access to the same probability distribution (if any) that was used in the entropy encoding process of the quantized z latents. The entropy encoding process of the quantized z latents may have a probability distribution that is also used in the entropy decoding process of the quantized z latents. This probability distribution may be one to which all users have access, such as one included in a compression library, or one included in a decompression library. It is also possible for the entropy encoding process of the quantized z latents to generate a probability distribution that is also used in the entropy decoding process of the quantized z latents, and for the entropy decoding process of the quantized z latents to be given access to the generated probability distribution. The entropy decoding process of the quantized z latents may be given access to the generated probability distribution by including parameters characterizing the generated probability distribution in the bitstream. The generated probability distribution may be an image-specific probability distribution.
[0193] FIG. 2 is a schematic diagram of an artificial intelligence (AI) based compression process that involves encoding an input image x using a neural network and decoding it using a neural network to provide an output image x(hat), where a hyper-encoder and a hyper-decoder are provided.
[0194] A more sophisticated approach is to use the distortion function
number
number
number
[0195] A note about hyper pliers and hyper hyper pliers For systems or methods that do not include hyperpriors, if you have a y latent that does not include hyperpriors (i.e., does not include the third and fourth networks), the distribution on the y latent used for entropy encoding is not made flexible by it. Hyperpriors reduce entropy / file size by making the distribution on the y latent more flexible. Why? Because you can pass the parameters of the y distribution through the hyperprior. When you use hyperpriors, you get a new z latent. This z latent has the same problem as the "old y latent" without hyperpriors, in that it does not have a flexible distribution. However, since the dimensionality of z is usually smaller than that of y, this problem is not as severe.
[0196] The concept of hyper-hyper-pliers can be applied recursively to use hyper-hyper-pliers on the z-latent space of hyper-hyper-pliers. If we have a z-latent without hyper-hyper-pliers (i.e., without the fifth and sixth networks), the distribution of the z-latent used for entropy encoding is not flexible. Hyper-hyper-pliers make the distribution of the z-latent more flexible, reducing entropy / file size. Why? Because we can transmit the parameters of the z-distribution through hyper-hyper-pliers. Using hyper-hyper-pliers results in a new w-latent. This w-latent has the same problem of not having a flexible distribution as the "old z-latent" without hyper-hyper-pliers. However, since the dimensionality of w is usually smaller than that of z, the problem is not as serious. An example is shown in Figure 3.
[0197] The above idea can be applied recursively: for example, we can have hyperhyperpliers, hyperhyperhyperpliers, hyperhyperhyperpliers, etc., as many hyperpliers as we want.
[0198] UK Patent Application No. 2016824.1, filed October 23, 2020, is incorporated by reference.
[0199] International Application No. PCT / GB2021 / 051041, filed April 29, 2021, entitled "IMAGE COMPRESSION AND DECODING, VIDEO COMPRESSION AND DECODING METHODS AND SYSTEMS," is incorporated by reference.
[0200] Training Notes Regarding the seeding of neural networks for training, all neural network parameters can be randomized using standard methods (e.g., Xavier Initialization). It has generally been found that a sufficiently small learning rate gives satisfactory results.
[0201] Note It is to be understood that the arrangements referred to herein are merely illustrative for the application of the principles of the present invention. Numerous modifications and alternative arrangements can be devised without departing from the spirit and scope of the invention. While the present invention has been illustrated in the drawings and described with particularity and detail in connection with what are presently considered to be the most practical and preferred embodiments, it will be apparent to those skilled in the art that numerous modifications can be made without departing from the principles and concepts of the present invention as set forth herein.
[0202] 1. Implicit Equation Systems and Their Solvers for AI-Based Image and Video Compression 1.1 Introduction Implicit equation systems are powerful modeling tools that are currently underutilized in the AI and deep learning literature. This paper describes an implicit equation system and its solution method for use in AI-based image and compression pipelines. Implicit equation systems and their solution methods have the potential to significantly improve the performance and speed of AI-based image compression algorithms. For example, implicit equation systems can also simultaneously use forward and backward pixel contexts, centered around ground truth pixels, in training.
[0203] Implicitly defined systems of equations (which may be nonlinear) and their corresponding solutions exist in many areas of the physical sciences, but the fields of AI and deep learning have only recently begun to explore this modeling approach. An implicit system of equations is a set of equations that are based on a set of unknown variables, e.g., y∈R. m and known variables x∈R n But the function
number
number
[0204] The solution to this system is the variable y that satisfies (1.1). Equation (1.1) may have one solution, many solutions, or no solution. In general, finding such a solution (if it exists) is difficult and requires the use of (possibly nonlinear) numerical equation solvers. Despite this difficulty, modeling with implicit systems is a powerful approach and often produces excellent results.
[0205] This Section 1 provides an overview of the functionality and scope of current and future exploitation of implicit equation systems, their solutions, and numerical equation solvers for, but not limited to, AI and deep learning based image and video data compression. This Section 1 serves as a description of implicitly defined equation systems, their solutions, and numerical equation solvers for use in the research, development, production, marketing, and distribution of AI based image and video compression, and any of its modified or extended versions.
[0206] 1.2 Background: Example Implicit Systems and Solutions Equation (1.1) is a very general framework for defining implicit systems. To provide some background on implicit systems and how to solve them, we outline our approach with some examples that can be used as components of AI-based video and image compression pipelines.
[0207] A simple example of a practical implicit method is the following: we consider the unknown variables y∈R that satisfy the system m (such as image or latent variables in AI-based image and video compression algorithms).
number
[0208] where:
number
number
number
number
[0209] When the iterative solver reaches a solution, the implicit system is said to be in equilibrium. In many cases, it is not necessary to run the iterative solver until equilibrium is reached. The iterations can be terminated when they approach optimum in some sense.
[0210] This iterative approach is just one of many techniques used to solve systems like (1.2) in AI-based image and video compression. Other methods can also be used, many of which relax the requirement that f be contractive. For example, one can use any of the nonlinear equation solvers discussed in Chapter 11 of [1], including Newton's method and its many variants. The function f can have some special structure. For example, in AI-based image and video compression, f(·,θ) is a neural network, parameterized via θ (e.g., a weight matrix and bias). In this case, the implicit system takes the form y = f(y,θ). It is also possible for f to incorporate so-called "side information" (or alternatively, "hyperlatent"), such as a variable z generated elsewhere in the compression algorithm. Combining these approaches results in a system of the form y = f(y,θ,z). In either case, the solution can be found using iterative methods or other (possibly nonlinear) equation solvers.
[0211] 1.2.1 Linear Implicit Systems The function f can be linear in the argument y. That is, let f be a matrix A∈R. m×m and the right-hand side is the bias term μ∈R d In this case, the implicit system becomes:
number
[0212] Note that either A or μ can itself be a neural network or other type of function incorporating parameters θ and side information z (hyperlatants), but this function operates linearly on y. This special linear structure allows many linear solution methods to be used (see, for example, [2]). If A is contractile (the matrix norm is less than 1), the iterative method described above is still applicable: the initial guess y 0 Starting from y k+1 =μ+Ay kAfter several iterations, the iterator y k converges to the solution of (1.4). However, there are several other approaches. Here we introduce some approaches that can be applied to AI-based image and video compression. First, define a matrix B:=IA, where I is an m×m identity matrix. Then, (1.4) can be explicitly rewritten as a linear system By=μ. Here, depending on the structure of the matrix B, several solution methods are available: If B is lower triangular, we can use the serial forward substitution. For example, For i=1,...,m,
number
number
number
number
number
[0213] 1.3 Implicit Systems for AI-Based Image and Video Compression In the previous section, we discussed what implicit systems are, how they are solved, and how to find solutions. In this section, we explain how implicit systems of equations are used in AI-based image and video compression.
[0214] Compression algorithms are divided into two phases: encoding and decoding. In the encoding phase, input data is transformed into latent variables that have a smaller representation (number of bits) than the original input variables. In the decoding phase, the latent variables are inversely transformed to recover the original data (or an approximation of the original data). Thus, the numerical computation techniques used for encoding and decoding may or may not be different.
[0215] AI-based compression systems also require training, which is the process of selecting parameters for the AI-based compression system that achieve good compression results (e.g., small file size and low distortion). During training, portions of the encoding and decoding algorithms are run and used to determine how to adjust the parameters of the AI-based compression system.
[0216] The following is a non-exhaustive overview of some possible applications of implicit systems for AI-based image and video compression.
[0217] 1.3.1 Residual Implicit Compression Algorithm First, we will explain the compression algorithm that uses residual variables. The encoder generates a ground truth variable y∈R. m (either the image or a latent variable created elsewhere in the compression pipeline) and the residual variable ξ∈R m The residual ξ is quantized and may later be compressed with an entropy data compression method such as an arithmetic encoder. This encoding process implicitly quantizes the ground truth variable y to produce the quantized variable y(hat), but y(hat) does not need to be stored during encoding (although it can be used during training of AI-based image and video compression algorithms).
[0218] encoding More precisely, an implicit system for encoding and / or algorithm training can take the following form:
number
number
[0219] The implicit function (1.5) can be solved, for example, using one of the implicit function solvers described in Section 1.2. We call this coding solution an implicit coding solver (IES). An example of an IES is the 0 There are iterative solutions that start from (hat). For example, the initial guess is 0 (If f or μ is a neural network, then we can now decouple the ground truth from the computational graph during the training of f or μ.) For iterations k=0,...N, the iteration variables are defined as follows:
number
[0220] The iterations can be terminated if the convergence criterion is met. Convergence is guaranteed if f is contractive with respect to the argument y(hat). Upon termination, IES returns ξ and y(hat). The residual is quantized to ξ(hat) = Q(ξ) and fed into an entropy data compression scheme, and y(hat) may be used elsewhere in training and designing AI-based image and video compression algorithms.
[0221] Use of Ground Truth Variables During Training: Note that the ground truth variable y is used directly in the implicit system (1.5) and corresponds to the IES iteration in (1.6). Furthermore, the IES outputs both the residual ξ and the quantified variable y(hat), which can be used elsewhere in the training procedure (without the need to recover y(hat) from ξ(hat)). We note that the ground truth does not need to be decoupled from the computational graph or perturbed in any way (e.g., by adding noise) during the training and design of AI-based video and compression algorithms. This is a key innovation of our method. In the AI-based image and video compression research community, it is widely believed that ground truth variables (image or latent) cannot be easily used during the training of compression algorithms. However, in implicit systems such as (1.5), we have shown that this is indeed feasible and beneficial.
[0222] Train with the y(hat) returned by the IES: It is important to note that the IES not only returns y(hat) (quantized and passed to the entropy encoder), but also y(hat). Because the IES also returns y(hat), there is no need to run a separate decoding solver to recover y(hat) from ξ during training. This is a further important point in this section 1. Running a separate decoding solver during training can be expensive and computationally intensive. Therefore, using the quantized variable y(hat) returned by the IES elsewhere in the compression pipeline during training has the potential to significantly reduce the amount of computational time and resources required to train AI-based image and video compression pipelines.
[0223] Decryption In the decoding stage, the variables ξ(∇)=Q(∇) are obtained, for example, from an arithmetic decoder. The quantized variables y(∇) must be recovered by solving the following system:
number
[0224] The equation solver used during decoding does not have to be the same type as the solver used during encoding, but an iterative solver can be used. In this case, y 0 An initial guess is made, e.g., from a random distribution of y 0 Then, for iterations k=0,...,N, the iterator is updated as follows:
number
[0225] 1.4 Residual Linear Implicit Compression Algorithm Special care must be taken when the function f(y(hat)) in (1.5) is linear (in y(hat)). In this case, let f be a matrix A∈R. m×m The implicit system during encoding and training is:
number
[0226] To solve this system, we need to construct an IES. Here, due to the special linear structure of y, several options can be used. An iterative scheme is used to solve y 0An initial guess is made (again, y 0 (e.g., set (hat) = y). Then, at each iteration k=0,...N, first define
number
[0227] In one variation of the encoding and training algorithm, iteration y k+1 is defined as follows:
number
[0228] During training of an AI-based compression pipeline, the variable y returned by the IES can be used elsewhere in the data compression pipeline, thereby eliminating the need to run a decoding solver during training and significantly reducing the time required to train an AI-based compression algorithm.
[0229] In the decoding phase, we are given the quantized residual ξ(ξ)=Q(ξ) and must recover y(ξ). This is done by solving the following system:
number
[0230] Since this is a complete linear system in y(hat), any one of the linear system solvers described in Section 1.2 can be used as the decoding solver, either forward or backward substitution (if A is lower or upper triangular, respectively), or iterative methods such as the Jacobi method or the Gauss-Seidel method.
[0231] A note on the speed of iterative linear solvers: Under some circumstances (depending on the structure of A and the computer architecture used), serial solvers (such as the back- and forward-substitution methods described in Section 1.2) may be slower than iterative methods. An important point in this Section 1 is that if an iterative solver (such as the Jacobi method) can provide a performance improvement, then iterative solvers may be used to solve (1.12) during decoding. That is, even if (1.12) could be solved by back- or forward-substitution (e.g., if A is upper or lower triangular, respectively), it may not be advantageous to do so in a real-time compression-decoding pipeline.
[0232] Furthermore, the computational cost of using an iterative linear solver in an AI-based compression pipeline can be a small fraction of the total computation for the entire pipeline. For example, for an input image with pixel resolution of 256x256, a single 3x3 convolutional layer requires approximately 22 GFLOPs of computation. In contrast, 10 iterations of an iterative solver in a 64x64 latent space (which is often all that is needed) uses 0.017 GFLOPs, or less than 0.1% of a single neural network layer in image space.
[0233] 1.4.1 Special matrix structure of A In image and video compression using AI, it is useful for the matrix A to have some special structure, which can variously be one (or a combination) of the following: A can be (strictly) lower or upper triangular. For example, suppose y is an image or latent variable vectorized in raster scan order. Then, if A is strictly lower triangular, then the non-zero coefficient of row i of A (pixel y in the raster scan representation of y) i ) only operates on the previous pixel in raster scan order. A can have a sparse, band-like structure. Again, suppose y is vectorized in raster-scan order. That is, a non-zero coefficient in row i of A affects only neighboring pixels in i's image representation. In this case, we call A a context matrix. For each row i of A, the matrix captures only neighboring context pixels for pixel i. For example, the context window could be a square block of pixels with a block width of 3 centered on pixel i. Alternatively, the context window could be all preceding pixels in raster-scan order within the block centered on pixel i. A can also be a block matrix. For example, if the image or latent y is composed of channels, a block structure can be constructed so that constituent sub-blocks operate on each channel. As another example, the image or latent may be divided into smaller square or rectangular blocks of pixels, in which case a block structure would be imposed on A. A can be constructed such that its matrix norm (e.g., maximum row norm measured by l1) is less than 1. This ensures convergence for many iterative solvers. · A can be parameterized by a matrix decomposition such as LU decomposition or QR decomposition.
[0234] Each of these structures provides computational advantages for designing fast linear equation solvers by utilizing specific matrix structures.
[0235] 1.4.2 Practical examples of linear implicit systems in AI compression algorithms This section describes the use of linear implicit systems within AI-based algorithms for image and video compression. The encoding path in this example works as follows, and is detailed, for example, in Figure 4. The algorithm takes in an image x with three color channels. Image x is then converted to a latent representation y via an encoder. The encoder may be a neural network consisting of several layers, and can downsample the representation to increase the number of channels. The latent representation is further converted to a hyperlatent (side information) representation z by a hyperencoder (which may also be a neural network). The hyperlatent is a representation of the hyperlatent and a fixed position parameter μ z The quantized hyperlatency is quantized to a quantized representation z(hatt) via a quantization function Q that takes in a fixed scale parameter σ z and the location parameter μ z The encoded data is then converted into a bitstream via an arithmetic entropy encoder using
[0236] The quantized hyperlatent z is then transformed by a hyperdecoder (again potentially a neural network) to obtain the location parameter μ, which is the quantity required for the implicit linear system (1.9). y and matrix A y The output is a matrix. The matrix can have special matrix structures such as sparse band matrix (context matrix), block matrix, lower triangular or upper triangular, and matrix factorization such as LU or QR can be performed. The hyperdecoder also uses the scale parameter σ, which is later used in the arithmetic encoder. y Also outputs the ground truth latent y and scale μ y , and the context matrix A y is fed to an implicit coding solver, which may be one of the iterative solvers mentioned above, and outputs a quantized latent residual ξ (hat). This quantized residual is scaled by a scale parameter σ y It is finally converted to a bitstream by an arithmetic encoder using
[0237] The decoding algorithm is illustrated schematically in Figure 5 as an example. In the decoding algorithm, the hyper-latent bitstream is first decoded with fixed scale and position parameters σ z and μ z The quantized hyperlatency is then passed to a hyperdecoder, which decodes the hyperlatency using μ y and matrix A y , and the scale parameter σ y Output σ y Using (1.12), an arithmetic decoder can convert the residual bitstream into a quantized residual ξ(∇∇). A decoding solver is then used to find the quantized latent y(∇∇) by solving (1.12), and the matrix A y , position p y , we need the residual ξ(∇∇∇). Finally, after recovering the quantized latent y(∇∇∇), a decoder is used to convert the quantized latent into a reconstructed image x(∇∇).
[0238] In a simple example, the parameter μ is z and σ z are the entropy parameters of the z hyperlatent. These parameters are defined globally during network initialization and optimized over the course of training the network. During inference, these parameters are assumed to be constant and shared between the encoding and decoding sides. In more complex scenarios, the entropy parameters associated with the z hyperlatent, and higher-order latents, if present, may also be output from the neural network (e.g., a hyper-autoencoder), and the details of deriving these will be apparent to those skilled in the art.
[0239] For network training of the illustrated AI-based compression algorithm, data samples from a training set can be passed through the steps described. The realized quantities and parameters are used to evaluate a loss function, which can be based on: The difference between the reconstructed image x (hat) and the input training image x, commonly called the distortion or perceptual loss term; The estimated length of the bitstream associated with all quantized potential quantities (including but not limited to y and z), given by the cross-entropy term calculated with the realized entropy parameters (details will be clear to those skilled in the art), commonly referred to as the rate term.
[0240] 1.5 Residual-free implicit systems We describe AI-based video and image compression algorithms that use the residual ξ. In this setting, the residual is not coded, and an implicit system with side information (hyperlatent) z as a parameter is used to recover the variable y. For example, we need to solve the following system:
number
[0241] For example, the following iterative method can be considered: 0 Starting from (hat), for iteration k=0,...,N, set
number
number
[0242] Of course, (1.13) can be made linear in y, in which case the system becomes
number
[0243] 1.6 Relationship to other studies Several links can be drawn between the implicit system equation solvers described herein and other compression methods. Specifically, compression systems based on partial differential equations (PDEs) may use iterative methods to solve the PDEs. These iterative methods are specifically designed for the particular PDEs used and may take a long time to converge to a solution. Furthermore, PDE-based compression methods are not comparable to the current state-of-the-art in video and image compression.
[0244] The context window described in Section 1.4.1 is a general notion of pixel context. In this sense, the intra-prediction context used in other compression algorithms can be considered a specific type of context window. Similarly, wrapping transforms used in classical signal processing (mainly audio compression) that use overlapping coding blocks are similar to context windows in that they also use blocks or windows that overlap to some extent.
[0245] 1.7 Concept 1. Construction and parameterization of an implicitly defined equation system for AI-based image and video compression. 2. Use of implicitly defined equation systems in AI-based image and video compression, such as ground truth context during network training, reducing encoding and decoding times, and using different solvers in the encoding and decoding phases. 3. Placing special structures in such systems, for example through linear implicit systems with special matrix structures in linear systems (context windows and band structures, block structures, factorization of various matrices, etc.). 4. Techniques for solving these systems in AI-based image and video compression pipelines, and the interaction between the solution method and the type of implicit system to be solved.
[0246] 1.8 References [1]Jorge Nocedal and Stephen J. Wright. “Numerical Optimization”. Springer Series in Operations Research and Financial Engineering Springer, New York, 2nd edition (2006). [2]Gene H. Golub and Charles F. Van Loan. “Matrix Computations”. The Johns Hopkins University Press, Baltimore, 3rd edition (1996).
[0247] 2. L-Context: Autoregressive Probabilistic Models with Linear Decoding Systems for AI-Based Image and Video Compression In AI-based compression, autoregressive context models have powerful entropy modeling capabilities but suffer from very short runtimes due to the fact that they must be run serially. Here, we demonstrate how to overcome this challenge by predicting autoregressive modeling components from a hyperdecoder (and conditioning these components on "side" information). This approach results in an autoregressive system that has impressive modeling capabilities yet operates in real time. This real-time capability is achieved by decoupling the autoregressive system from the model required by the lossless decoder. Instead, the autoregressive system solves linear equations during decoding, which can be performed extremely quickly using numerical linear algebra techniques. Encoding can be similarly fast by solving simple implicit equations.
[0248] 2.1 Introduction In AI-based image and video compression, an input image x is mapped to a latent variable y. This latent variable is encoded into a bitstream and sent to a receiver that decodes the bitstream back into the latent variable. The receiver then converts the recovered latent back into a representation (reconstruction) of the original image, x (hat).
[0249] To perform the step of converting the latent to a bitstream, the latent must be quantized to an integer value representation y(hat). This quantized latent y(hat) is converted to a bitstream via a lossless encoding / decoding scheme such as an arithmetic encoder / decoder or a range encoder / decoder.
[0250] Importantly, a lossless encoding / decoding scheme requires modeling a one-dimensional discrete probability mass function (PMF) for each element of the latent quantized variable. When this model PMF matches the true one-dimensional data distribution of the latent data, an optimal bitstream length (file size) is achieved.
[0251] Therefore, file size is closely related to the power of the model PMF to match the true data distribution. A stronger model PMF results in a smaller file size, which leads to better compression. Also, a smaller file size allows more information to be transmitted, thereby reducing the error in recovering the original image. Therefore, much effort has been invested in developing powerful model PMFs (often called entropy models).
[0252] The typical approach to modeling 1D PMF in AI-based compression is to use a parametric 1D distribution,
number
number
[0253] More powerful models are created by "conditioning" the parameters θ, such as the position μ or scale σ, to other information stored in the bitstream. That is, rather than statically fixing the PMF parameters to be constant for all inputs in an AI-based compression system, the parameters can react dynamically to the input.
[0254] This is generally done in two ways. First, in addition to y, extra side information z is transmitted in the bitstream. The variable z is often called a hyperlatent; it is decoded in its entirety before decoding y, so that it can be used to encode / decode y. μ and σ can then be functions of z, e.g., via a neural network to return μ and σ. The one-dimensional PMF is then said to be conditioned on z,
number
[0255] Another common approach is to use an autoregressive probability model. For example, PixeICNN is widely used in academic AI-based compression papers. In this framework, context pixels are used to condition the position μ and scale σ parameters of the PMF at the current pixel. These context pixels are previously decoded pixels adjacent to the current pixel. For example, suppose the previous k pixels have been decoded. Since images have spatial correlation, these pixels often contain relevant information about the current active pixel. Therefore, these pixels can be used to improve the prediction of the position and scale of the current pixel. The PMF of the current pixel is
number
[0256] Both approaches, hyperlatent conditioning and autoregressive contextual model conditioning, have advantages and disadvantages.
[0257] One of the main advantages of conditioning with hyperlatencies is that the quantization can be position-shifted. In other words, the quantization bins can be centered around the position parameter μ. With integer-valued bins, the quantization latent is given by
number
number
number
[0258] The main advantage of autoregressive context models is their ability to utilize context information: decoded neighboring pixels. Because images (and videos) are highly spatially correlated, these neighboring pixels can make very accurate and precise predictions of what the current pixel should be. Most state-of-the-art academic AI-based compression pipelines use autoregressive context models due to their impressive performance when measured in terms of bitstream length and reconstruction error. However, despite their impressive relative performance, they suffer from two fatal drawbacks:
[0259] First, they must be executed serially. The PMF of the current pixel depends on all previously decoded pixels. Furthermore, the position and scale functions μ(·) and σ(·) are typically large neural networks. These two facts mean that autoregressive context models cannot be executed in real time, taking orders of magnitude longer than the computational requirements necessary for real-time performance on edge devices. For this reason, autoregressive context models are currently not commercially viable, despite their superior compression performance.
[0260] Second, due to the influence of cascading errors, the autoregressive context model is less susceptible to straight rounding (
number
number
[0261] Therefore, there is a need to develop a framework for PMF modeling that combines the advantages of hyperlatent conditioning (fast execution, position shift rounding) with the superior performance of autoregressive modeling (making strong predictions from previously decoded context pixels).
[0262] This section outlines the steps we have taken to this end. The key contribution of this section is that it combines the key features of hyperlatent conditioning and autoregressive modeling without the drawbacks of either.
[0263] 2.2 L-context The innovation we developed to solve this problem is to modify the hyperdecoder to additionally predict the parameters of the autoregressive model using the hyperdecoder, i.e., we condition the parameters of the autoregressive model on the hyperlatent z. This contrasts with the standard setup of autoregressive modeling, where the autoregressive function is static and invariant, and does not change depending on the inputs of the compression pipeline.
[0264] We primarily target the following quasi-linear setting (meaning the decoding path is linear, but the encoding is not): In addition to the usual μ and σ predictions, the hyperdecoder also outputs a sparse matrix L, called the context matrix. This sparse matrix is used in the autoregressive context modeling component of PMF as follows: Given a latent pixel order (e.g., raster scan order), assume that the previous k latent pixels have been coded / decoded and are available for autoregressive context modeling. Our approach is to use a modified position-shift quantization as follows: We quantize in the following way:
number
number
number
[0265] Note that this is a form of autoregressive context modeling, since the 1D PMF depends on previously decoded latent pixels. However, note that only the position parameter, not the scale parameter, depends on previously decoded latent pixels.
[0266] Note that the integer values actually encoded by the arithmetic encoder / decoder are the quantized underlying residuals.
number
[0267] So, during decoding, what the arithmetic encoder returns from the bitstream is ξ(∇∇∇∇) rather than y(∇∇∇). Then, for y(∇∇∇), we need to recover y(∇∇∇) by solving the following linear system:
number
number
[0268] It is important to note here that solving system (2.6) is decoupled from the arithmetic decoding process, which must be performed serially as the bitstream is received, whereas solving (2.6) is independent of this process and can be done using any numerical linear algebra algorithm. This point has important runtime implications, so it is important to emphasize that the decoding passes of the L-context modeling step can be performed in parallel, rather than as a serial procedure.
[0269] Another way to look at this result is to consider the arithmetic encoder / decoder as operating on the zero position. That is, the arithmetic encoder operates on the residual ξ (hat) rather than the y (hat) latent. In this sense, the PMF is
number
[0270] 2.2.1 Solving the encoding and training problem In both encoding and training the L-context system, we need to efficiently solve (2.4) to determine the unknown variables y that are not explicitly given. In fact, (2.4) is an implicit system. Here, we outline several possible approaches to finding y that satisfies (2.4). The first approach is to operate on the pixels according to the order of their dependencies in the autoregressive model by solving (2.4) serially. In this setting, we can simply iterate through all pixels in the autoregressive order and apply (2.3) at each iteration to extract the quantized latent at the current iteration. Since (2.4) is an implicit equation, a second approach is to use an implicit equation solver called an implicit coding solver, which can be an iterative solver that tries to find a fixed-point solution to (2.4). Finally, in certain special cases, the autoregressive structure defined by the sparse context matrix L can be used to parallelize components of the serial decoding path. In this approach, a dependency graph (Directed Acyclic Graph) is first created, defining the dependencies between latent pixels. This dependency graph can be constructed based on the sparse-dense structure of the L matrix. We then note that pixels at the same level of the DAG are conditionally independent of each other. Therefore, all pixels can be computed in parallel without affecting the computation of other pixels at that level. Therefore, encoding (and training) involves iterating through the graph, starting from the root node and processing each level of the DAG. At each level, all nodes are processed in parallel. This method can be significantly faster than simple serial processing if a parallel computing environment, such as a graphics processing unit or neural processing unit, is available. See Figures 6(a), (b), and (c) for an example illustration of this procedure.
[0271] 2.2.2 Special simultaneous equation solver for decoding Many of the techniques described in the previous section can also be applied during decoding. Specifically, the linear equation
number
number
[0272] 2.3 Example of operation in an AI-based compression pipeline This section provides details of the L-context module within the AI-based compression pipeline.
[0273] In encoding (see Figure 7), an input image x is fed into an encoder function, such as a neural network. The encoder outputs a latent y. This latent is then fed into a hyperencoder, which returns a hyperlatent z. The hyperlatent is quantized to z and then scaled to a learned position μ z and scale σ zThe quantized hyperlatency is then sent to the bitstream via an arithmetic encoder using a 1D PMF that depends on μ as well as a lossless encoder. Optionally (although not depicted in Figure 7), a trained L-context module can also be used to model the entropy of y. The quantized hyperlatency is then sent to a hyperdecoder, which outputs parameters for the entropy model for y. These parameters include the position μ y , scale σ y , L-context matrix L y The residual is computed by solving the coding equation, for example, using one of the methods described in Section 2.2.1. This quantized residual has zero mean and a scale parameter σ y The PMF is transmitted in the bitstream using the PMF with
[0274] In decoding (see, e.g., Figure 8), a first hyper-latent z is recovered from the bitstream using a one-dimensional PMF with learned position and scale parameters μ and σ, and a lossless decoder. Optionally (not depicted in Figure 8), an L-context module can also be used, if used in encoding. The hyper-latent is fed to a hyper-decoder, and the position μ y , scale σ y and the L-context matrix L y The residual ξ (hat) is the lossless decoder, zero-mean PMF, and scale parameter σ y The quantized latents y are then recovered from the bitstream using (x,y). The quantized latents y are then recovered by solving a linear decoding system, for example, as described in Section 2.2.2. Finally, the reconstructed image is recovered by feeding the quantized latents y through a decoder function, such as another neural network.
[0275] 2.4 Extensions Here we detail some possible extensions to L-contexts.
[0276] 2.4.1 A-Context In the previous section, we assumed that L is lower triangular with respect to the pixel decoding order. As a generalization, we can relax this assumption and assume a general matrix A that is not necessarily lower triangular. In this case, the coding equation becomes
number
number
number
number
[0277] 2.4.2 Non-linear context In general, the context function may be non-linear. For example, the coding problem is to solve
number
number
number
number
[0278] One interpretation of this latter extension is an implicit pixel-CNN. For example, if f(·) has a triangular Jacobian (a matrix of first derivatives), then (2.11) models an autoregressive system. However, (2.11) is more general than this interpretation, and in fact can model not only autoregressive systems, but any stochastic system with forward and backward conditional dependencies on pixel ordering.
[0279] 2.5 Concept A quasi-linear, input-adaptive autoregressive context modeling system for entropy modeling in AI-based image and video compression, called L-context, which is conditioned on previously decoded values and meta-information via hyperlatencies. Parametricization of components within such systems, such as context matrices and their associated structures; examples include sparse and banded lower or upper triangular matrices. · The encoding and training process for such implicit systems, including implicit equation solvers for finding fixed-point solutions of recursive systems and parallel procedures for conditionally independent components in the system. An extension of these systems, called A-context, relaxes the assumption of a triangular context matrix by generalizing the structure of the context matrix to any kind. · An extension of these systems, called the nonlinear context, where autoregressive systems include arbitrarily defined nonlinear functions.
[0280] 3. Stochastic Augmented Lagrangian Methods for AI-Based Image and Video Compression 3.1 Introduction 3.1.1 Rate-Distortion Tradeoff The rate-distortion tradeoff is a fundamental concept in lossless compression. When designing a lossless compression algorithm, two conflicting goals must be achieved: on the one hand, the compression rate (which describes the size (in bits) of the compressed object (e.g., video or image)) must be small; on the other hand, the distortion between the original and the reconstructed object must also be small. These two goals are mutually exclusive; low distortion generally equates to large file sizes, and vice versa. The so-called rate-distortion tradeoff determines the relative importance of these two goals.
[0281] Currently, the AI-based image and video compression community achieves a particular rate-distortion tradeoff by designing algorithms that minimize an objective function that measures the relative contributions of rate, denoted by R, and distortion, D. The objective function is the sum of these two quantities, with coefficients that control the relative contributions of these two quantities. That is, the objective function for a minimization problem can be written as:
number
[0282] For practical purposes, it is common to do one of the following: Enforce a fixed allowed file size (rate) and optimize for minimum reconstruction error (distortion). Enforce a fixed distortion tolerance for reconstruction and optimize for minimum file size (rate).
[0283] The ability to reliably target a fixed rate or distortion while minimizing complementary variables is important for algorithm comparison in research and for performance assurance in production. The innovation we present here, the stochastic augmented Lagrangian method, solves this problem.
[0284] Note that this is complementary to the variable-rate model algorithm, which implements different types of rate targets. The goal of the stochastic augmented Lagrangian method is to reliably train a deep neural network to a specified rate target averaged over the test set. However, while the average compression performance of the test set is guaranteed by the stochastic augmented Lagrangian method, individual images or videos within the test set may deviate slightly from the overall average. The value of the variable-rate model is its ability to fine-tune individual images or videos within the test set to specific compression rates, so the variable-rate model can work in conjunction with the stochastic augmented Lagrangian method.
[0285] The optimization problem in Equation 3.1 can then be reformulated as an overall constrained optimization problem. For example, if we target a fixed rate r0, the optimization problem becomes: min D (3.2) according to R=r0
[0286] In the remainder of this document, we focus on the optimization problem of Equation 3.15, but the innovations and algorithms can equally well be used to instead minimize the rate R subject to a fixed constraint on the distortion D.
[0287] 3.1.2 Augmented Lagrangian method A classical approach to solving constrained optimization problems is the augmented Lagrangian method, which solves the general constrained optimization problem min f (3.3) subject to g=c Instead of running
number
number
[0288] The intuition for this algorithm is that as the algorithm converges, (gc) → 0, and therefore the quadratic term in Equation 3.4 becomes much smaller than the other terms. Thus, the original constrained optimization problem is recovered, while an optimal estimate of λ can be found. This algorithm has strong theoretical guarantees of convergence and is standard in the constrained optimization literature.
[0289] Despite the advantages of the augmented Lagrangian method, it is not straightforward to apply it to our central goal of solving Equation 3.15 in the context of AI-based compression. In contrast to classical optimization, it is not possible in AI-based compression to repeatedly alternate between minimization and multiplier update steps, as the minimization step would require training a deep neural network for hours, days, or weeks.
[0290] Our innovation is an algorithm that solves Equation 3.15 in a stable and robust manner in the presence of functions involving deep neural networks trained on large amounts of data. Because this innovation is strongly inspired by classical augmented Lagrangian methods, we call it the stochastic augmented Lagrangian method. This innovation is compatible with all standard random variables in AI-based compression architectures (hypernetworks, hyperhypernetworks, etc., context models, and adversarial objectives such as GANs).
[0291] In fact, this innovation makes it possible to target many types of equality or inequality constraints in stochastic (e.g., stochastic gradient descent (SGD)) optimization problems. The description here is an example that can be used to target specific compression rate performance in AI-based compression. However, the stochastic augmented Lagrangian method detailed here works for all similar stochastic problems with equality or inequality constraints, even outside of AI-based compression.
[0292] 3.2 Innovation: Extending the Augmented Lagrangian Method to the Stochastic Case Here, we describe an innovation used to solve constrained optimization problems involving deep neural networks in the context of AI-based compression: the stochastic augmented Lagrangian method. Our algorithm innovates over classical augmented Lagrangian methods (which are infeasible in this context) and also includes several modifications that improve stability and robustness for use in training deep neural networks.
[0293] First, we examine how the classical augmented Lagrangian method is derived, which leads to modifications of our method. For example, we consider the strain D, the rate R, and the target rate r. o is minimized as follows:
number
number
[0294] The derivation of this multiplier update formula is as follows: when minimizing the loss L, the gradients for all learnable parameters θ vanish:
number
[0295] Then, from equation 3.5, we obtain:
number
[0296] Therefore, the update rule for the augmented Lagrangian multiplier (Eq. 3.6) is
number
number
[0297] That is, λ * is a scalar that makes the gradient of the function we want to minimize equal to the gradient of the constraints. * is defined as the Lagrange multiplier that solves the original goal of "minimizing D subject to R = r0." Therefore, we can obtain a new λ and repeat the process of minimizing L with the improved λ. By repeating this process, it is theoretically strongly guaranteed that we will eventually find the optimal λ that satisfies the constraint R = r0 and minimizes the distortion D.
[0298] So what's the problem with deep neural networks? The central problem is that minimizing L takes a very long time when training a neural network. So it's not practical to alternate between updating estimates of the Lagrange multipliers and minimizing L, as classical algorithms do multiple times. But the above derivation leads to our innovation of what to do instead:
[0299] Since L is not minimized, we modify the multiplier update formula to take a more conservative step than the current estimate of the optimal multiplier, i.e.: 1.Loss
number
number
[0300] This has many advantages: 1. If we simply alternate between SGD steps and multiplier updates without factoring in the ε coefficient, μ will act as a sort of "learning rate" for λ, which causes problems: (a) We want μ to be small (as opposed to classical algorithms) so that the quadratic term in the loss function L has little effect during training, and we recover the correct rate-distortion problem at the end of training. (b) If μ is too small, it may take hundreds of thousands to millions of training iterations for the multiplier to converge (or may never converge), making the algorithm impractical. (c) If μ is large, then change the training objective to reduce the rate variance. This means increasing the distortion variance through the rate-distortion problem. For AI-based compression in real-world applications, increasing the distortion variance is not an acceptable outcome (users receiving distorted images are not comforted by the idea that, on average, the images are undistorted—they want low distortion variance). The above concerns can cause the optimization to be very sensitive to the choice of μ, and in many cases to fail completely. Instead, the introduction of the factor ε decouples the learning rate of λ from μ, allowing μ to be kept small while still allowing the multiplier to converge in a reasonable amount of time. 2. Making the multiplier update an iterative update rule with a decoupled learning rate naturally leads to extension to other update rules, such as Adam, with a "gradient" μ(R-r0) and a learning rate ε. This increases stability and adaptability, and is remarkably robust to changes in architecture, rate objective, and hyperparameter choice across all tests. 3. The view of the iterative update rule for multiplier updates naturally leads to the inclusion of "gradient clipping" on the multiplier "gradient" μ(R-r0), as is common in SGD variants of deep learning. 4. We note that the quadratic term in the augmented Lagrangian loss rapidly vanishes during training, so
number
number
[0301] A detailed example of the stochastic augmented Lagrangian method is given below:
[0302] Algorithm 3.1: Pseudo-code example outlining the stochastic augmented Lagrangian method. Typical values for the hyperparameters are μ = 10 -4 , η=10 -3 or 10 -4 , ε=10 -4 or 10 -5 λ is initialized to 0. input Data (a collection of tensors, usually images or videos): {x1,...,x n} Encoder (typically a neural network) θ Decoder (typically a neural network) θ A learnable parameter to change the performance of the encoder-decoder: θ Function to measure distortion of data reconstruction: D Function to measure compression rate: R Target compression rate: r0 SGD-like optimizer (like Adam) for network parameters: opt θ SGD-like optimizer (e.g. Adam) for Lagrange multipliers: opt λ Learning rate of the network parameter optimizer: η Multiplier optimizer learning rate: ε Lagrange multiplier initialization: λ Weight of the quadratic term of the loss function: μ training Execute while θ is not converged
number
[0303] 3.3 Innovation: Further extensions to the stochastic extended Lagrangian method Here we detail some additional modifications made to the stochastic augmented Lagrangian method to improve its robustness, stability, and ease of use.
[0304] 3.3.1 Distortion Scaling Compression algorithms must operate across a variety of compression rate targets and distortion levels. Significantly changing the rate target can result in distortion changes of an order of magnitude or more due to the rate-distortion tradeoff. Therefore, in AI-based compression, training a neural network for different rate targets using a stochastic augmented Lagrangian method results in a significant change in the scale of the loss function. This is equivalent to changing the learning rate of the SGD (or variants thereof) optimizer used to train the neural network parameters. This is undesirable because it can mean having to perform a learning rate hyperparameter search (training the network multiple times) each time a new model is designed, a new distortion loss is used, or a significantly different target rate is chosen.
[0305] The innovation is to include an additional feature in the stochastic augmented Lagrangian method that ensures that the loss function scales roughly the same regardless of the target rate, which eliminates the need to adjust the learning rate and makes the stochastic augmented Lagrangian method "works out of the box."
[0306] To achieve this, we Store a set of images with the same distribution as the images used to train the compression algorithm, already compressed (either classically or with another AI-based algorithm) to the target rate range. At the start of training, calculate the distortion on the holdout set that is closest (or an interpolation of the two closest) to the planned target rate for the current training run. This distortion estimate is used to scale the distortion term in the stochastic augmented Lagrangian method, so that the distortion is at the desired scale (usually
number
[0307] 3.3.2 Test Objectives Constrained optimization algorithms, such as stochastic augmented Lagrangian methods, allow us to target r0 for a specific mean constraint (e.g., rate) on a training dataset. However, convergence to the target constraint on the training set does not guarantee that the same constraint will be satisfied on the test set. This can be caused, for example, by a change in the quantization function used in training versus the function used in inference (test / validation). For example, in AI-based compression, it is common to quantize using uniform noise during training but integer rounding during inference. Ideally, the constraint would also be satisfied in inference, but due to different quantization schemes, the constraint is often violated in inference. As a solution, we provide the following extension to the stochastic augmented Lagrangian method: At each training step, the forward pass uses the inference quantization value to calculate the constraint target value, while the backward pass (gradient calculation) uses the training quantization value. For example, when considering rate constraints, the value
number
[0308] 3.3.3 Stochastic Augmented Lagrangian Algorithm Including Extensions Here we present a stochastic augmented Lagrangian method with the necessary extensions to accommodate changes in distortion scale and target inference behavior during training:
[0309] Algorithm 3.2: Pseudo-code example outlining an example of a stochastic augmented Lagrangian method extended to include adaptive loss scaling and inference constraint targeting. Typical values for the hyperparameters are μ = 10 -4 , η=10 -3 or 10 -4 , ε=10 -4 or 10 -5 λ is initialized to 0. If an exponential moving average or similar is used as the running average for scaling the distortion, β = 0.99 or 0.999. input: Data (a collection of tensors, usually images or videos): {x1,...,x n} Encoder (typically a neural network) θ Decoder (typically a neural network) θ A learnable parameter to change the performance of the encoder-decoder: θ Function to measure distortion of data reconstruction: D Function to measure compression rate: R Target compression rate: r0 SGD-like optimizer (like Adam) for network parameters: opt θ SGD-like optimizer (e.g. Adam) for Lagrange multipliers: opt λ Learning rate of the network parameter optimizer: η Multiplier optimizer learning rate: ε Lagrange multiplier initialization: λ Weight of the quadratic term of the loss function: μ Parameter of the moving average of the scaled distortion (if required): β Quantization function for training (typically noise quantization): Q train Quantization function for inference (generally integer rounding): Q inference training s←2D0(x,x(hat)) (initialize distortion scaling estimate using holdout set) Execute while θ is not converged
number
[0310] 3.4 Innovation: Decaying Scale Thresholds The stochastic augmented Lagrangian method also has the advantage that the strength of the rate term in the rate-distortion loss starts small and grows during training, allowing the neural network training to avoid bad local minima, resulting in improved overall performance compared to when the rate term in the rate-distortion loss is weighted heavily throughout training.
[0311] Here we describe a related innovation we developed to achieve a similar objective (avoiding bad local minima) using a similar mechanism (annealing important parameters during training).
[0312] In AI-based compression, data is typically encoded into latent variables by neural networks and then further compressed using lossless compression algorithms. These algorithms rely on so-called "entropy models," which model the probability distribution in the latent space. The parameters of the entropy model ("entropy parameters") are internally learned within the network (either directly or predicted using a "hyperplier" structure, but are not limited to these methods). Entropy parameters most commonly consist of location and scale parameters (often expressed as positive real values), such as the mean μ and standard deviation σ of a Gaussian distribution or the mean μ and scale σ of a Laplacian distribution. Naturally, many more distribution types exist, both parametric and nonparametric, with a wide variety of parameters. Thresholding techniques are particularly, but not exclusively, applied to the scale parameter and more generally to parametrize the concepts of "certainty" or "narrowness" in entropy models. Good training conditions are essential to properly tune the parameters so that the network can achieve a typical level of performance. One such condition is threshold decay, which Deep Render research has shown can provide certain types of networks with roughly a 5% performance improvement (in terms of test loss) compared to equivalent networks that do not have this feature.
[0313] A description of the (precise) nature of an example of this technique and a practical implementation forms the basis of this section.
[0314] The value representing the scale parameter σ of a parametric entropy model (such as Gaussian or Laplacian) is typically constrained to be a positive real line, i.e., σ∈R. When σ is learned by network training, the network designer must often actively enforce this constraint to avoid training instabilities (since division by this quantity is often appropriate in training, and a divisor of 0 leads to an undetermined value). There are several ways to enforce this constraint, including (but not limited to): For example, if t=0.1, threshold all observed values of σ to a specific value t:
number
[0315] The decaying scale threshold method gradually decreases the threshold t during training, enforcing the strict positive property of the scale parameter σ. That is, at the beginning of training, it is set to t=t0, and its magnitude is gradually decreased until it reaches the final value t=t f (However, this does not mean the end of training.) The magnitude of t at any point during training is relative to the magnitude of the scale parameter it adjusts. Also, the decay process can be fixed or variable.
[0316] Examples of fixed t decay processes include (but are not limited to): Decay t linearly with the number of training iterations (data propagation and parameter update) as follows:
number
number
[0317] Examples of variable attenuation processes for t include (but are not limited to): Decay t with respect to the loss metric, e.g., by decreasing it for each iteration in which a new minimum loss level is achieved Decay t in a similar way as above, with respect to quantitative metrics obtainable during training.
[0318] 3.5 Concept 1. AI-based compression aims for a fixed rate with minimal distortion (or vice versa). 2. The impracticability of classical algorithms in constrained optimization involving neural networks. 3. The classical augmented Lagrangian method is modified to an SGD-like learning rule (specifically, the Adam learning rule) to create a stochastic augmented Lagrangian method. 4. Innovations in adaptive distortion and Lagrangian multiplier scaling in stochastic augmented Lagrangian methods to enforce similar learning rates under various constrained optimization objectives in AI-based compression. 5. In AI-based compression, learning and inference behavior often differ, so we modify the computational graph to target rate-constrained inference behavior during training. 6. Advantages of stochastic augmented Lagrangian methods: reliable constraint enforcement, stability, robustness to hyperparameter variations, loss is minimized to recover the original rate-distortion objective, and the importance of the rate term gradually increases during training (rather than fixing the importance during training, which helps avoid bad local minima). 7. The stochastic augmented Lagrangian method is complementary to the variable-rate model, in that the former can target average performance across the entire test dataset, while the latter can fine-tune performance at individual data points in the dataset after average performance across the dataset has been guaranteed. 8. The stochastic augmented Lagrangian method can extract the correct Lagrangian multiplier λ for the target compression rate corresponding to the loss L = D + λR. 9. The stochastic augmented Lagrangian method ultimately optimizes for the same loss as a fixed scaling factor with the same target rate performance, which has the advantage of being able to handle optimization for streaming data with buffering, which is the main use case in production. 10. Scale threshold decay: The scale threshold is not fixed but is annealed during training, which also helps avoid bad local minima. 11. While we have detailed the stochastic augmented Lagrangian method and decaying scale threshold in the context of AI-based compression, they are also fully functional in other settings. For example, stochastic augmented Lagrangian methods can be used whenever there is a stochastic optimization problem subject to equality or inequality constraints.
[0319] 3.6 Generalization: Constrained Optimization Solutions The discussion so far applies to the more general framework of solving constrained optimization problems. Recall that the problem typically solved in AI-based compression is to minimize some combination of rate R and distortion D (see, for example, equation (3.1)), but the tradeoff between rate and distortion is fixed before running the optimization (training) algorithm. The tradeoff is determined by a scalar parameter λ that controls the relative importance of the two terms. R and λ D In this standard approach, the optimization (training) problem becomes
number
[0320] The main problem with this method is that the compression rate is not known in advance; that is, the actual average compression rate is only known after running the optimization algorithm (training). This means that to achieve a target compression rate (call it the target compression rate r0), many different optimization problems must be solved, each with a scalar λ R and λ D This is problematic because it means having different rate-distortion tradeoffs (via ), which is a very inefficient procedure and does not scale well to large datasets (such as videos).
[0321] Thus, the overarching goal of Section 3 is to completely reformulate the training problem as one of constrained optimization: given a target compression rate r, we aim to minimize distortion, subject to the constraint that the average model compression rate is equal to the target compression rate. Mathematically, this amounts to solving
number
[0322] There are many optimization algorithms that can solve this problem, including the augmented Lagrangian. Regarding constrained optimization algorithms, we recommend [1, Chapters 12 & 17] (generic algorithms) and [11, Chapter 15] (first-order methods).
[0323] How do constrained optimization algorithms solve (3.15)? In most cases, they solve it by introducing a Lagrangian. This is a way to turn the equality constraints into a single objective function by introducing additional Lagrangian multipliers. For example, the Lagrangian for (3.15) is
number
number
[0324] This minimax problem is commonly solved in practice when working on constrained optimization problems. Under the hood, this is what the augmented Lagrangian does as well.
[0325] How does a minimax optimization algorithm work? Typically, it alternates between descending steps in θ (the outer minimization problem) and ascending steps in λ. These steps can also be done simultaneously (they do not have to be interleaved). In machine learning, it is generally easiest to derive these steps using the gradient of the Lagrangian (with respect to θ and λ). More complex updates are generally possible, such as using a second-order Hessian (in which case a quasi-Newtonian update rule can be employed). Pseudocode outlining this procedure is provided below in Algorithm 3.3.
[0326] Algorithm 3.3: Pseudocode example outlining the general procedure for solving a constrained optimization problem (with target rates), where the problem is redefined as a minimax of a Lagrangian. The Lagrangian multipliers are updated in ascent steps (solving the interior maximization problem), and the network parameters are updated in descent steps (solving the exterior minimization problem). The Lagrangian defined here is just one example of a Lagrangian incorporating equality constraints. input: Data (a collection of tensors, usually images or videos): {x1,...,x n} Encoder (typically a neural network) θ Decoder (typically a neural network) θ A learnable parameter to change the performance of the encoder-decoder: θ Function to measure distortion of data reconstruction: D Function to measure compression rate: R Target compression rate: r0 Lagrangian
number
number
[0327] 3.7 References [1] Jorge Nocedal and Stephen J. Wright. “Numerical Optimization”. Springer Series in Operations Research and Financial Engineering Springer, New York, 2nd edition (2006).
[11] Amir Beck. “First-order methods in optimization”.Society for Industrial and Applied Mathematics, Philadelphia,(2017).
[0328] 4. Statistical Deep Feature Loss for Image Compression 4.1 Introduction Here we outline an approach to assess the reconstruction quality of images in a (generative) autoencoder image compression framework. In contrast to traditional image metrics that compare images in image space, we compare images in a latent feature space obtained from the activations of a separate artificial neural network.
[0329] In the broader generative modeling community, these feature maps are often referred to as L-order maps, where the features in each map share spatial indices. 1 or L2 Typically, feature maps are compared using a norm. Here, we avoid this approach and do not limit the comparison of feature maps to spatially related features. Instead, we compare feature maps using a statistical distance (either a contextual loss or an adversarial loss), which is a more general loss that takes into account intra- and inter-image distributions.
[0330] In this way, in contrast to existing compression literature, we aim to capture the shared semantic similarities between images. We have observed that this approach strongly improves the perceived visual quality of the reconstructed images.
[0331] Traditional image metrics used in image and video compression (e.g., MSE, PSNR) compare ground truth and reconstructions pixel-by-pixel in image space. Pixel-by-pixel comparisons assume that the images are aligned and that the same regions in both images occupy the same semantic features. These metrics are sensitive to image transformations such as rotation, shift, and color shift. However, the human visual system (HVS) is generally insensitive to such distortions. Therefore, pixel-by-pixel metrics in image space correlate poorly with HVS.
[0332] To solve this problem, we exploit statistical distances between image representations in a latent feature space. The statistical distances we exploit are context loss and adversarial loss, both of which are derived from statistical deviations between probability distributions. Images are represented in different latent spaces obtained from both supervised and unsupervised machine learning techniques. With this approach, we aim to align more closely with HVS.
[0333] Our experiments demonstrate that introducing statistical distance into the latent space significantly improves the perceptual quality of the reconstructed images when used for image and video compression.
[0334] 4.2 Example Method In this section, we discuss two important aspects of reconstruction quality metrics: latent feature space and statistical distance.
[0335] 4.2.1 Latent Space and Deep Features Traditionally, image and video compression metrics compare images in image space. Recent work [3] suggests that pre-trained artificial neural networks (ANNs) can be used to map images into a latent feature space, generating more sophisticated features suitable for comparison.
[0336] First, consider the (generative) autoencoder compression framework. Here, we define this as a function f θ It is expressed as (x)=y, where x is the input image, y is the reconstructed image, and θ is the parameter of the autoencoder.
[0337] To compute the distortion between x and its compressed reconstructed image y, one promising solution is to use the internal activations of ANNs trained for other learning tasks (e.g., image classification) as feature embeddings (instead of, or as well as, images) [3]. Given the inherently differentiable nature of ANNs, we then differentiate this distance and use the resulting gradient to compute f θ The parameters of can be updated using gradient-based optimization.
[0338] Here, an input image x and its compressed reconstructed image y are fed to an ANN model g with fixed parameters Φ, pre-trained for classification on ImageNet (or other suitable tasks). Φ (such as a VGG network or other deep pre-trained network) independently. The model's inner activation layer (hereafter referred to as feature maps or feature embeddings) is extracted and used as a means of comparison. Φ When consists of many layers, these features are called deep features.
[0339] More formally, the training of a compressive autoencoder is done as follows: x and y are trained by an ANN g Φ to generate latent space features.
number
[0340] NOTE: x(tilde) and y(tilde) can contain features from multiple different layers, whose activation channels are used in the ANN g Φ Therefore, x and y are the network g used for feature embedding. Φ can be thought of as all outputs of Example 1: x (tilde) can contain only activations from the 5th max pooling layer onwards in VGG16. Example 2: x (tilde) can include all activations after the second and third VGG16 blocks.
[0341] There are several aspects of this approach that are worth tuning for optimal compression efficiency. These are listed below: Characteristics of early and late layers As already mentioned, instead of just comparing feature maps from a specific layer of the ANN, multiple layers can be considered. This makes the comparison more holistic and takes into account both low-level and high-level features. Different approaches to comparing multiple layers will be discussed separately for the two statistical distances considered here. Feature type Typically, the features are obtained from layers of a differentiable supervised model, such as a VGG network trained for classification of a dataset (e.g., ImageNet). However, we are not limited to supervised approaches; unsupervised methods can also be used. For example, the latent representations can be obtained from the encoder part of a Variational Auto-Encoder (VAE) [4] trained on another dataset. Another possibility is to obtain them from the encoder part of another trained compression pipeline.
[0342] 4.2.2 Statistical loss So far, we have described how to derive feature embeddings from latent space. The distance between these embeddings is typically measured in Euclidean space and averaged over all features. For example, pixel-wise losses such as mean squared error (MSE) or peak signal-to-noise ratio (PSNR) can be used to quantify measures of perceptual distortion. However, this is known to have poor correlation with the human visual system (HVS). In practice, what we want is a differentiable measure of reconstruction quality that correlates perfectly or very well with the perceived visual quality of the HVS.
[0343] Below, we will explain two statistical distances used in feature embedding using examples.
[0344] Context Loss Overall overview Here, we adopt the approach detailed in [5] and apply it to learning-based image compression. In contrast to the approach detailed in [3], this method seeks to preserve natural image statistics and is therefore not strictly required to preserve spatial location. In this way, we are able to avoid the distortion-perceptual trade-off and produce visually pleasing reconstructions, as discussed in [6].
[0345] For context loss, split the feature embeddings x(tilde) and y(tilde) into feature vectors of equal length. Enumerate these feature vectors from 1 to N:
number
number
[0346] The context similarity measure is then defined as follows:
number
number
[0347] Definition of Similarity Similarity c i,j To define, we consider the normalized distance between feature embeddings.
number
number
number
[0348] Figure 9 shows an example pair of input and compressed images by a generative autoencoder trained using (4.5) with a mean squared error (MSE) of approximately 20%. Note that it may be desirable to add MSE to (4.5) to effectively balance the distortion-perceptual tradeoff.
[0349] Training Algorithm A pseudocode example of one training step of the compression pipeline with context loss is outlined in Algorithm 4.1.
[0350] Algorithm 4.1: Generator f with context loss θ Example pseudocode outlining one training step of the (i.e., compression pipeline). Assumes the existence of four functions: partition, dist, back propagate, and step. The partition function splits the input feature embeddings into equal-sized feature vectors (this can be done in a variety of ways). dist is the distance metric between feature vectors (e.g., cosine or L 2 distance). backpropagate uses backpropagation to compute the gradients of all parameters with respect to the loss. Note: From the pseudocode below, g Φ It can be seen that the parameters Φ in do not change since there is no optimizer for these parameters. input: Input image: x Generator (compression) network: f θ Generator optimizer:opt fθ Feature embedding network:g Φ Generator additional loss:
number
number
number
[0351] Interpretation as a statistical loss This loss is, according to [7], the feature X(tilde) = {x i (tilde)} and Y(tilde)={y i (tilde)}, we call it a statistical loss because it is a special case of the Kullback-Leibler divergence (KL-divergence) between finite sets of x1(tilde), x2(tilde),..., x N (tilde) are distinct samples from a particular random variable, y1(tilde), y2(tilde)..., y N (tilde) are different random samples from another random variable. We minimize the KL-divergence between the distributions of these two random variables by minimizing the context loss between two feature embeddings x(tilde) and y(tilde). Samples x1(tilde), x2(tilde),..., x N (tilde) and y1(tilde),y2(tilde)...,y N Since the (tilde) is derived from two images, this is called intra-image statistical loss.
[0352] Commutative Context Loss To make the reconstruction y as close as possible to the ground truth image x, we typically maximize the context similarity C(X(tilde),Y(tilde)). However, the context similarity function is not commutative (i.e., C(Y(tilde),X(tilde)) ≠ C(X(tilde),Y(tilde))). This can be observed either from its definition ((4.5)) or from the fact that the KL-divergence is not commutative.
[0353] For this reason, instead of maximizing only C(X(tilde),Y(tilde)), we present a new optimization objective that maximizes a linear combination of both similarities as an example:
number
[0354] Hostile losses Overall overview The adversarial loss approach to feature embedding uses a discriminator (aka critic) network h ψ which utilizes an encoder-decoder network f θ The output of the classifier network,h,(x),is a number in the interval [0,1] that specifies the probability that the input,x,comes from the distribution of the actual image (i.e., the ground truth one,compared to the reconstructed one).,This approach was first introduced in [8] for generative adversarial networks (GANs),,but here we use it to embed features in trained image and video,compression.
[0355] The min-max optimization of the parameter θ is as follows:
number
number
[0356] Other loss functions V(.,.) can be used to minimize other types of divergence between these distributions. We are not limited to a specific loss function. In practice, we usually use a modified (or unsaturated) loss, while still maintaining the internal maximization of the classifier parameters:
number
number
[0357] Figures 10 and 11 show two examples of reconstructions when trained with the adversarial loss (equation (4.11)) on VGG features (the adversarial loss is added to the MSE and other internal and external losses in the examples).
[0358] Training Algorithm Compression pipeline f with adversarial loss θ and the discriminator h ψ A pseudocode example of one training step of is outlined in Algorithm 4.2.
[0359] Algorithm 4.2: Generator f with adversarial loss θ (compression pipeline) and discriminator h ψ Example pseudocode outlining one training step of . The existence of three functions is assumed: backpropagate, step, and nogradients. backpropagate uses backpropagation to compute gradients of all parameters with respect to the loss. step runs an optimization step with the selected optimizer. The nogradients function ensures that gradients are not tracked for the function run. The nogradients function refers to how deep learning frameworks such as PyTorch and Tensorflow V2 construct the computation graph used for the backpropagation operation. That is, whether or not gradients are applied to generate y is determined by f θaffects whether f is included in the computation graph and therefore whether gradients flow through the generator component. Therefore, in the backpropagation and optimizer update steps, θ When generating y from , it is important to have a gradient or not. Note: From the pseudocode below, g Φ We can see that the parameters Φ of are not changed because there is no optimizer for these parameters. Also, in the generator training step, the discriminator h ψ The parameter ψ of is similarly left unchanged. input: Input image: x Generator (compression) network: f θ Generator optimizer:opt fθ Classifier network: h ψ Classifier optimizer: opt hψ Feature Embedding Network:G Φ Classification loss of the classifier (for real images):
number
number
number
number
number
number
number
[0360] Interpretation as a statistical loss As already shown, a particular loss function V(.,.) is given by the distribution P x(チルダ) and P y(チルダ) This leads to minimizing a certain type of divergence between the features. The original in [8] corresponds to minimizing the Jensen-Shannon divergence. This explains why the adversarial loss component on feature embeddings is another type of statistical loss.
[0361] In contrast to contextual loss, the distributions matched here are across feature embeddings x(tilde) and y(tilde), such that one sample from those distributions corresponds to one image. Hence, this statistical loss is called inter-image statistical loss.
[0362] Note: To derive the adversarial intra-image statistical loss, we compute the same image (i.e., X(tilde) = {x1(tilde), x2(tilde), ..., x N I would also like to mention the possibility of running adversarial losses applied to individual features of the {(coming from tilde)}. In this scenario, we train one classifier per image and use the feature embeddings x1(tilde), x2(tilde),..., x N (tilde) real part and false parts y1(tilde), y2(tilde),...,y N Identify (tilde).
[0363] Different classifier architectures (for features from multiple layers) Here we present examples of classifier architectures for use with adversarial losses for feature embedding. We present three architectures, but are not limited to using only these architectures.
[0364] Architecture 1 (1-layer feature): x (tilde) and y (tilde) are 1-layer g Φ If the input tensor consists only of activations, these two feature embeddings are tensors of dimensions (C, H, W) corresponding to the number of channels, height, and width of the feature map. Even if x(tilde) and y(tilde) are composed of multiple layers of the same size (i.e., (H, W)), features from different layers can be concatenated along the channel dimension to produce a single (combined) tensor of size (C1 + C2..., H, W). Given a single input tensor, the classifier architecture can be any neural network (e.g., CNN or fully connected NN) that respects this input size. Figure 12 shows an example of the described architecture.
[0365] Architecture 2 (Multi-layer feature fusion): As mentioned above, the network g Φ We can consider a discriminative feature embedding consisting of activations from multiple layers of tensor dimensions: x(tilde) = (x1(tilde), x2(tilde), ..., x K (tilde)), wherein
number
[0366] Here, we present a classifier convolutional neural network (CNN) architecture that performs a stepwise fusion of these features. This approach is similar to how the U-Net architecture performs decoding [9], with the important difference that this type of feature fusion is applied in the feature embedding classifier. To our knowledge, this is the first time this approach has been used in the context of image and video compression.
[0367] More formally, a classifier h is a subset of several sub-networks
number
number
number
number
[0368] Architecture 3 (Multi-layer features: distinct classifiers): Here, as in Architecture 2, we have several layers of g with different dimensional feature embeddings, i.e., x(tilde) = (x1(tilde), x2(tilde), ..., x K Consider again that the expression is composed of features from (tilde)), where:
number
number
number
[0369] Alternatively, we can compute the adversarial loss for all K classifiers and combine these losses (e.g., in a linear combination) into an overall adversarial loss.
[0370] 4.2.3 Combination with other losses We do not limit our deep feature statistical losses (i.e., contextual and adversarial losses) to combining them with MSE. In fact, these losses, as well as losses found in the broader community, can be used in combination with a variety of other objectives. Such losses include (but are not limited to): Deep Render's adversarial Video Multimethod Assessment Fusion (VMAF) proxy, Learned Perceptual Image Patch Similarity (LPIPS) [1], and generative adversarial losses (GAN-based losses) (e.g.,
[10] ).
[0371] You are also not limited to using only one instance of a statistical loss. For example, you could train with two context losses applied to different feature embeddings and two adversarial losses applied to two other feature embeddings. These four statistical losses can be used in addition to the other losses.
[0372] 4.2.4 Purpose of using statistical loss for feature embedding In addition to other types of losses, the objective of training with statistical losses for feature embedding is to train an encoder-decoder network f θ Optimize the weight θ of f θ The goal is to reconstruct an image that is perceptually closer to the ground truth image. In this way, statistical losses represent image (or image distribution) metrics that serve as proxies for HVS metrics. Both intra-image and inter-image statistical losses (e.g., context loss and adversarial loss) can be used to achieve this goal.
[0373] 4.3. References [3]Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. [4]Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [5]Roey Mechrez, Itamar Talmi, and Lihi Zelnik-Manor. The contextual loss for image transformation with non-aligned data. In Proceedings of the European Conference on Computer Vision (ECCV), pages 768 - 783, 2018. [6]Yochai Blau and Tomer Michaeli. The perception-distortion tradeoff. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. [7]Roey Mechrez, Itamar Talmi, Firas Shama, and Lihi Zelnik-Manor. Maintaining natural image statistics with the contextual loss. In Asian Conference on Computer Vision, pages 427 - 443. Springer, 2018. [8]Ian Goodfellow,Jean Pouget-Abadie,Mehdi Mirza,Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville,and Yoshua Bengio.Generative adversarial nets.Advances in neural information processing systems,27,2014. [9]Olaf Ronneberger,Philipp Fischer,and Thomas Brox.U-net:Convolutional networks for biomedical image segmentation.In International Conference on Medical Image Computing and Computer-assisted Intervention,pages 234-241.Springer,2015.
[10] Eirikur Agustsson,Michael Tschannen,Fabian Mentzer,Radu Timofte,and Luc Van Gool.Generative adversarial networks for extreme learned image compression.In Proceedings of the IEEE International Conference on Computer Vision,pages 221-231,2019.
Claims
1. 1. A computer-implemented method for lossy or lossless image or video compression and transmission, said method comprising: (i) receiving an input image; (ii) encoding the input image using an encoder-trained neural network to generate a latent representation of y; (iii) encoding the y latent representation using a hyper-encoder trained neural network to generate z hyper-latent representations; (iv) quantizing the z hyper-latent representation using a predefined entropy parameter to generate a quantized z hyper-latent representation; (v) entropy encoding the quantized z hyper-latent representation into a first bitstream using a predefined entropy parameter; (vi) processing the quantized Z hyper-latent representation using a hyper-decoder trained neural network to obtain a location entropy parameter μ of the y latent representation; y , the entropy scale parameter σ y , and the context matrix A y and obtaining (vii) using an implicit coding solver to solve the latent representation of y, the location entropy parameter μ y , and the context matrix A y to obtain a quantized latent residual; (viii) the entropy scale parameter σ y entropy encoding the quantized latent residual into a second bitstream using (ix) transmitting the first bitstream and the second bitstream.
2. said implicit coding solver solving an implicit equation; (I) the quantized latent residual is the sum of the y latent representations −μ y - A, which operates on the quantized y latent representation y is equal to the quantization function of (II) the quantized y latent representation is the quantized latent residual + μ y + A, which operates on the quantized y latent representation y The method of claim 1 , wherein the Δt is equal to
3. The implicit coding solver solves the implicit equations by defining B=I-A, where A is an m-by-m matrix and I is the m-by-m identity matrix, where (a) if B is lower triangular then the iterative forward substitution is used, or (b) if B is upper triangular then the successive backsubstitution is used, or (c) B is factored as a triangular decomposition then B * y=μ+ξ(hut), where ξ(hut) is the quantized residual and is solved by inverting the lower triangular factors by forward substitution and inverting the upper triangular factors by backward substitution; or (d) B is factorized with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=LR -1 Q t μ, Qt is Q-transposed, or B is factored using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, and Q is inverted by its transpose, R is inverted by backsubstitution, and L is inverted by forward substitution, respectively, and the solution is y=L -1 Q t μ, or y=Q t R -1 μ, or y=Q t L -1 3. The method of claim 1 or 2, wherein B=D+L+U, where D is a diagonal matrix, L is strictly lower triangular, and U is strictly upper triangular, and the iterative Jacobi method is applied until a convergence criterion is met, or (f) the Gauss-Seidel method is used, or (g) the iterative accelerated relaxation method is used, or (h) the conjugate gradient method is used.
4. The method of any one of claims 1 to 3, wherein the implicit coding solver solves the implicit equations using an iterative solver whose iterations terminate when a convergence criterion is met.
5. The method of any one of claims 1 to 4, wherein the implicit coding solver returns a residual and a quantized latent representation y.
6. 6. The method of claim 1, wherein the matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse banded structure, or A is a block matrix, or A is constructed such that its matrix norm is less than 1, or A is parameterized via a matrix decomposition, such as an LU or QR decomposition.
7. 1. An encoding computer system for lossy or lossless image or video compression and transmission, the encoding computer system comprising an encoding computer, an encoder trained neural network, a hyper-encoder trained neural network, and a hyper-decoder trained neural network; (i) the encoding computer is configured to receive an input image; (ii) the encoding computer is configured to encode the input image using the encoder trained neural network to generate y latent representations; (iii) the encoding computer is configured to encode the y latent representation using a hyper-encoder trained neural network to generate the z hyper-latent representation; (iv) the encoding computer is configured to quantize the z hyper-latent representation using a predetermined entropy parameter to generate a quantized z hyper-latent representation; (v) the encoding computer is configured to entropy encode the quantized z hyper-latent representation into a first bitstream using a predetermined entropy parameter; (vi) the encoding computer processes the quantized Z hyper-latent representation with the hyper-decoder trained neural network to obtain a location entropy parameter μ y , the entropy scale parameter σy, and the context matrix A of the y latent representation y configured to obtain (vii) the encoding computer uses an implicit encoding solver to compute the y latent representation, the location entropy parameter μy, and the context matrix A y to obtain a quantized latent residual; (viii) the encoding computer determines the entropy scale parameter σ y and configured to entropy code the quantized latent residual into a second bitstream using (ix) the encoding computer is configured to transmit the first bitstream and the second bitstream.
8. 1. A computer-implemented method for lossy or lossless image or video decoding, said method comprising: (i) receiving a first bitstream and a second bitstream; (ii) decoding the first bitstream using an arithmetic decoder with a predefined entropy parameter to generate a quantized z hyper-latent representation; (iii) Using a hyper-decoder trained neural network, decode the quantized z hyper-latent representation to obtain a location entropy parameter μ y , the entropy scale parameter σ y , and the context matrix A of the y latent representation y and obtaining (iv) in an arithmetic decoder, the entropy scale parameter σ y decoding the second bitstream using (v) the quantized latent residual, the location entropy parameter μ y , and the context matrix A y with an implicit decoding solver to obtain a quantized y latent representation; (vi) decoding the quantized y latent representation using a decoder-trained neural network to obtain a reconstructed image.
9. The implicit decoding solver calculates that the quantized y latent representation is the quantized latent residual + μ y + A, which operates on the quantized y latent representation y 9. The method of claim 8, further comprising solving an implicit equation equal to:
10. The implicit decoding solver solves an implicit equation by defining B=I-A, where A is an m-by-m matrix and I is the m-by-m identity matrix, where (a) if B is lower triangular, then the sequential forward substitution is used, or (b) if B is upper triangular, then the sequential backsubstitution is used, or (c) B is factored as a triangular decomposition and then B * y=μ+ξ(hut), where ξ(hut) is the quantized residual and is solved by inverting the lower triangular factors by forward substitution and inverting the upper triangular factors by backward substitution; or (d) B is factorized with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=LR -1 Q t μ, Qt is Q-transposed, or B is factored using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, and Q is inverted by its transpose, R is inverted by backsubstitution, and L is inverted by forward substitution, respectively, and the solution is y=L -1 Q t μ, or y=Q t R -1 μ, or y=Q t L -1 10. The method of claim 8 or 9, wherein B=D+L+U, where D is a diagonal matrix, L is strictly lower triangular, and U is strictly upper triangular, and the iterative Jacobi method is applied until a convergence criterion is met, or (f) the Gauss-Seidel method is used, or (g) the iterative accelerated relaxation method is used, or (h) the conjugate gradient method is used.
11. The method according to any one of claims 8 to 10, wherein the iterations are terminated when the iterative solver reaches a convergence criterion.
12. The method according to any one of claims 8 to 11, wherein the implicit decoding solver is not of the same type as the solver used in encoding.
13. 13. The method of any one of claims 8 to 12, wherein the matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse banded structure, or A is a block matrix, or A is constructed such that its matrix norm is less than 1, or A is parameterized via a matrix decomposition, such as an LU or QR decomposition.
14. 1. A decoding computer system for lossy or lossless image or video decoding, the decoding computer system comprising a decoding computer, a decoder trained neural network, and a hyperdecoder trained neural network; (i) the decoding computer is configured to receive a first bitstream and a second bitstream; (ii) the decoding computer is configured to decode the first bitstream using an arithmetic decoder to generate a quantized z hyper-latent representation, using a predetermined entropy parameter; (iii) the decoding computer decodes the quantized z hyper-latent representation using the hyper-decoder trained neural network to obtain a location entropy parameter μ y , the entropy scale parameter σ y , and y latent representation context matrix A y configured to obtain (iv) the decoding computer determines the entropy scale parameter σ in an arithmetic decoder. y to output a quantized latent residual; (v) the decoding computer uses a (e.g., implicit) (e.g., linear) decoding solver to solve the quantized latent residual, the location entropy parameter μ y and the context matrix A y to obtain a quantized y latent representation; (vi) the decoding computer is configured to decode the quantized Y latent representation with the decoding training neural network to obtain a reconstructed image.
15. A computer-implemented method for lossy or lossless image or video compression and transmission, and lossy or lossless image or video decoding, said method comprising the method of any one of claims 1 to 6 or any one of claims 8 to 13.
16. A system for lossy or lossless image or video compression and transmission and lossy or lossless image or video decoding, said system comprising the system of claim 7 or the system of claim 14.
17. 1. A computer-implemented method for training an encoder neural network, a decoder neural network, a hyper-encoder neural network, and a hyper-decoder neural network, and an entropy parameter, the neural network, and the entropy parameter, for use in lossless image or video compression, transmission, and decoding, the method comprising: (i) receiving input training images; (ii) encoding the input training images using the encoder neural network to generate y latent representations; (iii) encoding the y latent representation using the hyper-encoder neural network to generate a z hyper-latent representation; (iv) quantizing the z hyper-latent representation using one of the entropy parameters to generate a quantized z hyper-latent representation; (v) entropy encoding the quantized z hyper-latent representation into a first bitstream using the entropy parameter; (vi) processing the quantized z hyper-latent representation with the hyper-decoder neural network to obtain a location entropy parameter μ of the y latent representation. y , the entropy scale parameter σ y , and the context matrix A y and obtaining (vii) using an implicit coding solver to solve the latent representation of y, the location entropy parameter μ y and the context matrix A y to obtain a quantized latent residual; (viii) the entropy scale parameter σ y entropy encoding the quantized latent residual into a second bitstream using (ix) decoding the first bitstream using an arithmetic decoder to generate a quantized z hyper-latent representation using the entropy parameters; (x) using the hyper-decoder neural network to decode the quantized z hyper-latent representation to obtain a location entropy parameter μ of the y latent representation; y , the entropy scale parameter σ y , and the context matrix A y and obtaining (xi) in an arithmetic decoder, the entropy scale parameter σ y to obtain an output of a quantized latent residual; (xii) solving the quantized latent residual, the location entropy parameter μ using a (e.g., implicit) (e.g., linear) decoding solver; y , and the context matrix A y to obtain a quantized y latent representation; (xiii) decoding the quantized y latent representation using the decoder neural network to obtain a reconstructed image; (xiv) evaluating a loss function based on differences between the reconstructed images and the input training images and a rate term; (xv) evaluating the gradient of the loss function; (xvi) backpropagating the gradient of the loss function through the decoder neural network, through the hyper-decoder neural network, through the hyper-encoder neural network, through the encoder neural network, and updating weights of the encoder, decoder, hyper-encoder, and hyper-decoder using the entropy parameter, and updating the entropy parameter; (xvii) repeating steps (i)-(xvi) with a set of training images to generate a trained encoder neural network, a trained decoder neural network, a trained hyper-encoder neural network, and a trained hyper-decoder neural network, and a trained entropy parameter; (xviii) storing the weights of the trained encoder neural network, the trained decoder neural network, the trained hyper-encoder neural network and the trained hyper-decoder neural network, and storing the trained entropy parameter.
18. The method of claim 17 , wherein the quantized y latent representation returned by the solver is used elsewhere in a data compression pipeline.
