Deep neural network compression based on low shift rank
By adopting the low-shift rank approximation method in DNN, the layer weight matrix of DNN is approximated as a structured matrix sum, which solves the problem of high inference complexity of DNN in resource-limited devices and achieves high efficiency in mobile or embedded devices. Deep learning compression and decoding.
Patent Information
- Application Number
- CN202080021701.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-15
- Filing Date
- 2020-03-13
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-03-13
AI Technical Summary
The high inference complexity of existing technologies in mobile or embedded devices due to the large number of parameters of deep neural networks (DNN) limits their application in resource-limited devices.
An approximation method based on Low Displacement Rank (LDR) is used to compress the pre-trained DNN. The layer weight matrix is approximated as the sum of a small number of structured matrices. A quantized and entropy-encoded bit stream is generated through an iterative update process, which can be implemented on devices with limited resources. deep learning in .
It realizes compression and decoding of deep learning in devices with limited resources, reduces inference complexity and storage requirements, and improves computing efficiency.
Smart Images

Figure CN113574887B_ABST
Abstract
Description
Technical Field
[0001] At least one embodiment of the present invention generally relates to a method or apparatus for video encoding or decoding. Background Art
[0002] In order to achieve high compression efficiency, image and video decoding schemes usually use prediction (including spatial and / or motion vector prediction), as well as transformation to exploit spatial and temporal redundancy in video content. Typically, intra-frame or inter-frame prediction is used to exploit intra-frame or inter-frame correlation, and then the difference between the original image and the predicted image (usually expressed as a prediction error or prediction residual) is transformed, quantized, and entropy decoded. In order to reconstruct the video, the compressed data is decoded by the inverse process corresponding to entropy coding, quantization, transformation, and prediction. Mapping and inverse mapping processes can be used in encoders and decoders to achieve improved decoding performance. In fact, for better decoding efficiency, signal mapping can be used. Mapping aims to better utilize the distribution of sample codeword values of video pictures. Summary of the invention
[0003] The shortcomings and deficiencies of the prior art may be addressed by the general aspects described herein, which relate to intra-prediction mode partitioning in encoding and decoding.
[0004] According to a first aspect, a method is provided. The method comprises the following steps: obtaining information representing weights, biases and nonlinearities of a deep neural network and an approximate training set for the deep neural network; using the information and the approximate training set to generate an output matrix of information of a layer of the deep neural network; and updating the output matrix for an additional layer by iteratively using the output matrix of a previous layer of the deep neural network and the approximate training set until a minimization criterion for the layer has been met and until the last layer is reached to generate coefficients representing the output matrix; and performing quantization and entropy decoding on the coefficients.
[0005] According to a second aspect, a method is provided. The method comprises the following steps: performing entropy decoding on data from a bitstream; performing inverse quantization on the entropy decoded data; and iteratively obtaining a dequantization matrix representing a deep neural network and constructing a weight matrix until a last layer is reached.
[0006] According to another aspect, an apparatus is provided. The apparatus includes a processor. The processor can be configured to compress and decompress a deep neural network by performing any of the above methods.
[0007] According to another general aspect of at least one embodiment, there is provided an apparatus comprising an apparatus according to any of the decoding embodiments; and at least one of: (i) an antenna configured to receive a signal comprising a video block, (ii) a band limiter configured to limit the received signal to a frequency band comprising the video block, or (iii) a display configured to display an output representing the video block.
[0008] According to another general aspect of at least one embodiment, a non-transitory computer-readable medium is provided that contains data content generated according to any of the described encoding embodiments or variations.
[0009] According to another general aspect of at least one embodiment, there is provided a signal comprising video data generated according to any of the described encoding embodiments or variations.
[0010] According to another general aspect of at least one embodiment, a bitstream is formatted to include data content generated according to any of the described encoding embodiments or variations.
[0011] According to another general aspect of at least one embodiment, there is provided a computer program product comprising instructions which, when implemented by a computer, cause the computer to perform any of the described decoding embodiments or variations.
[0012] These and other aspects, features and advantages of the general aspects will become apparent from the following detailed description of illustrative embodiments, which is to be read in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A pipeline for low displacement rank based neural network compression under the general aspects described is shown.
[0014] Figure 2 A low displacement rank approximation under the general aspects described is shown.
[0015] Figure 3 A flow chart for determining a low displacement rank approximation layer under the described general aspects is shown.
[0016] Figure 4 An example of a flow chart of a training / update loop for low-shift rank approximation estimation under the general aspects described is shown.
[0017] Figure 5 An example of a decoding process under the general aspects described is shown.
[0018] Figure 6 An embodiment of an encoding method according to the described general aspects is shown.
[0019] Figure 7 An embodiment of a decoding method according to the described general aspects is shown.
[0020] Figure 8 One embodiment of an apparatus for encoding or decoding using intra-prediction mode extension is shown.
[0021] Fig. 9 A general standard encoding scheme is shown.
[0022] Fig.10 A general standard decoding scheme is shown.
[0023] Fig.11 A typical processor arrangement is shown in which the described embodiments may be implemented. DETAILED DESCRIPTION
[0024] Deep neural networks (DNNs) have demonstrated state-of-the-art performance in a variety of areas such as computer vision, speech recognition, natural language processing, etc. However, this performance comes at a significant computational cost, as DNNs tend to have a large number of parameters, often in the millions, or sometimes even billions. This results in prohibitively high inference complexity—the computational cost of applying a trained DNN to test data for inference. This high inference complexity is a major challenge in bringing the performance of DNNs to mobile or embedded devices, which have resource constraints in terms of battery size, computational power, and memory capacity.
[0025] The present invention is applicable to compressing a pre-trained DNN so that it is convenient for transmission and / or storage and has low inference complexity. We propose to compress the pre-trained DNN through a low displacement rank (LDR) based approximation of the network layer weight matrices. The LDR approximation allows the original layer weight matrices of the pre-trained DNN to be replaced by the sum of a small number of structured matrices. This decomposition of the sum of structured matrices leads to simultaneous compression and low inference complexity, thereby enabling deep learning in resource-limited devices.
[0026] Most methods for DNN compression are based on the assumption of sparsity or on low-rank approximation. Although these methods lead to compression, they still suffer from high inference complexity. Sparse structures are difficult to implement in hardware because performance depends heavily on the pattern of sparsity and existing methods do not have any control over the sparsity pattern. Low-rank matrices are still unstructured. For these reasons, these methods do not necessarily lead to an increase in inference complexity. The LDR-based approximation proposed in the present invention approximates a given layer weight matrix as the sum of a small number of structured matrices, which allows simultaneous compression and low inference complexity.
[0027] Assume that we are provided with a weight matrix {W1, ..., W L}, deviation {W1, ..., W L} and nonlinear {g1, ..., g L Using these weights, biases, and nonlinearities, the output y of the kth layer is k+1 is written as follows (where y 1 = x is the input of DNN):
[0028] y k+1 =g k (W k y k +b k )
[0029] We propose to use the LDR matrix {W1, ..., W L} to approximate the pre-trained DNN {W1, ..., W L} layer. Assume that the weight matrix of the kth layer is With low rank r k <<min{m,n}, then this means
[0030]
[0031] Among them, A and B are square matrices of size m×m and n×n respectively, and G k is m×r k Matrix, H k is n×r k Matrix, and m, n are the original weight matrices W k The number of rows and columns of G and H. For example, the columns of G and H can represent some kind of filter. And depending on A and B, they can interact end-to-end in different ways.
[0032] Here, the displacement r k is the parameter of choice. k This means greater compression and computational efficiency. Alternatively, the LDR can be found by the following equivalent but alternative expression:
[0033]
[0034] By different choices of A and B, the LDR structure is general enough that it covers a large number of other structures such as Toeplitz, Circulant, Hankel, etc. For the purpose of describing the present invention, we will use the first expression for the displacement rank. In order to obtain this approximation, the proposed method requires an approximate training set x = {x1, ..., x T}, the approximate training set x can be selected as a subset of the original training set used to train a given DNN, or it can be selected as a set of examples of the DNN that is assumed to operate on it. Using the approximate training set x, we can obtain the output and input of each layer of the original pre-trained DNN. The approximate set x for a given example x t The input and output of the kth layer are expressed as and Using these, we solve the following optimization problem to obtain G k , H k :
[0035]
[0036] The above problem can be approximately solved by using the stochastic gradient descent algorithm. The terms in the sum are minimized. The equality constraints in the above problem can be handled using the inversion formula from Pan and Wang's "Inversion of Displacement Operators". Figure 1 An exemplary overall architecture for compressing a neural network is shown. Figure 1 The DNN training phase is shown, which involves training the DNN on given training data. The next box takes the weight matrix {W1, ..., W L}, deviation {b1, ..., b L} and nonlinear {g1, ..., g L} represents a pre-trained DNN as input, and the approximate training set x = {x1, ..., x T} can work with an approximated training set independent of said training set. The first sub-step in the LDR-based compression block is the LDR-based approximation, which is the object of the present invention.
[0037] After that, the weight matrix G of each layer based on LDR approximation is k and H k is quantized, and this is followed by lossless coefficient compression for each layer.
[0038] This results in a bit stream that can be stored or transmitted. The resulting bit stream is related to the matrix A, B, the bias vector {b1, ..., b L The compressed bitstream is decompressed using the metadata and the DNN is loaded into memory for inference on test data for the upcoming application.
[0039] Encoder
[0040] Figure 2 Shown in detail Figure 1The LDR-based approximation sub-block in . Figure 2 As shown, using the approximate training set χ = {x1, ..., x T}, the LDR approximation for each layer can be obtained in parallel.
[0041] Figure 3 The LDR approximation of a pre-trained DNN at the encoder is described in . Using the approximated training set χ, we can obtain the output and input of each layer of the original pre-trained DNN. The approximation set χ for a given example x t The input and output of the kth layer are expressed as and In step 101, each layer is visited, possibly in parallel depending on computer resources, looping from step 104 until the last layer is processed. Gk and Hk are calculated per layer in steps 102 and 103.
[0042] Step 103 Figure 4 As further described in , for each layer, the approximation set can be split into batches, and a number of iterations or epochs (204) can be performed on the set. For each iteration, the current batch of input / output data for the layer is accessed (201), the image is minimized on the data set (1) (202), and the matrix G is updated. k and H k (203).
[0043] The termination criterion (204) can be based on the number of training steps (in terminology, the number of rounds), or if the matrix G in consecutive training steps k and H k are numerically close to each other, with a chosen proximity parameter, then for all k output matrices G k and H k .
[0044] This parallel version allows G k and H k The modification of the matrix then takes into account efficient computation at the expense of unupdated inputs to subsequent layers. The parallel version processes the inputs and outputs of each layer in the original network, which are obtained once at the beginning, and they are used to update the layers in parallel. In this specification, the serial version is mentioned later as a variant. As a variant, the output of each layer k can be updated using training data so that the LDR calculation of layer k+1 can be performed using appropriate inputs.
[0045] Decoder
[0046] In order to decode the resulting bitstream, a compliant decoder needs to perform the inverse compression step. Figure 5The different steps are shown in detail. The symbols of the input bitstream are first extracted from the entropy decoding engine 301 and then inverse quantized (302). For each layer (305), the dequantized matrix is accessed (303) and the previously mentioned inverse formula is used to obtain G k and H k Export each matrix
[0047] Therefore, decoders that implement standard compression schemes (such as the future MPEG NNR standard) will need to include the proposed method in order to decode and obtain the reconstructed DNN.
[0048] In one variation, using one of the frameworks above, a different A and B can be used for each layer. This will change the metadata that needs to be sent from the encoder. The decoder will use the specific A and B for that layer when decoding each layer.
[0049] In a second variation, the LDR approximation can also be done in a serial manner, where the next layer is approximated by taking into account the approximations in the previous layers.
[0050] Figure 6 One embodiment of a method 600 using the general aspects described herein is shown. The method begins at a start block 601, and control proceeds to a function block 610 for obtaining information representing weights, biases, and nonlinearities of a deep neural network and an approximate training set for the deep neural network. Control then proceeds from block 610 to block 620 for generating an output matrix of information for a layer of the deep neural network using the information and the approximate training set. Control then proceeds from block 620 to block 630 to update the output matrix for an additional layer by iteratively using the output matrix of a previous layer of the deep neural network and the approximate training set until a minimization criterion for the layer has been met, and until the last layer is reached to generate coefficients representing the output matrix. Control then proceeds from block 630 to block 640 for performing quantization and entropy decoding on the coefficients.
[0051] Figure 7 One embodiment of a method 700 using the general aspects described herein is shown. The method begins at a start block 701 and control proceeds to a function block 710 for performing entropy decoding on data from a bitstream. Control then proceeds from block 710 to block 720 for performing inverse quantization on the entropy decoded data. Control then proceeds from block 720 to block 730 for iteratively obtaining a dequantized matrix representing a deep neural network and constructing a weight matrix until the last layer is reached.
[0052] Figure 8One embodiment of an apparatus 800 for compressing, encoding or decoding a deep neural network in a bitstream is shown. The apparatus includes a processor 810 and may be interconnected to a memory 820 via at least one port. Both the processor 810 and the memory 820 may also have one or more additional interconnections to external connections.
[0053] Processor 810 is also configured to insert or receive parameters in the bitstream and use the parameters to compress, encode or decode the deep neural network.
[0054] The present application describes a number of aspects, including tools, features, embodiments, models, methods, etc. Many of these aspects are described as having specificity, and at least in order to illustrate individual characteristics, are usually described in a manner that may sound limited. However, this is for the purpose of describing clearly, and does not limit the application or scope of those aspects. In fact, all different aspects can be combined and interchanged to provide other aspects. In addition, these aspects can also be combined and interchanged with the aspects described in earlier documents.
[0055] The aspects described and contemplated in this application can be implemented in many different forms. Fig. 9 , 10 1 and 11 provide some embodiments, but other embodiments are contemplated and are Fig. 9 , 10 The discussion of 11 does not limit the breadth of implementation. At least one aspect generally relates to video encoding and decoding, and at least one other aspect generally relates to transmitting a generated or encoded bitstream. These and other aspects can be implemented as methods, apparatus, a computer-readable storage medium having stored thereon instructions for encoding or decoding video data according to any of the described methods, and / or a computer-readable storage medium having stored thereon a bitstream generated according to any of the described methods.
[0056] In this application, the terms "reconstruction" and "decoding" are used interchangeably, the terms "pixel" and "sample" are used interchangeably, and the terms "image", "picture" and "frame" are used interchangeably. Usually, but not necessarily, the term "reconstruction" is used on the encoder side, while "decoding" is used on the decoder side.
[0057] Various methods are described herein, and each method includes one or more steps or actions for implementing the described method. Unless a specific order of steps or actions is required for proper operation of the method, the order and / or use of specific steps and / or actions may be modified or combined.
[0058] Various methods and other aspects described in this application can be used to modify modules, such as Fig. 9 and Fig.10Intra prediction, entropy coding and / or decoding modules (160, 360, 145, 330) of the video encoder 100 and decoder 200 shown. In addition, aspects of the present invention are not limited to VVC or HEVC, and can be applied to, for example, other standards and recommendations, whether pre-existing or developed in the future, and extensions of any such standards and recommendations (including VVC and HEVC). Unless otherwise specified or technically excluded, the aspects described in this application can be used alone or in combination.
[0059] Various numerical values are used in this application. The specific values are for illustrative purposes, and the described aspects are not limited to these specific values.
[0060] Fig. 9 An encoder 100 is shown. Variations of the encoder 100 are contemplated, but for the sake of clarity, the encoder 100 is described below without describing all contemplated variations.
[0061] Before being encoded, the video sequence may undergo a pre-encoding process (101), for example, applying a color transform to the input color picture (e.g., conversion from RGB 4:4:4 to YCbCr 4:2:0), or performing a remapping of the input picture components in order to obtain a signal distribution that is more resilient to compression (e.g., using histogram equalization of one of the color components). Metadata may be associated with the pre-processing and appended to the bitstream.
[0062] In encoder 100, a picture is encoded by encoder elements as described below. The picture to be encoded is divided (102) and processed in units such as CUs. Each unit is encoded using, for example, intra or inter mode. When the unit is encoded in intra mode, it performs intra prediction (160). In inter mode, motion estimation (175) and compensation (170) are performed. The encoder decides (105) which of intra mode or inter mode to use to encode the unit, and indicates the intra / inter decision by, for example, a prediction mode flag. For example, a prediction residual is calculated by subtracting (110) the predicted block from the original image block.
[0063] The prediction residual is then transformed (125) and quantized (130). The quantized transform coefficients, along with motion vectors and other syntax elements, are entropy coded (145) to output a bitstream. The encoder may skip the transform and apply quantization directly to the untransformed residual signal. The encoder may bypass the transform and quantization, i.e., directly decode the residual without applying a transform or quantization process.
[0064] The encoder decodes the coded block to provide a reference for further prediction. The quantized transform coefficients are dequantized (140) and inverse transformed (150) to decode the prediction residual. The decoded prediction residual and the prediction block are combined (155) to reconstruct the image block. An in-loop filter (165) is applied to the reconstructed image to perform, for example, deblocking / SAO (sample adaptive offset) filtering to reduce coding artifacts. The filtered image is stored in a reference picture buffer (180).
[0065] Fig.10 1 is a block diagram illustrating a video decoder 200. In the decoder 200, a bitstream is decoded by decoder elements as described below. The video decoder 200 generally performs the same Fig. 9 The encoding pass described in is a decoding pass that is the inverse of the encoding pass described in . The encoder 100 also typically performs video decoding as part of encoding the video data.
[0066] In particular, the input to the decoder includes a video bitstream, which may be generated by the video encoder 100. The bitstream is first entropy decoded (230) to obtain transform coefficients, motion vectors, and other decoding information. Picture segmentation information indicates how the picture is segmented. The decoder can therefore divide (235) the picture according to the decoded picture segmentation information. The transform coefficients are dequantized (240) and inverse transformed (250) to decode the prediction residual. The decoded prediction residual is combined (255) with the prediction block to reconstruct the image block. The prediction block can be obtained (270) from intra-frame prediction (260) or motion compensated prediction (i.e., inter-frame prediction) (275). An in-loop filter (265) is applied to the reconstructed image. The filtered image is stored in a reference picture buffer (280).
[0067] The decoded picture may further undergo post-decoding processing (285), such as an inverse color transform (e.g., conversion from YCbCr 4:2:0 to RGB 4:4:4) or inverse remapping that performs the inverse of the remapping process performed in the pre-encoding process (101). The post-decoding process may use metadata derived in the pre-encoding process and signaled in the bitstream.
[0068] Fig.11A block diagram of an example of a system in which various aspects and embodiments are implemented is shown. System 1000 can be implemented as a device including various components described below, and is configured to perform one or more aspects described herein. Examples of such devices include, but are not limited to, various electronic devices, such as personal computers, laptop computers, smart phones, tablet computers, digital multimedia set-top boxes, digital television receivers, personal video recording systems, connected household appliances and servers. The elements of system 1000 can be implemented individually or in combination in a single integrated circuit (IC), multiple ICs and / or discrete components. For example, in at least one embodiment, the processing and encoder / decoder elements of system 1000 are distributed on multiple ICs and / or discrete components. In various embodiments, system 1000 is coupled to one or more other systems or other electronic devices via, for example, a communication bus or by a dedicated input and / or output port communication. In various embodiments, system 1000 is configured to implement one or more aspects described herein.
[0069] The system 1000 includes at least one processor 1010, which is configured to execute instructions loaded therein, for implementing various aspects described herein, for example. The processor 1010 may include embedded memory, input and output interfaces, and various other circuits known in the art. The system 1000 includes at least one memory 1020 (e.g., a volatile memory device and / or a non-volatile memory device). The system 1000 includes a storage device 1040, which may include a non-volatile memory and / or a volatile memory, including but not limited to an electrically erasable programmable read-only memory (EEPROM), a read-only memory (ROM), a programmable read-only memory (PROM), a random access memory (RAM), a dynamic random access memory (DRAM), a static random access memory (SRAM), a flash memory, a disk drive, and / or an optical drive. As a non-limiting example, the storage device 1040 may include an internal storage device, an attached storage device (including a removable and non-removable storage device), and / or a network-accessible storage device.
[0070] The system 1000 includes an encoder / decoder module 1030, which is configured to, for example, process data to provide encoded video or decoded video, and the encoder / decoder module 1030 may include its own processor and memory. The encoder / decoder module 1030 represents a module (one or more) that may be included in a device to perform encoding and / or decoding functions. As is known, a device may include one or both of the encoding and decoding modules. In addition, the encoder / decoder module 1030 may be implemented as a separate element of the system 1000 or may be incorporated into the processor 1010 as a combination of hardware and software as known to those skilled in the art.
[0071] Program code to be loaded onto the processor 1010 or the encoder / decoder 1030 to perform various aspects described in this document may be stored in the storage device 1040 and subsequently loaded onto the memory 1020 for execution by the processor 1010. According to various embodiments, one or more of the processor 1010, the memory 1020, the storage device 1040, and the encoder / decoder module 1030 may store one or more of the various items during the execution of the processes described herein. These stored items may include, but are not limited to, input video, decoded video or portions of decoded video, bitstreams, matrices, variables, and intermediate or final results from the processing of equations, formulas, operations, and operational logic.
[0072] In some embodiments, memory within the processor 1010 and / or the encoder / decoder module 1030 is used to store instructions and provide working memory for processing required during encoding or decoding. However, in other embodiments, memory external to the processing device (e.g., the processing device may be the processor 1010 or the encoder / decoder module 1030) is used for one or more of these functions. The external memory may be memory 1020 and / or a storage device 1040, such as a dynamic volatile memory and / or a non-volatile flash memory. In several embodiments, the external non-volatile flash memory is used to store, for example, an operating system for a television. In at least one embodiment, a fast external dynamic volatile memory such as RAM is used as working memory for video coding and decoding operations, such as working memory for MPEG-2 (MPEG refers to Moving Picture Experts Group, MPEG-2 is also known as ISO / IEC 13818, and 13818-1 is also known as H.222, and 13818-2 is also known as H.262), HEVC (HEVC refers to High Efficiency Video Coding, also known as H.265 and MPEG-H Part 2), or VVC (Versatile Video Coding, a new standard developed by JVET (Joint Video Team Experts)).
[0073] As shown in block 1130, input to the elements of system 1000 may be provided through various input devices. Such input devices include, but are not limited to, (i) an RF section that receives a radio frequency (RF) signal transmitted over the air, for example, by a broadcaster, (ii) a component (COMP) input terminal (or a set of COMP input terminals), (iii) a universal serial bus (USB) input terminal, and / or (iv) a high-definition multimedia interface (HDMI) input terminal. Fig.11 Other examples not shown include composite video.
[0074] In various embodiments, the input device of block 1130 has associated corresponding input processing elements known in the art. For example, the RF portion may be associated with elements suitable for implementing the following processes: (i) selecting a desired frequency (also referred to as selecting a signal, or band limiting a signal to a frequency band), (ii) down-converting the selected signal, (iii) again band-limiting to a narrower frequency band to select a signal frequency band that may be referred to as a channel in some embodiments, (iv) demodulating the down-converted and band-limited signal, (v) performing error correction, and (vi) demultiplexing to select a desired data packet stream. The RF portion of various embodiments includes one or more elements to perform these functions, such as a frequency selector, a signal selector, a band limiter, a channel selector, a filter, a down-converter, a demodulator, an error corrector, and a demultiplexer. The RF portion may include a tuner that performs various of these functions, including, for example, down-converting a received signal to a lower frequency (e.g., an intermediate frequency or a near-baseband frequency) or baseband. In a set-top box embodiment, the RF part and its relevant input processing element receive the RF signal that sends by wired (for example, cable) medium, and filter to the frequency band of expectation again by filtering, down-conversion and perform frequency selection.Various embodiments rearrange the order of above-mentioned (and other) elements, remove some in these elements, and / or add other elements that perform similar or different functions.Adding element can include and insert element between existing element, for example insert amplifier and analog-to-digital converter.In various embodiments, the RF part comprises antenna.
[0075] In addition, the USB and / or HDMI terminals may include corresponding interface processors for connecting the system 1000 to other electronic devices via USB and / or HDMI connections. It should be understood that various aspects of input processing (e.g., Reed-Solomon error correction) may be implemented as needed, for example, in a separate input processing IC or processor 1010. Similarly, various aspects of USB or HDMI interface processing may be implemented as needed, in a separate interface IC or in processor 1010. The demodulated, error-corrected, and demultiplexed streams are provided to various processing elements (including, for example, processor 1010 and encoder / decoder 1030, which operates in conjunction with memory and storage elements to process the data streams as needed for presentation on output devices).
[0076] The various components of system 1000 may be disposed within an integrated housing in which the various components may be interconnected and transmit data using suitable connection arrangements such as internal buses (including inter-IC (I2C) buses), wiring, and printed circuit boards known in the art.
[0077] The system 1000 includes a communication interface 1050 that enables communication with other devices via a communication channel 1060. The communication interface 1050 may include, but is not limited to, a transceiver configured to send and receive data through the communication channel 1060. The communication interface 1050 may include, but is not limited to, a modem or a network card, and the communication channel 1060 may be implemented, for example, within a wired and / or wireless medium.
[0078] In various embodiments, data is streamed or otherwise provided to the system 1000 using a wireless network, such as a Wi-Fi network, such as IEEE 802.11 (IEEE refers to the Institute of Electrical and Electronics Engineers). The Wi-Fi signals of these embodiments are received through a communication channel 1060 and a communication interface 1050 suitable for Wi-Fi communication. The communication channel 1060 of these embodiments is typically connected to an access point or router that provides access to external networks including the Internet to allow streaming applications and other over-the-top communications. Other embodiments use a set-top box that transmits data through an HDMI connection of the input box 1130 to provide streaming data to the system 1000. Still other embodiments use an RF connection of the input box 1130 to provide streaming data to the system 1000. As described above, various embodiments provide data in a non-streaming manner. In addition, various embodiments use a wireless network other than Wi-Fi, such as a cellular network or a Bluetooth network.
[0079] System 1000 can provide output signals to various output devices, including display 1100, speaker 1110 and other peripheral devices 1120. Display 1100 of various embodiments includes one or more of the following: for example, touch screen display, organic light emitting diode (OLED) display, curved display and / or foldable display. Display 1100 can be used for television, tablet computer, laptop computer, cellular phone (mobile phone) or other devices. Display 1100 can also be integrated with other components (for example, as in a smart phone), or separate (for example, an external monitor for a laptop computer). In each example of each embodiment, other peripheral devices 1120 include one or more of the following: independent digital video disk (or digital versatile disk) (DVR, for these two), disk player, stereo system and / or lighting system. Various embodiments use one or more peripheral devices 1120, which provide functions based on the output of system 1000. For example, a disk player performs the function of playing the output of system 1000.
[0080] In various embodiments, control signals are transmitted between the system 1000 and the display 1100, speaker 1110, or other peripheral device 1120 using signaling (such as AV.link, consumer electronics control (CEC), or other communication protocols that implement device-to-device control with or without user intervention). Output devices can be communicatively coupled to the system 1000 via dedicated connections through corresponding interfaces 1070, 1080, and 1090. Alternatively, output devices can be connected to the system 1000 via communication interface 1050 using communication channel 1060. The display 1100 and speaker 1110 can be integrated into a single unit in an electronic device (e.g., a television) along with other components of the system 1000. In various embodiments, the display interface 1070 includes a display driver, such as a timing controller (T Con) chip.
[0081] For example, if the RF portion of input 1130 is part of a separate set-top box, the display 1100 and speaker 1110 may alternatively be separate from one or more of the other components. In various embodiments where the display 1100 and speaker 1110 are external components, the output signal may be provided via a dedicated output connection, including, for example, an HDMI port, a USB port, or a COMP output.
[0082] These embodiments may be implemented by the processor 1010 or by software or by computer software implemented by a combination of hardware and software. As a non-limiting example, the embodiments may be implemented by one or more integrated circuits. The memory 1020 may be of any type suitable for the technical environment and may be implemented using any appropriate data storage technology, such as, as a non-limiting example, optical memory devices, magnetic memory devices, semiconductor-based memory devices, fixed memory, and removable memory. The processor 1010 may be of any type suitable for the technical environment and may include one or more of the following: as a non-limiting example, a microprocessor, a general-purpose computer, a special-purpose computer, and a processor based on a multi-core architecture.
[0083] Various implementations involve decoding. As used in the present application, "decoding" may include, for example, all or part of a process performed on a received coded sequence to produce a final output suitable for display. In various embodiments, such a process includes one or more of the processes typically performed by a decoder, such as entropy decoding, inverse quantization, inverse transform, and differential decoding. In various embodiments, such a process also or alternatively includes a process performed by a decoder of the various implementations described in the present application.
[0084] As a further example, in one embodiment, "decoding" refers only to entropy decoding, in another embodiment, "decoding" refers only to differential decoding, and in another embodiment, "decoding" refers to a combination of entropy decoding and differential decoding. Whether the phrase "decoding process" is intended to refer specifically to a subset of operations or generally to a broader decoding process will be clear based on the context of the specific description, and is believed to be well understood by those skilled in the art.
[0085] Various implementations involve encoding. In a manner similar to the above discussion of "decoding", "encoding" as used in this application may include, for example, all or part of a process performed on an input video sequence to produce an encoded bitstream. In various embodiments, such processes include one or more processes typically performed by an encoder, such as segmentation, differential encoding, transforms, quantization, and entropy encoding. In various embodiments, such processes also or alternatively include processes performed by encoders of the various implementations described in this application.
[0086] As a further example, in one embodiment, "encoding" refers only to entropy encoding, in another embodiment, "encoding" refers only to differential encoding, and in another embodiment, "encoding" refers to a combination of differential encoding and entropy encoding. Whether the phrase "encoding process" is intended to refer specifically to a subset of operations or generally to a broader encoding process will become clear based on the context of the specific description and is believed to be well understood by those skilled in the art.
[0087] Note that the syntax elements used here are descriptive terms. Therefore, they do not exclude the use of other syntax element names.
[0088] When a figure is presented as a flow chart, it should be understood that it also provides a block diagram of the corresponding apparatus. Similarly, when a figure is presented as a block diagram, it should be understood that it also provides a flow chart of the corresponding method / process.
[0089] Various embodiments may relate to parameter models or rate-distortion optimization. In particular, during the encoding process, a balance or trade-off between rate and distortion is usually considered, usually given a constraint on computational complexity. It can be measured by rate-distortion optimization (RDO) metric, or by least mean square (LMS), mean absolute error (MAE) or other such measurements. Rate-distortion optimization is usually formulated as minimizing a rate-distortion function, which is a weighted sum of rate and distortion. There are different methods to solve the rate-distortion optimization problem. For example, these methods can be based on a complete evaluation of their decoding costs and the associated distortion of the reconstructed signal after decoding and decoding for all coding options (including extensive testing of all considered modes or decoding parameter values). Faster methods can also be used to save coding complexity, in particular, to calculate approximate distortion based on prediction or prediction residual signals rather than reconstructed signals. A mixture of these two methods can also be used, for example by using approximate distortion only for some possible coding options and full distortion for other coding options. Other methods only evaluate a subset of possible coding options. More generally, many approaches employ any of a variety of techniques to perform optimization, but optimization is not necessarily a complete assessment of both the coding cost and the associated distortion.
[0090] The implementations and aspects described herein may be implemented in, for example, a method or process, a device, a software program, a data stream, or a signal. Even if discussed only in the context of a single form of implementation (e.g., discussed only as a method), the implementation of the features discussed may also be implemented in other forms (e.g., a device or program). For example, a device may be implemented with appropriate hardware, software, and firmware. The method may be implemented in, for example, a processor, which generally refers to a processing device, including, for example, a computer, a microprocessor, an integrated circuit, or a programmable logic device. The processor also includes a communication device, such as a computer, a cellular phone, a portable / personal digital assistant ("PDA"), and other devices that facilitate information communication between end users.
[0091] References to "one embodiment" or "an embodiment" or "an implementation" or "an implementation" and other variations mean that a particular feature, structure, characteristic, etc. described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "in an implementation" or "in an implementation" and any other variations in various places in this application do not necessarily all refer to the same embodiment.
[0092] Additionally, the present application may refer to “determining” various information. Determining information may include one or more of the following: estimating information, calculating information, predicting information, or retrieving information from a memory, for example.
[0093] Furthermore, the present application may refer to "accessing" various information. Accessing information may include one or more of: receiving information, retrieving information (e.g., from a memory), storing information, moving information, copying information, calculating information, determining information, predicting information, or estimating information.
[0094] Additionally, the present application may refer to "receiving" various information. Like "accessing," receiving is intended to be a broad term. Receiving information may include, for example, one or more of accessing information or retrieving information (e.g., from a memory). Furthermore, during operations such as storing information, processing information, sending information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information, "receiving" is generally involved in one way or another.
[0095] It should be understood that the use of any of the following " / ", "and / or", and "at least one of" ... (e.g., in the case of "A / B", "A and / or B", and "at least one of A and B") is intended to cover selection of only the first listed option (A), or only the second listed option (B), or both options (A and B). As a further example, in the case of "A, B, and / or C" and "at least one of A, B, and C", such wording is intended to include selection of only the first listed option (A), or only the second listed option (B), or only the third listed option (C), or only the first and second listed options (A and B), or only the first and third listed options (A and C), or only the second and third listed options (B and C), or all three options (A and B and C). As will be apparent to one of ordinary skill in this and related arts, this can be extended to multiple items listed.
[0096] In addition, as used herein, the word "signaling" especially refers to indicating something to a corresponding decoder. For example, in some embodiments, the encoder signals a specific one of multiple transforms, decoding modes or flags. Thus, in one embodiment, the same transform, parameter or mode is used on both the encoder side and the decoder side. Therefore, for example, the encoder can send (explicit signaling) specific parameters to the decoder so that the decoder can use the same specific parameters. On the contrary, if the decoder already has specific parameters and other parameters, signaling can be used without sending (implicit signaling) to simply allow the decoder to know and select specific parameters. Bit saving is achieved in various embodiments by avoiding the transmission of any actual function. It should be understood that signaling can be implemented in various ways. For example, in various embodiments, one or more syntax elements, flags, etc. are used to signal information to the corresponding decoder. Although the foregoing relates to the verb form of the word "signaling", the word "signal" can also be used as a noun in this article.
[0097] As will be apparent to one of ordinary skill in the art, implementations may generate various signals formatted to carry information that may be stored or transmitted, for example. The information may include, for example, instructions for executing a method, or data generated by one of the described implementations. For example, a signal may be formatted to carry a bitstream of the described embodiments. Such a signal may be formatted as, for example, an electromagnetic wave (e.g., using a radio frequency portion of a spectrum) or a baseband signal. Formatting may include, for example, encoding a data stream and modulating a carrier with the encoded data stream. The information carried by the signal may be, for example, analog or digital information. As is known, the signal may be transmitted over a variety of different wired or wireless links. The signal may be stored on a processor readable medium.
[0098] We have described multiple embodiments across various claim categories and types. Features of these embodiments may be provided individually or in any combination. In addition, embodiments may include one or more of the following features, devices, or aspects, alone or in any combination, across various claim categories and types:
[0099] A process or device that uses pre-trained deep neural network compression to perform encoding and decoding.
[0100] A process or apparatus for performing encoding and decoding using information representing parameters inserted in a bitstream to achieve compression of a pre-trained deep neural network including one or more layers.
[0101] A process or apparatus for performing encoding and decoding using information representing parameters inserted in a bitstream to achieve compression of a pre-trained deep neural network until a compression criterion is met.
[0102] • A bitstream or signal comprising one or more of the described syntax elements or variations thereof.
[0103] • A bitstream or signal comprising syntax conveying information generated according to any of the described embodiments.
[0104] • Creating and / or transmitting and / or receiving and / or decoding according to any of the embodiments described.
[0105] • A method, process, apparatus, medium storing instructions, medium storing data, or signal according to any of the described embodiments.
[0106] • Inserting syntax elements in the signaling that enable the decoder to determine the coding mode in a manner corresponding to that used by the encoder.
[0107] • Creating and / or transmitting and / or receiving and / or decoding a bitstream or signal comprising one or more of the described syntax elements or variations thereof.
[0108] • A TV, set-top box, cell phone, tablet or other electronic device that performs the transformation method(s) according to any of the described embodiments.
[0109] A TV, set-top box, cell phone, tablet or other electronic device that performs a transformation method(s) according to any of the described embodiments and displays (e.g., using a monitor, screen or other type of display) the resulting image.
[0110] A TV, set-top box, cellular phone, tablet or other electronic device that selects, band-limits or tunes (e.g., using a tuner) a channel to receive a signal including an encoded image, and performs a transformation method(s) according to any of the described embodiments.
[0111] • A TV, set-top box, cell phone, tablet or other electronic device that receives over the air (eg, using an antenna) a signal including an encoded image and performs the transformation method(s).
Claims
1. A method for encoding parameters representing a deep neural network into a bitstream, comprising: Obtaining information representing weights, biases, and nonlinearities of a deep neural network and an approximate training set of image data for the deep neural network; generating inputs and outputs of at least one k-th layer based on the weights, biases, and nonlinearities for at least one k-th layer of the deep neural network and based on the approximate training set, the inputs and outputs representing image data; Determine an output matrix based on the obtained input and output of the at least one k-th layer, the output matrix being used to derive a low displacement rank approximation of the weights of the at least one k-th layer; Wherein determining the output matrix comprises: generating a current output matrix for the at least one k-th layer using a current batch of inputs and outputs of the at least one k-th layer by minimizing an error between the generated outputs of the at least one k-th layer and corresponding outputs obtained from a low shift rank approximation of the weights; updating an output matrix generated for a previous iteration based on the current output matrix; Repeating the generation and updating with the next batch until the minimization criterion has been satisfied; and Quantization and entropy coding are performed on the coefficients of the output matrix to form the bitstream.
2. The method of claim 1, wherein the approximate training set comprises a subset of an original training set of the deep neural network.
3. The method of claim 1 , wherein minimizing the error between the generated output of the at least one k-th layer and the corresponding output obtained from the low shift rank approximation of the weights comprises: In constraint Under the output matrix (G k ,H k ) minimizes the sum of: where l(.) is the norm, is the element x of the approximate training set t The output of the kth layer, A and B are predetermined matrices, b k is the bias of the kth layer, g k is the nonlinearity of the k-th layer, is the low shift rank approximation of the weights.
4. An apparatus for encoding parameters representing a deep neural network into a bitstream, comprising: A processor configured to execute: Obtaining information representing weights, biases, and nonlinearities of a deep neural network and an approximate training set of image data for the deep neural network; generating inputs and outputs of at least one k-th layer based on the weights, biases, and nonlinearities for at least one k-th layer of the deep neural network and based on the approximate training set, the inputs and outputs representing image data; Determine an output matrix based on the obtained input and output of the at least one k-th layer, the output matrix being used to derive a low displacement rank approximation of the weights of the at least one k-th layer; Wherein determining the output matrix comprises: generating a current output matrix for the at least one k-th layer using a current batch of inputs and outputs of the at least one k-th layer by minimizing an error between the generated outputs of the at least one k-th layer and corresponding outputs obtained from a low shift rank approximation of the weights; updating an output matrix generated for a previous iteration based on the current output matrix; Repeating the generation and updating with the next batch until the minimization criterion has been satisfied; and Quantization and entropy coding are performed on the coefficients of the output matrix.
5. The apparatus of claim 4, wherein the approximate training set comprises a subset of an original training set of the deep neural network.
6. The apparatus of claim 5, wherein minimizing an error between the generated output of the at least one k-th layer and a corresponding output obtained from a low shifted rank approximation of the weights comprises: In constraint Under the output matrix (G k ,H k ) minimizes the sum of: where l(.) is the norm, is the element x of the approximate training set t The output of the kth layer, A and B are predetermined matrices, b k is the bias of the kth layer, g k is the nonlinearity of the k-th layer, is the low shift rank approximation of the weights.
7. A computer program product comprising instructions which, when the program is executed by a computer, cause the computer to perform the method according to any one of claims 1 to 3.
