Image encoding and decoding method and apparatus, device, and storage medium

By using a lightweight attention module to construct a synthetic transformation network in image encoding and decoding, the problem of balancing computational efficiency and processing effect is solved, and a high-performance image encoding and decoding improvement is achieved.

WO2024199543A1PCT designated stage expired Publication Date: 2024-10-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/091058
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-19
Filing Date
2024-04-30
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Existing synthetic transform networks cannot balance computational efficiency and processing effect in image encoding and decoding, resulting in poor image encoding and decoding performance.

Method used

A lightweight attention module is used to construct a new synthetic transformation network by decoding and reconstructing the image bitstream, thereby reducing computational complexity and improving image processing performance.

Benefits of technology

While reducing computational complexity, it improves image processing performance and enhances image encoding and decoding capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024091058_03102024_PF_FP_ABST
    Figure CN2024091058_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides an image encoding and decoding method and apparatus, a device, and a storage medium. The method can be applied to fields such as image processing, video encoding and decoding, video livestreaming, and comprises: decoding the code stream of a current image to obtain the residual value of the current image, and determining the transformation value of the current image on the basis of the residual value; processing the transformation value of the current image by means of a synthesis transformation network to obtain a reconstructed image of the current image, wherein the synthesis transformation network comprises K types of lightweight attention modules, and the computation complexity of the K types of lightweight attention modules is smaller than a pre-set value. Thus, the synthesis transformation network processes the transformation value of the current image, the quality of the obtained reconstructed image of the current image is good, and computation complexity is low. In this way, the image encoding and decoding complexity is effectively controlled while the image processing effect is improved, and the image encoding and decoding performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Image encoding and decoding method, device, equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 30, 2023, with application number 202310353301.1, and with the invention name “Image Coding and Decoding Method, Device, Equipment and Storage Medium”, and the Chinese patent application filed with the China Patent Office on May 31, 2023, with application number 202310639145.5, and with the invention name “Image Coding and Decoding Method, Device, Equipment and Storage Medium”, and the Chinese patent application filed with the China Patent Office on October 19, 2023, with application number 202311371093.4, and with the invention name “Image Coding and Decoding Method, Device, Equipment and Storage Medium”, all of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of image coding and decoding technology, and in particular to an image coding and decoding method, apparatus, device, and storage medium. Background Art

[0003] With the rapid development of deep learning technology, it has been applied in the field of image encoding and decoding. Current deep learning-based image encoding and decoding techniques first map the original image to latent variables through a synthetic transformation network. These latent variables are then encoded to produce a bitstream. Correspondingly, the decoder decodes the bitstream to obtain the latent variables, which are then processed through a synthetic transformation network to produce a reconstructed image.

[0004] However, the current synthetic transformation network has the problem of not being able to balance computational efficiency and processing effect, resulting in low image encoding and decoding performance.

[0005] Summary of the Invention

[0006] The present application provides an image encoding and decoding method, apparatus, device and storage medium to improve the performance of the synthetic transformation network, thereby improving the image encoding and decoding effect.

[0007] In a first aspect, the present application provides an image decoding method, applied to a decoding device, the method comprising:

[0008] Decoding a code stream of a current image to obtain a residual value of the current image, and determining a transformation value of the current image based on the residual value;

[0009] The transformation value of the current image is processed through a synthetic transformation network to obtain a reconstructed image of the current image. The synthetic transformation network includes K types of lightweight attention modules, where K is a positive integer, and the computational complexity of the K types of lightweight attention modules is less than a preset value.

[0010] In a second aspect, the present application provides an image encoding method, applied to an encoding device, the method comprising:

[0011] Processing a current image through an analysis transformation network to obtain a transformation value of the current image, wherein the analysis transformation network includes K types of lightweight attention modules, and the computational complexity of the K types of lightweight attention modules is less than a preset value, where K is a positive integer;

[0012] The current image is encoded according to the transformation value of the current image to obtain a code stream.

[0013] In a third aspect, the present application provides an image decoding apparatus, applied to a decoding device, the apparatus comprising:

[0014] a decoding unit, configured to decode a code stream of a current image to obtain a residual value of the current image, and determine a transformation value of the current image based on the residual value;

[0015] A reconstruction unit is used to process the transformation value of the current image through a synthetic transformation network to obtain a reconstructed image of the current image, wherein the synthetic transformation network includes K types of lightweight attention modules, and the computational complexity of the K types of lightweight attention modules is less than a preset value, and K is a positive integer.

[0016] In a fourth aspect, the present application provides an image encoding apparatus, applied to an encoding device, the apparatus comprising:

[0017] a transform unit, configured to process a current image through an analysis transform network to obtain a transform value of the current image, wherein the analysis transform network includes K types of lightweight attention modules, wherein the computational complexity of the K types of lightweight attention modules is less than a preset value, and K is a positive integer;

[0018] The encoding unit is used to encode the current image according to the transformation value of the current image to obtain a code stream.

[0019] In a fifth aspect, a decoder is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program, and the processor is configured to call and execute the computer program stored in the memory to execute the method of the first aspect or its implementations.

[0020] In a sixth aspect, an encoder is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program, and the processor is configured to call and execute the computer program stored in the memory to execute the method of the second aspect or its respective implementations.

[0021] In a seventh aspect, a chip is provided for implementing the method described in any one of the first and second aspects above, or their respective implementations. Specifically, the chip includes a processor configured to load and execute a computer program from a memory, causing a device equipped with the chip to perform the method described in any one of the first and second aspects above, or their respective implementations.

[0022] In an eighth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method of any one of the first to second aspects or their respective implementations.

[0023] In a ninth aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method of any one of the first to second aspects or their respective implementations.

[0024] In a tenth aspect, a computer program is provided, which, when executed on a computer, enables the computer to execute the method of any one of the first to second aspects or their respective implementations.

[0025] In summary, when decoding the current image, the decoding end of the present application first decodes the code stream of the current image to obtain the residual value of the current image, and determines the transformation value of the current image based on the residual value; the transformation value of the current image is processed by a synthetic transformation network to obtain a reconstructed image of the current image, and the synthetic transformation network includes K types of lightweight attention modules, and the computational complexity of these K types of lightweight attention modules is less than a preset value. In other words, the embodiment of the present application proposes a new synthetic transformation network, which includes K types of lightweight attention modules, and the computational complexity of these K types of lightweight attention modules is less than a preset value. In this way, the synthetic transformation network processes the transformation value of the current image, and the reconstructed image of the current image obtained has a better effect and low computational complexity, thereby effectively controlling the image decoding complexity, reducing the decoding time, and improving the image decoding performance while improving the image processing effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] FIG1 is a schematic block diagram of a video encoding and decoding system according to an embodiment of the present application;

[0027] FIG2A is a schematic diagram of an end-to-end image encoding and decoding model based on deep learning;

[0028] FIG2B is a schematic diagram of a lightweight end-to-end image encoding and decoding model;

[0029] FIG3A is a schematic diagram of a relatively complex synthesis transformation network;

[0030] FIG3B is a schematic diagram of a synthetic transformation network with relatively low complexity;

[0031] FIG4 is a schematic diagram of a flow chart of an image decoding method provided in an embodiment of the present application;

[0032] 5A to 5C are schematic diagrams of a synthetic transformation network proposed in this application;

[0033] FIG6 is a schematic diagram of a data processing flow of a synthetic transformation network provided in an embodiment of the present application;

[0034] 7A to 7H are schematic diagrams showing the connection of different types of lightweight attention modules;

[0035] Figure 8A is a schematic diagram of RNAB;

[0036] FIG8B is a schematic diagram of a lightweight attention module proposed in this application;

[0037] FIG8C is a schematic diagram of a residual block;

[0038] FIG8D is a schematic diagram of a simplified residual block proposed in this application;

[0039] FIG9A is a schematic diagram of a lightweight attention module proposed in this application;

[0040] FIG9B is a schematic diagram of another lightweight attention module proposed in this application;

[0041] FIG9C is a schematic diagram of an inverted linear bottleneck unit with depthwise separable convolution;

[0042] FIG9D is another schematic diagram of an inverted linear bottleneck unit with depthwise separable convolution;

[0043] FIG9E is a schematic diagram of a window attention unit;

[0044] Figure 9F is a schematic diagram of a grid attention unit;

[0045] FIG10A is a schematic diagram of a lightweight attention module proposed in this application;

[0046] FIG10B is a schematic diagram of a multi-head transposition attention submodule;

[0047] FIG10C is another schematic diagram of the multi-head transposition attention submodule;

[0048] FIG10D is another schematic diagram of the multi-head transposition attention submodule;

[0049] FIG10E is another schematic diagram of the multi-head transposition attention submodule;

[0050] FIG10F is a schematic diagram of a gated feedforward network submodule;

[0051] FIG10G is another schematic diagram of a gated feedforward network submodule;

[0052] FIG10H is another schematic diagram of a gated feedforward network submodule;

[0053] FIG10I is another schematic diagram of a gated feedforward network submodule;

[0054] FIG11 is a schematic diagram of a lightweight attention module proposed in this application;

[0055] FIG12 is a schematic diagram of a flow chart of an image encoding method provided in an embodiment of the present application;

[0056] FIG13 is a schematic block diagram of an image decoding apparatus according to an embodiment of the present application;

[0057] FIG14 is a schematic block diagram of an image encoding apparatus according to an embodiment of the present application;

[0058] FIG15 is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0060] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In an embodiment of the present invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A, but that B can also be determined based on A and / or other information. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices. In the description of this application, unless otherwise specified, "plurality" means two or more than two.

[0061] The present application can be applied to the field of image coding and decoding, the field of video coding and decoding, the field of hardware video coding and decoding, the field of dedicated circuit video coding and decoding, the field of real-time video coding and decoding, and the like. For example, the solution of the present application can be incorporated into a standard for end-to-end image coding based on deep learning, such as JPEG AI. Alternatively, the solution of the present application can be incorporated into other proprietary or industry standards and operated, including ITU-TH.261, ISO / IECMPEG-1Visual, ITU-TH.262 or ISO / IECMPEG-2Visual, ITU-TH.263, ISO / IECMPEG-4Visual, ITU-TH.264 (also known as ISO / IECMPEG-4AVC), including scalable video coding (SVC) and multi-view video coding (MVC) extensions. It should be understood that the technology of the present application is not limited to any specific coding standard or technology.

[0062] For ease of understanding, the video encoding and decoding system involved in the embodiment of the present application is first introduced with reference to FIG1 .

[0063] FIG1 is a schematic block diagram of a video encoding and decoding system involved in an embodiment of the present application. It should be noted that FIG1 is only an example, and the video encoding and decoding system of the embodiment of the present application includes but is not limited to that shown in FIG1. ​​As shown in FIG1, the video encoding and decoding system 100 includes an encoding device 110 and a decoding device 120. The encoding device is used to encode (which can be understood as compressing) the video data to generate a code stream, and transmit the code stream to the decoding device. The decoding device decodes the code stream generated by the encoding device to obtain decoded video data.

[0064] The encoding device 110 of the embodiment of the present application can be understood as a device with a video encoding function, and the decoding device 120 can be understood as a device with a video decoding function, that is, the embodiment of the present application includes a wider range of devices for the encoding device 110 and the decoding device 120, such as smartphones, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, car computers, etc.

[0065] In some embodiments, the encoding device 110 may transmit the encoded video data (eg, a code stream) to the decoding device 120 via a channel 130. The channel 130 may include one or more media and / or devices capable of transmitting the encoded video data from the encoding device 110 to the decoding device 120.

[0066] In one example, the channel 130 includes one or more communication media that enable the encoding device 110 to transmit the encoded video data directly to the decoding device 120 in real time. In this example, the encoding device 110 can modulate the encoded video data according to a communication standard and transmit the modulated video data to the decoding device 120. The communication media includes wireless communication media, such as radio frequency spectrum. Optionally, the communication media may also include wired communication media, such as one or more physical transmission lines.

[0067] In another example, channel 130 includes a storage medium that can store the video data encoded by encoding device 110. The storage medium includes various locally accessible data storage media, such as optical disks, DVDs, and flash memories. In this example, decoding device 120 can retrieve the encoded video data from the storage medium.

[0068] In another example, the channel 130 may include a storage server that can store the video data encoded by the encoding device 110. In this example, the decoding device 120 can download the stored encoded video data from the storage server. Alternatively, the storage server can store the encoded video data and transmit the encoded video data to the decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.

[0069] In some embodiments, the encoding device 110 includes a video encoder 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.

[0070] In some embodiments, the encoding device 110 may further include a video source 111 in addition to the video encoder 112 and the input interface 113 .

[0071] The video source 111 may include at least one of a video acquisition device (eg, a video camera), a video archive, a video input interface, and a computer graphics system, wherein the video input interface is used to receive video data from a video content provider, and the computer graphics system is used to generate video data.

[0072] The video encoder 112 encodes the video data from the video source 111 to generate a bitstream. The video data may include one or more pictures or a sequence of pictures. The bitstream contains the coding information of the picture or picture sequence in the form of a bitstream. The coding information may include the coded picture data and associated data. The associated data may include a sequence parameter set (SPS), a picture parameter set (PPS), and other syntax structures. The SPS may contain parameters that apply to one or more sequences. The PPS may contain parameters that apply to one or more pictures. The syntax structure refers to a set of zero or more syntax elements arranged in a specified order in the bitstream.

[0073] The video encoder 112 transmits the encoded video data directly to the decoding device 120 via the output interface 113. The encoded video data may also be stored in a storage medium or a storage server for subsequent reading by the decoding device 120.

[0074] In some embodiments, the decoding device 120 includes an input interface 121 and a video decoder 122 .

[0075] In some embodiments, the decoding device 120 may further include a display device 123 in addition to the input interface 121 and the video decoder 122 .

[0076] The input interface 121 includes a receiver and / or a modem and can receive the encoded video data via the channel 130 .

[0077] The video decoder 122 is configured to decode the encoded video data to obtain decoded video data, and transmit the decoded video data to the display device 123 .

[0078] The decoded video data is displayed on the display device 123. The display device 123 may be integrated with the decoding device 120 or external to the decoding device 120. The display device 123 may include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.

[0079] In addition, Figure 1 is only an example, and the technical solution of the embodiment of the present application is not limited to Figure 1. For example, the technology of the present application can also be applied to unilateral video encoding or unilateral video decoding.

[0080] The following introduces the end-to-end image encoding and decoding framework based on deep learning involved in the embodiments of the present application.

[0081] Figure 2A is a schematic diagram of an end-to-end image encoding and decoding model based on deep learning. As shown in Figure 2A, the current image x is processed by the analysis transformation network to obtain the transformation value y of the current image x. The transformation value y is processed by the super coding network to obtain the data to be encoded. Next, treat the encoded data Perform lossy encoding to obtain stream 1. After lossless decoding of stream 1, reconstruct Reconstructed by super decoding network After decoding, it passes through the context model network and the prediction fusion network to obtain the predicted value μ of the current image. The transformed value y of the current image is subtracted from the predicted value μ of the current image to obtain the residual value r of the current image, and the residual value r is quantized and rounded to obtain the quantized residual value The quantized residual value Perform entropy coding to obtain code stream 2.

[0082] At the decoding end, decode stream 1 and stream 2 to obtain the quantized residual value The quantized residual value After dequantization, add it to the predicted value μ to obtain the transformed reconstruction value of the current image Reconstruct the transformation value through the synthetic transformation network Process and obtain the reconstructed image of the current image

[0083] Figure 2B is a schematic diagram of a lightweight end-to-end image encoding and decoding model. As shown in Figure 2B, the model bypasses the context model network and the prediction fusion network. In the absence of the context model network and the prediction fusion network, the output of the lightweight super decoding network is directly used as the prediction value. Specifically, the current image x is processed by the lightweight analysis transformation network to obtain the transformation value y of the current image x. The prediction value μ of the current image is obtained through the lightweight super decoding network. The transformation value y of the current image is subtracted from the prediction value μ of the current image to obtain the residual value r of the current image, and the residual value r is quantized and rounded to obtain the quantized residual value The quantized residual value Perform entropy coding to obtain code stream 2. At the same time, the residual value r of the current image is quantized, and then encoded and rounded through the super coding network to obtain the data to be encoded Next, treat the encoded data Perform lossy encoding to obtain code stream 1.

[0084] At the decoding end, decode stream 1 and stream 2 to obtain the quantized residual value The quantized residual value After dequantization, add it to the predicted value μ to obtain the transformed reconstruction value of the current image Reconstruct the transformation value through the synthetic transformation network Process and obtain the reconstructed image of the current image

[0085] As shown in FIG2A and FIG2B above, in the end-to-end image compression scheme based on deep learning, the brightness component (x Y ) and the chrominance component (x UV ) After the nonlinear transformation of the analysis transformation network, the brightness component (y Y ) and the chrominance component (y UV ) is the result of the transformation. Then the brightness component (y Y ) and the chrominance component (y UV ) minus the output μ of the prediction fusion network Y and μ UV , and obtain the residual r of the luminance component and the chrominance component respectively Y and r UV , are all floating point types. Y and r UV Quantize it and convert it into an integer and The decoder decodes the code stream to generate the code stream. and After dequantization, the output μ of the prediction fusion network is Y and μ UV , get the transformed values ​​of the luminance component and the chrominance component and Then the transformation values ​​of the brightness component and the chrominance component are and As input, the reconstructed image of the luminance component and the chrominance component is obtained through the synthesis transformation network. and

[0086] The current synthetic transformation networks include the following two types. The first one, shown in Figure 3A, is a synthetic transformation network with higher complexity. The second one, shown in Figure 3B, is a synthetic transformation network with lower complexity. Specifically, the synthetic transformation network with higher complexity uses RNAB (residual non-local attention block), which improves performance while bringing higher complexity. In comparison, the structure of the synthetic transformation network with lower complexity does not use any attention module, which reduces complexity but has a large performance loss.

[0087] This shows that current synthetic transformation networks suffer from a problem of incompatibility between computational complexity and image processing performance. For example, the more complex synthetic transformation network shown in Figure 3A can achieve better image processing results, but its high computational complexity results in low image encoding and decoding efficiency. The less complex synthetic transformation network shown in Figure 3B has a simple structure and low computational complexity, resulting in high image encoding and decoding efficiency, but it discards the attention module, resulting in unsatisfactory image processing results.

[0088] To address the aforementioned technical issues, the present invention proposes a novel synthetic transformation network that includes a lightweight attention module with a computational complexity lower than a preset value. This allows the synthetic transformation network to process the transformation values ​​of the current image, resulting in a better reconstructed image of the current image with lower computational complexity. This improves image processing while effectively controlling image encoding and decoding complexity, thereby enhancing image encoding and decoding performance.

[0089] The following describes the technical solutions of the embodiments of the present application in detail through some embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0090] First, taking the decoding end as an example, the image decoding method provided in the embodiment of the present application is introduced.

[0091] FIG4 is a flow chart of an image decoding method provided by an embodiment of the present application, which is applied to the decoder shown in FIG1. ​​As shown in FIG4, the method of the embodiment of the present application includes:

[0092] S101 . Decode a code stream of a current image to obtain a residual value of the current image, and determine a transformation value of the current image based on the residual value.

[0093] As shown in FIG2A and FIG2B above, the decoding end decodes the code stream and obtains the quantized residual value of the current image And the quantized residual value Perform inverse quantization to obtain the residual value r of the current image. Next, determine the predicted value μ of the current image, for example, by using a prediction fusion network to determine the predicted value μ of the current image, and then add the predicted value μ of the current image and the residual value r to obtain the transformed value of the current image.

[0094] In some embodiments, the transform value at the decoding end Also called transformed reconstruction value or reconstructed value of transformed value, etc.

[0095] S102. Process the transformation value of the current image through a synthetic transformation network to obtain a reconstructed image of the current image, where the synthetic transformation network includes K types of lightweight attention modules.

[0096] Exemplarily, the computational complexity of these K types of lightweight attention modules is less than a preset value.

[0097] In the embodiment of the present application, lightweight attention modules with different network structures can be referred to as different types of lightweight attention modules. That is, in the embodiment of the present application, lightweight attention modules with one network structure are referred to as one type of lightweight attention modules, and then K types of lightweight attention modules correspond to K types of lightweight attention modules with network structures.

[0098] The current synthetic transformation network has the problem of incompatibility between computational complexity and image processing effect. To solve this technical problem, the embodiment of the present application proposes a new synthetic transformation network, which includes K types of lightweight attention modules. The computational complexity of these K types of lightweight attention modules is less than a preset value. In this way, the synthetic transformation network processes the transformation value of the current image, and the reconstructed image of the current image is better and has low computational complexity. In addition, while improving the image processing effect, it effectively controls the image encoding and decoding complexity and improves the image encoding and decoding performance.

[0099] The embodiments of the present application do not limit the number of types of lightweight attention modules included in the synthetic transformation network, and the number is determined according to actual needs. For example, the synthetic transformation network includes one type of lightweight attention module, or the synthetic transformation network includes multiple different types of lightweight attention modules.

[0100] In some embodiments, the number of lightweight attention modules of the same type included in the synthetic transformation network can be one or more. For example, the synthetic transformation network includes two types of lightweight attention modules, and the number of lightweight attention modules of the first type is two, and the number of lightweight attention modules of the second type is one.

[0101] The computational complexity of the K types of lightweight attention modules proposed in the embodiment of the present application for the current image is less than the predicted value. That is to say, the computational complexity of the K types of lightweight attention modules proposed in the embodiment of the present application for the current image is less than the computational complexity of RNAB shown in Figure 3A for the current image.

[0102] In some embodiments, the synthetic transformation network of the embodiment of the present application only includes the K types of lightweight attention modules, and does not include the RNAB shown in Figure 3A.

[0103] In some embodiments, the synthetic transformation network of the embodiments of the present application includes the K types of lightweight attention modules and includes at least one RNAB as shown in Figure 3A.

[0104] The embodiments of the present application do not limit the specific indicators for measuring the computational complexity of the lightweight attention module for the current image.

[0105] In one example, FLOPs (Floating Point Operations) can be used to measure the computational complexity of the lightweight attention module for the current image. For example, a smaller FLOPs value indicates a smaller computational complexity, and a larger FLOPs value indicates a greater computational complexity.

[0106] In another example, the computational complexity can be expressed as kmac / pixel=FLOPs / (1000*w*h), where h and w represent the height and width of the decoded image.

[0107] In some embodiments, the decoding end may measure the computational complexity of the lightweight attention module for the current image based on the overall computational complexity of decoding the current image by the decoding end.

[0108] In some embodiments, the above-mentioned preset value is a preset fixed value and does not change with changes in the image to be processed.

[0109] In some embodiments, the preset value is a preset value corresponding to the current image. That is, the preset value corresponding to different images may be different. Thus, in the embodiments of the present application, if the computational complexity of an attention module for the current image is less than the predicted value corresponding to the current image, the attention module can be considered a type of lightweight attention module.

[0110] In some embodiments, at least one RNAB in the synthetic transformation network shown in FIG. 3A above can be replaced with K types of lightweight attention modules proposed in the embodiments of the present application to reduce the computational complexity of the synthetic transformation network.

[0111] In some embodiments, at least one of the K types of lightweight attention modules proposed in the embodiment of the present application can be added to the synthetic transformation network shown in Figure 3B to improve the image processing capability of the synthetic transformation network.

[0112] In some embodiments, the synthetic transformation network of the embodiment of the present application only includes these K types of lightweight attention modules. The decoding end processes the transformation value of the current image through these K types of lightweight attention modules to obtain a reconstructed image of the current image.

[0113] In some embodiments, the synthetic transformation network of the embodiment of the present application also includes N convolutional layers, and M of the N convolutional layers are respectively connected to at least one lightweight attention module of the K types of lightweight attention modules.

[0114] In one example, M=N, that is, each of the N convolutional layers is connected to at least one lightweight attention module of the K types of lightweight attention modules, and the types of lightweight attention modules connected after different convolutional layers can be the same or different.

[0115] For example, as shown in Figure 5A, M=N=3, and the type of lightweight attention module connected to each of the three convolutional layers is the same. That is, each of the three convolutional layers is connected to two types of lightweight attention modules, for example, a first type of lightweight attention module and a second type of lightweight attention module. It should be noted that the number of first type lightweight attention modules connected to each of the three convolutional layers can be the same or different, and the number of second type lightweight attention modules connected to each of the three convolutional layers can be the same or different.

[0116] For another example, the type of lightweight attention module connected to each of the N convolutional layers is different, or the type of lightweight attention module connected to at least two of the N convolutional layers is different. For example, as shown in Figure 5B, M = N = 3, the first convolutional layer of the three convolutional layers is connected to the first type of lightweight attention module and the second type of lightweight attention module, the second convolutional layer is connected to the first type of lightweight attention module and the third type of lightweight attention module, and the third convolutional layer is connected to the third type of lightweight attention module.

[0117] In one example, M is less than N, that is, M convolutional layers in the N convolutional layers are respectively connected to at least one lightweight attention module of the K types of lightweight attention modules, and the types of lightweight attention modules connected after different convolutional layers in the M convolutional layers can be the same or different.

[0118] For example, as shown in Figure 5C, N = 3, M = 1, and the third convolutional layer of these three convolutional layers is connected to two types of lightweight attention modules, for example, the first type of lightweight attention module and the second type of lightweight attention module.

[0119] That is, in an embodiment of the present application, at least one type of lightweight attention module among the K types of lightweight attention modules can be connected after each of the N convolutional layers of the synthetic transformation network, and the types of lightweight attention modules connected after each of the N convolutional layers can be the same or different. Alternatively, at least one type of lightweight attention module among the K types of lightweight attention modules can be connected after some of the N convolutional layers of the synthetic transformation network, and the types of lightweight attention modules connected after each of the convolutional layers in these some convolutional layers can be the same or different.

[0120] In the embodiment of the present application, the data processing principles of the lightweight attention modules connected to each of the M convolutional layers of the synthetic transformation network are basically the same. For ease of description, at least one type of lightweight attention module connected after the i-th convolutional layer among the M convolutional layers is used as an example. In this case, the above S102 includes the following steps:

[0121] S102-A. At the decoding end, for the i-th convolutional layer among the M convolutional layers, processes the i-1th feature information of the current image through the i-th convolutional layer to obtain the i-th feature information of the current image, where the i-1th feature information is obtained based on the transformation value of the current image, where N is a positive integer, M is a positive integer less than or equal to N, and i is a positive integer less than or equal to M.

[0122] S102-B, the decoding end processes the i-th feature information through P types of lightweight attention modules connected to the i-th convolutional layer to obtain the i+1-th feature information of the current image;

[0123] S102-C: The decoding end determines a reconstructed image based on the (i+1)th feature information.

[0124] The above-mentioned i-th convolutional layer is any one of the M convolutional layers, and the i-th convolutional layer is connected to P types of lightweight attention modules, and these P types of lightweight attention modules are all or part of the above-mentioned K types of lightweight attention modules. For example, if P is less than K, it means that the i-th convolutional layer is connected to any P types of lightweight attention modules among the K types of lightweight attention modules. For another example, if P=K, it means that the i-th convolutional layer is connected to K types of lightweight attention modules. P is a positive integer, that is, the i-th convolutional layer can be connected to one type of lightweight attention module among the K types of lightweight attention modules, or to two or more types of lightweight attention modules among the K types of lightweight attention modules.

[0125] The embodiment of the present application does not limit the specific number of lightweight attention modules included in each of the P types. For example, the number of lightweight attention modules included in each of the P types can be one or more, and the number of lightweight attention modules included in different types can be the same or different.

[0126] The above-mentioned i-1th feature information is obtained based on the transformation value of the current image. For example, if the i-th convolutional layer is the first data processing layer in the synthetic transformation network, then the above-mentioned i-1th feature information is the transformation value of the current image. For another example, if the i-th convolutional layer is not the first data processing layer in the synthetic transformation network, then the above-mentioned i-1th feature information is the feature information after the transformation value of the current image is processed by other data processing layers located before the i-th convolutional layer in the synthetic transformation network. In other words, the i-1th feature information can be understood as the input information of the i-th convolutional layer.

[0127] As shown in Figure 6, the decoding end inputs the i-1th feature information of the current image into the i-th convolutional layer for convolution processing to obtain the i-th feature information of the current image. Next, the i-th feature information is input into the P types of lightweight attention modules connected to the i-th convolutional layer for attention calculation, and the calculation result is recorded as the i+1th feature information of the current image. Finally, based on the i+1th feature information, the reconstructed image of the current image is determined. For example, as shown in Figures 3A and 3B, the i+1th feature information is subjected to convolution, cropping, and other processing to obtain the reconstructed image of the current image.

[0128] The embodiment of the present application does not limit the specific connection method (or fusion method) of these P types of lightweight attention modules.

[0129] In some embodiments, these P types of lightweight attention modules are connected in series or in parallel.

[0130] In some embodiments, the above-mentioned P types of lightweight attention modules are divided into Q attention units, and each attention unit includes at least one type of lightweight attention module among the P types of lightweight attention modules.

[0131] The specific division methods of P types of lightweight attention modules into Q attention units include but are not limited to the following examples:

[0132] Example 1: The type of lightweight attention modules included in the same attention unit among the Q attention units is consistent (that is, it includes one type of lightweight attention module), and the types of lightweight attention modules included in different attention units are different.

[0133] For example, the decoding end can divide the same type of lightweight attention modules among P types of lightweight attention modules into the same attention unit, and then obtain P attention units, at this time Q=P.

[0134] For example, assume that the P types of lightweight attention modules include the first type of lightweight attention modules and the second type of lightweight attention modules, and the Q attention units include 2 attention units. In this way, the decoder can divide the first type of lightweight attention module into one attention unit and the second type of lightweight attention module into another attention unit. In this case, the two attention units include different types of lightweight attention modules.

[0135] Example 2: At least one of the Q attention units includes two or more types of lightweight attention modules.

[0136] In a possible implementation of this example 2, each of the Q attention units includes two or more types of lightweight attention modules. At this time, the type of lightweight attention module included in each of the Q attention units can be the same or different. For example, Q=2, the types of lightweight attention modules included in the two attention modules are the same, for example, both include a first type of lightweight attention module and a second type of lightweight attention module. For another example, Q=2, the types of lightweight attention modules included in the two attention units are not exactly the same, for example, the first attention unit includes a first type of lightweight attention module and a second type of lightweight attention module, and the second attention unit includes a third type of lightweight attention module and a second type of lightweight attention module.

[0137] In another possible implementation of Example 2, some of the Q attention units include two or more types of lightweight attention modules, while some include one type of lightweight attention module. For example, if Q = 3, two of the three attention units include two or more types of lightweight attention modules, while the other includes one type of lightweight attention module.

[0138] That is, in this example 2, some or all of the Q attention units include two or more types of lightweight attention modules.

[0139] Based on the above description, at this time, the above S102-B processes the i-th feature information through P types of lightweight attention modules connected to the i-th convolutional layer to obtain the i+1-th feature information of the current image, including: the decoding end processes the i-th feature information through Q attention units to obtain the i+1-th feature information, where Q is a positive integer less than or equal to P.

[0140] In this embodiment, the decoder can divide the P types of lightweight attention modules connected to the i-th convolutional layer into Q attention units, each of which includes at least one type of lightweight attention module from the P types. In this way, the decoder can process the i-th feature information through these Q attention units to obtain the i+1-th feature information.

[0141] The embodiment of the present application does not limit the specific connection method of the Q attention units.

[0142] In some embodiments, the Q attention units are connected in series. In this case, the decoding end can process the i-th feature information through the Q attention units connected in series to obtain the i+1-th feature information.

[0143] As shown in Figure 7A, Q = 2, and the two attention units are connected in series. The decoder inputs the i-th feature information into the first attention unit for processing, obtains the processed feature information 1, and then inputs the feature information 1 into the second attention unit for processing, outputting the i+1-th feature information.

[0144] In one example, if the same attention unit in the two attention units shown in FIG7A above includes a type of lightweight attention module. As shown in FIG7B , assuming that the synthetic transformation network includes 4 convolutional layers, the i-th convolutional layer is the third convolutional layer of the synthetic transformation network, the first attention unit includes a first type of lightweight attention module, denoted as lightweight attention module A, and the second attention unit includes a second type of lightweight attention module, denoted as lightweight attention module B. At this time, the lightweight attention module A and the lightweight attention module B after the i-th convolutional layer (i.e., the third convolutional layer) are connected in series. FIG7B is an example showing that the first type of lightweight attention module is located before the second type of lightweight attention module. The optional second type of lightweight attention module can also be located before the first type of lightweight attention module. In FIG7B is the transformation value (or transformation reconstruction value) of the current image, is the reconstructed image of the current image.

[0145] In some examples, the lightweight attention modules connected to other convolutional layers in the synthetic transformer network can be the same as the lightweight attention module connected to the i-th convolutional layer. For example, some or all of the convolutional layers in the synthetic transformer network are connected to the lightweight attention module A and the lightweight attention module B connected in series as shown in Figure 7B.

[0146] In some embodiments, the Q attention units are connected in series, and the inputs and outputs of the Q attention units are jump-connected, i.e., the Q attention units are connected in series and then jump-connected to the i-th feature information. In this case, the decoder can process the i-th feature information through the Q attention units connected in series to obtain the feature information a output by the last attention unit, and then fuse the feature information a with the i-th feature information to obtain the i+1-th feature information.

[0147] The embodiments of the present application do not limit the specific method of fusing feature information.

[0148] For example, the decoding end adds feature information a and feature information b to obtain fused feature information.

[0149] For another example, the decoding end adds feature information a and feature information b to obtain fused feature information.

[0150] For another example, the decoding end multiplies feature information a by feature information b, and then adds the result to feature information a (or feature information b) to obtain fused feature information.

[0151] For another example, the decoding end adds feature information a and feature information b, and then multiplies the result by feature information a (or feature information b) to obtain fused feature information.

[0152] As shown in Figure 7C, Q = 2. The two attention units are connected in series and then jump-connected to the i-th feature information. In this way, the decoder can input the i-th feature information into the first attention unit for processing, obtain processed feature information 1, and then input this feature information 1 into the second attention unit for processing, obtaining processed feature information 2. Then, feature information 2 output by the second attention unit is fused with the i-th feature information to obtain the i+1-th feature information.

[0153] In one example, if the same attention unit in the two attention units shown in FIG7C above includes a type of lightweight attention module. As shown in FIG7D , assuming that the synthetic transformation network includes 4 convolutional layers, the i-th convolutional layer is the third convolutional layer of the synthetic transformation network, the first attention unit includes a first type of lightweight attention module, denoted as lightweight attention module A, and the second attention unit includes a second type of lightweight attention module, denoted as lightweight attention module B. At this time, the lightweight attention module A and the lightweight attention module B after the i-th convolutional layer (i.e., the third convolutional layer) are jump-connected. FIG7D , as an example, shows that the first type of lightweight attention module is located before the second type of lightweight attention module. The optional second type of lightweight attention module can also be located before the first type of lightweight attention module.

[0154] In some examples, the lightweight attention modules connected to other convolutional layers in the synthetic transformer network can be the same as the lightweight attention modules connected to the i-th convolutional layer at the decoding end. For example, some or all of the convolutional layers in the synthetic transformer network are connected to the lightweight attention modules A and B with skip connections as shown in Figure 7D.

[0155] In some embodiments, the Q attention units are connected in parallel. In this case, the decoding end can divide the i-th feature information into Q first sub-feature information. For the j-th attention unit among the Q attention units, the decoding end processes the j-th first sub-feature information among the Q sub-feature information through the j-th attention unit to obtain the j-th second sub-feature information, where j is a positive integer less than or equal to Q. The decoding end then fuses the second sub-feature information output by the Q attention units to obtain the i+1-th feature information.

[0156] As shown in Figure 7E, Q = 2, and the two attention units are connected in parallel. In this way, the decoding end first divides the i-th feature information into 2 parts to obtain 2 first sub-feature information. Then, the decoding end inputs these 2 first sub-feature information into the corresponding attention units respectively. For example, the decoding end inputs the first first sub-feature information into the first attention unit to obtain the feature information output by the first attention unit, which is recorded as the first second sub-feature information. At the same time, the decoding end inputs the second first sub-feature information into the second attention unit to obtain the feature information output by the second attention unit, which is recorded as the second second sub-feature information. Then, the decoding end fuses the first second sub-feature information and the second second sub-feature information to obtain the i+1-th feature information.

[0157] The embodiment of the present application does not limit the manner in which the i-th feature information is divided into Q first sub-feature information.

[0158] For example, the decoding end divides the i-th feature information into Q first sub-feature information based on the scale of the i-th feature information. Correspondingly, the decoding end scales and concatenates the Q second sub-feature information to obtain the i+1-th feature information.

[0159] For another example, the decoding end divides the i-th feature information into the Q first sub-feature information according to the number of channels of the i-th feature information. That is, the decoding end divides the number of channels of the i-th feature information into Q parts to obtain Q first sub-feature information. Correspondingly, the decoding end splices the second sub-feature information output by the Q attention units according to the number of channels to obtain the i+1th feature information, that is, splicing the Q second sub-feature information on the channels to obtain the i+1th feature information.

[0160] In one example, if the same attention unit in the two attention units shown in Figure 7E above includes a type of lightweight attention module. As shown in Figure 7F, assuming that the synthetic transformation network includes 4 convolutional layers, the i-th convolutional layer is the third convolutional layer of the synthetic transformation network, the first attention unit includes a first type of lightweight attention module, denoted as lightweight attention module A, and the second attention unit includes a second type of lightweight attention module, denoted as lightweight attention module B. At this time, the lightweight attention module A and the lightweight attention module B after the i-th convolutional layer (i.e., the third convolutional layer) are connected in parallel. Figure 7F shows, as an example, that the first type of lightweight attention module is located above the second type of lightweight attention module, and the optional second type of lightweight attention module can also be located above the first type of lightweight attention module.

[0161] In some examples, the lightweight attention modules connected to other convolutional layers in the synthetic transformation network can be the same as the lightweight attention module connected to the i-th convolutional layer. For example, some or all of the convolutional layers in the synthetic transformation network are connected to the lightweight attention module A and lightweight attention module B connected in parallel as shown in Figure 7F.

[0162] In some examples, for each of the Q attention units mentioned above, if the attention unit includes multiple lightweight attention modules, these multiple lightweight attention modules can be connected in series, in parallel, or connected in other ways, and the embodiments of the present application do not limit this.

[0163] In some embodiments, for any one of the Q attention units, if the attention unit includes multiple lightweight attention modules, and these multiple lightweight attention modules are mixedly connected, that is, when they are connected in parallel and in series as shown in Figure 7G, some lightweight attention modules can divide the output feature information (for example, perform channel division) and input the divided feature information into two or more lightweight attention modules. For example, as shown in Figure 7G, a certain attention unit includes lightweight attention module a, lightweight attention module b, lightweight attention module c and lightweight attention module d, and lightweight attention module a is connected in series with lightweight attention module b, lightweight attention module c is connected in series with lightweight attention module d, and lightweight attention module a is connected in parallel with lightweight attention module c. First, the decoding end decomposes the feature information 1 input to the attention unit into two parts, namely feature information 11 and feature information 22, and inputs feature information 11 into lightweight attention module a, and inputs feature information 22 into lightweight attention module c. The lightweight attention module a can divide the output feature information into two parts, for example, according to the number of channels, and record them as sub-feature information a1 and sub-feature information a2, and input the sub-feature information a1 into the lightweight attention module b, and input the sub-feature information a2 into the lightweight attention module d. Optionally, the lightweight attention module c can also divide the output sub-feature information into two parts, for example, according to the number of channels, and record them as sub-feature information c1 and sub-feature information c2, and input the sub-feature information c1 into the lightweight attention module b, and input the sub-feature information c2 into the lightweight attention module d. In one example, the decoding end can concatenate the sub-feature information a1 and the sub-feature information c1 and input them into the lightweight attention module b, and concatenate the sub-feature information a2 and the sub-feature information c2 and input them into the lightweight attention module d. It should be noted that lightweight attention module a, lightweight attention module b, lightweight attention module c and lightweight attention module d can be lightweight attention modules of the same type, or lightweight attention modules of different types, or lightweight attention modules of some same types and some different types. The embodiments of the present application do not impose any restrictions on this.

[0164] The above describes the specific connection methods of the P types of lightweight attention modules connected after the i-th convolutional layer in the M convolutional layers in the synthetic transformation network. For example, these P types of lightweight attention modules can be connected in series, in parallel, or in skip connections. Of course, other connection methods are also possible, and the embodiments of this application are not limited to this.

[0165] In some embodiments, the connection method of the lightweight attention module connected after other convolutional layers in the M convolutional layers is the same as the connection method of the lightweight attention module after the i-th convolutional layer.

[0166] In some embodiments, the connection method of the lightweight attention modules connected after other convolutional layers in the M convolutional layers is different from the connection method of the lightweight attention modules after the i-th convolutional layer. For example, the various types of lightweight attention modules after the first convolutional layer in the M convolutional layers are connected in series, the various types of lightweight attention modules after the second convolutional layer are skip-connected, and the various types of lightweight attention modules after the third convolutional layer are connected in parallel, etc.

[0167] In some embodiments, in at least two of the M convolutional layers, the types of lightweight attention modules connected after the same convolutional layer are the same, and the types of lightweight attention modules connected after different convolutional layers are different.

[0168] For example, as shown in Figure 7H, assume that the synthetic transformer network includes four convolutional layers, and the second and third convolutional layers are connected to lightweight attention modules. For example, the second convolutional layer is connected to the first type of lightweight attention module, denoted as lightweight attention module A, and the third convolutional layer is connected to the second type of lightweight attention module, denoted as lightweight attention module B.

[0169] In some embodiments, before the decoding end processes the i-th feature information through P types of lightweight attention modules connected to the i-th convolutional layer to obtain the i+1-th feature information of the current image, it can downsample the i-th feature information to obtain the i-th feature information after downsampling, then process the i-th feature information after downsampling through P types of lightweight attention modules to obtain the i-th feature information after attention processing, and finally upsample the i-th feature information after attention processing to obtain the i+1-th feature information. That is to say, in an embodiment of the present application, before the decoding end performs attention calculation on the i-th feature information, it first downsamples to reduce the amount of data for attention calculation. In this way, when using P types of lightweight attention modules to perform attention calculation on the i-th feature information after downsampling, the processing speed of attention calculation can be improved, thereby improving the overall decoding efficiency. Finally, the i-th feature information after attention processing is upsampled to obtain the i+1-th feature information.

[0170] The embodiment of the present application does not limit the specific methods of downsampling and upsampling adopted by the decoding end, which can be determined according to actual needs.

[0171] In some embodiments, among the K types of lightweight attention modules included in the synthetic transformation network, at least one type of lightweight attention module includes an upsampling unit and a downsampling unit. In other words, the lightweight attention module can first downsample the input information, then perform attention calculation processing on the downsampled information, and then upsample it.

[0172] The following introduces different types of lightweight attention modules involved in the embodiments of the present application. It should be noted that the types of lightweight attention modules in the embodiments of the present application include but are not limited to the types shown in the following examples, and may also include lightweight attention modules expanded on the basis of any of the above types of lightweight attention modules, or other types of lightweight attention modules that are easily conceived by those skilled in the art.

[0173] In some embodiments, the P types of lightweight attention modules include a first type of lightweight attention module, and the first type of lightweight attention module includes a simplified non-local residual block. In this case, S102-B includes the following steps:

[0174] S102-B-a1: The decoding end processes the first feature information using a simplified local residual block to obtain second feature information, where the first feature information is obtained based on the i-th feature information;

[0175] S102-B-a2. The decoding end obtains the (i+1)th feature information based on the second feature information.

[0176] As shown in Figure 8A, the current RNAB consists of two parallel residual units, one of which consists of three residual blocks (RBs), and the other consists of six residual blocks (RBs), three convolutional layers, and a sigmoid function. Its structure is relatively complex.

[0177] In an embodiment of the present application, a simplified non-local residual block is proposed. The simplified non-local residual block can be understood as a lightweight RNAB.

[0178] The embodiments of the present application do not limit the specific network structure of the simplified non-local residual block. For example, it can be any structure that is simpler than the RNAB network structure shown in FIG8A . For example, a network structure with fewer convolutional layers, fewer residual blocks, or both fewer convolutional layers and fewer residual blocks than the RNAB network shown in FIG8A can serve as the simplified non-local residual block in the embodiments of the present application.

[0179] In an embodiment of the present application, if the P types of lightweight attention modules connected after the i-th convolutional layer include a first type of lightweight attention module, the decoding end can process the first feature information through a simplified local residual block to obtain the second feature information, and the first feature information is obtained based on the i-th feature information. For example, if the P types of lightweight attention modules are connected in series, and the first type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the above-mentioned first feature information is the i-th feature information. If the first type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the first feature information is the feature information obtained after processing the i-th feature information by the other types of lightweight attention modules located before the first type of lightweight attention module. If the P types of lightweight attention modules are connected in parallel, then the above-mentioned first feature information is the i-th feature information. For another example, if the P types of lightweight attention modules are jump-connected, then the above-mentioned first feature information is also the i-th feature information.

[0180] The decoding end processes the first feature information through a simplified local residual block (i.e., the first type of lightweight attention module) to obtain the second feature information, and then obtains the i+1th feature information based on the second feature information.

[0181] In one example, if the P types of lightweight attention modules are connected in series and the simplified local residual block is the last lightweight attention module among the P types of lightweight attention modules, the second feature information is determined as the i+1th feature information. If the simplified local residual block is not the last lightweight attention module among the P types of lightweight attention modules, the decoding end inputs the second feature information into other types of lightweight attention modules after the simplified local residual block for processing to obtain the i+1th feature information.

[0182] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the above-mentioned second feature information and the feature information output by lightweight attention modules of other types among the P types except the first type are fused (for example, channel splicing) and processed to obtain the i+1th feature information.

[0183] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the above-mentioned second feature information and the feature information output by lightweight attention modules of other types among the P types except the first type are fused (for example, channel splicing) to obtain fused feature information, and then the fused feature information is fused with the i-th feature information to obtain the i+1-th feature information.

[0184] In a possible implementation, as shown in FIG8B , the simplified local residual block in the embodiment of the present application includes a first residual unit and a second residual unit. In this case, the above S102-B-a1 includes the following steps:

[0185] S102-B-a11: The decoding end processes the first feature information through a first residual unit to obtain a first feature residual value;

[0186] S102-B-a12: The decoding end processes the first feature information through a second residual unit to obtain a second feature residual value;

[0187] S102-B-a13. The decoding end obtains the second feature information according to the first feature residual value, the second feature residual value and the first feature information.

[0188] In the embodiment of the present application, the first residual unit and the second residual unit are connected in parallel to perform residual processing on the first feature information to obtain the first feature residual value and the second feature residual value of the current image.

[0189] In some embodiments, the number of residual blocks included in the first residual unit is smaller than a first preset number, and / or the number of residual blocks included in the second residual unit is smaller than a second preset number.

[0190] The embodiment of the present application does not limit the specific values ​​of the first preset number and the second preset number. For example, the first preset number is 3 and the second preset number is 6. That is, the number of residual blocks included in the first residual unit is less than the number of residual blocks included in the upper residual unit in Figure 8A, and / or the number of residual blocks included in the second residual unit is less than the number of residual blocks included in the lower residual unit in Figure 8A. As a result, the simplified local residual block network structure proposed in the embodiment of the present application is simpler than the RNAB network structure shown in Figure 8A.

[0191] In some embodiments, at least one of the first residual unit and the second residual unit comprises a simplified residual block, which can be understood as a residual block with a simpler structure than an existing residual block.

[0192] In one example, the simplified residual block includes a convolutional layer.

[0193] As shown in FIG8C , the current residual block includes at least two convolutional layers, while the embodiment of the present application proposes a simplified residual block (RB), which includes only one convolutional layer, thereby reducing the computational complexity of the residual block.

[0194] In one example, as shown in FIG8D , the simplified residual block includes a convolution layer and an activation function, and also includes a skip connection. The input information x is processed by the convolution layer and then processed by the activation function, and is added to the input information x to obtain the output of the simplified residual block. The embodiment of the present application does not limit the specific size of the convolution layer shown in FIG8D . For example, the convolution kernel of the convolution layer is 3X3, with a step size of s1, or the convolution kernel of the convolution layer is 5X5, with a step size of s2, and so on. The embodiment of the present application does not limit the specific type of activation function included in the simplified residual block. For example, it can be a Rule activation function, a LeakyReLu activation function, and the like.

[0195] The embodiment of the present application does not limit the specific number of simplified residual blocks included in the first residual unit and the second residual unit.

[0196] In one example, the first residual unit and the second residual unit each include a simplified residual block. At this time, the simplified local residual block is shown in Figure 8E. The first feature information is processed by the simplified residual block in the first residual unit and the simplified residual block in the second residual unit respectively, and then multiplied. The multiplication result is added to the first feature information to obtain the second feature information.

[0197] In some embodiments, the at least one residual block shown in FIG. 8A may be replaced with a simplified residual block proposed in an embodiment of the present application as a simplified non-local residual block.

[0198] As can be seen from the above, in this embodiment, the decoding end inputs the first feature information into a simplified non-local residual block, processes the first feature information through the first residual unit to obtain a first feature residual value, and processes the first feature information through the second residual unit to obtain a second feature residual value. Next, the second feature information is obtained based on the first feature residual value, the second feature residual value, and the first feature information. For example, the first feature residual value and the second feature residual value are multiplied and then added to the first feature information to obtain the second feature information. For another example, the first feature residual value and the second feature residual value are multiplied and then convolved, and the convolution result is added to the first feature information to obtain the second feature information.

[0199] Since the network structure of the simplified non-local residual block proposed in the embodiment of the present application is simpler than the network structure of RNAB shown in Figures 3A and 8A above and has lower computational complexity, it reduces computational complexity while ensuring the image processing effect, thereby improving image decoding performance.

[0200] In some embodiments, as shown in FIG9A , the P types of lightweight attention modules in the embodiment of the present application include a second type of lightweight attention module, and the second type of lightweight attention module includes a window attention unit and a grid attention unit. In this case, the above S102-B includes the following steps:

[0201] S102-B-b1. The decoding end determines the first window size and the second window size corresponding to the i-th convolutional layer;

[0202] S102-B-b2: The decoding end determines third feature information based on the i-th feature information;

[0203] S102-B-b3: The decoding end divides the third feature information into multiple sub-blocks based on the first window size and the window attention unit, and performs local attention processing on the multiple sub-blocks to obtain local feature information of the current image;

[0204] S102-B-b4, the decoding end divides the local feature information of the current image into multiple grids based on the second window size and the grid attention unit, and performs global attention processing on the multiple grids to obtain global feature information of the current image;

[0205] S102-B-b5. The decoding end determines the (i+1)th feature information based on the global feature information of the current image.

[0206] The second type of lightweight attention module in the embodiment of the present application includes a window attention unit and a grid attention unit, wherein the window attention unit is used to divide the input into sub-blocks and perform local attention calculations on each sub-block. The grid attention unit is used to perform global attention calculations on the input. In other words, the embodiment of the present application uses the second type of lightweight attention module to perform local and global attention calculations on the i-th feature information to improve data processing efficiency.

[0207] In the embodiment of the present application, for the input feature map X∈R H×W×C , where H is the height of the input feature map, W is the width of the input feature map, and C is the number of channels of the input feature map. Instead of focusing attention on the flat spatial dimension HW, the window attention unit divides the first feature information into non-overlapping sub-blocks of size P×P according to the first window size, and focuses self-attention on the local spatial dimension (i.e., P×P), using this block of attention for local interaction.

[0208] At the same time, the embodiment of the present application uses a grid attention unit to grid the input into shapes (G×G, HG×WG, C) using a fixed G×G uniform grid, thereby generating a grid with adaptive size H / G×W / G. Self-attention is used on the decomposed grid axis (i.e. G×G) for global spatial blending.

[0209] It can be seen from this that in an embodiment of the present application, if the second type of lightweight attention module includes a window attention unit and a grid attention unit, the first window size and the second window size corresponding to the i-th convolutional layer are first determined.

[0210] Among them, the first window size can be understood as the window size corresponding to the window attention unit, and the second window size is the window corresponding to the grid attention unit.

[0211] The embodiment of the present application does not limit the specific values ​​of the first window size and the second window size.

[0212] In some embodiments, the first window sizes corresponding to different network layers are the same, and / or the second window sizes corresponding to different network layers are the same.

[0213] In some embodiments, different network layers correspond to different first window sizes, and / or different network layers correspond to different second window sizes.

[0214] In some embodiments, different window sizes can be set at different network layers to better capture the connections between each element in the latent variable while effectively controlling complexity. Exemplarily, S102-B-b1 includes determining at least one of a first window size and a second window size corresponding to the i-th convolutional layer based on the network depth of the i-th convolutional layer.

[0215] In this embodiment, different or different levels of first window sizes and / or second window sizes are set for the second type of lightweight attention modules of different network depths. For example, different first window sizes and / or second window sizes are set for the second type of lightweight attention modules of different network depths. Alternatively, different levels of first window sizes or second window sizes are set for the second type of lightweight attention modules of different network depth ranges.

[0216] In this way, the decoding end can determine the first window size and / or second window size corresponding to the i-th convolutional layer (or the second type of lightweight attention module) based on the network depth of the i-th convolutional layer (or the second type of lightweight attention module).

[0217] For example, a smaller first window and / or second window may be used in a shallow layer of the network, while a larger first window and / or second window may be used in a deep layer of the network. That is, if the network depth of the i-th convolutional layer (or the second type of lightweight attention module) is small, a smaller first window and / or second window is used. If the network depth of the i-th convolutional layer (or the second type of lightweight attention module) is large, a larger first window and / or second window is used.

[0218] It should be noted that the embodiment of the present application does not limit the execution order of S102-B-b2 and S102-B-b1, that is, the above-mentioned S102-B-b2 can be executed after the above-mentioned S102-B-b1, or before the above-mentioned S102-B-b1, or be executed synchronously with the above-mentioned S102-B-b1.

[0219] The embodiment of the present application does not limit the specific manner in which the decoding end determines the third feature information based on the i-th feature information.

[0220] For example, if P types of lightweight attention modules are connected in series, and the second type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the third feature information is the i-th feature information. If the second type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the third feature information is the feature information obtained by processing the i-th feature information by the other type of lightweight attention module located before the second type of lightweight attention module.

[0221] For another example, if the P types of lightweight attention modules are connected in parallel, the third feature information mentioned above is the i-th feature information.

[0222] For another example, if P types of lightweight attention modules are jump-connected, the third feature information mentioned above is also the i-th feature information.

[0223] Based on the above steps, the decoding end determines the first window size and the third feature information, and then divides the third feature information into multiple sub-blocks based on the first window size and the window attention unit, and performs local attention processing on the multiple sub-blocks to obtain the local feature information of the current image.

[0224] In some embodiments, before dividing the third feature information into a plurality of sub-blocks, the decoding end further processes the third feature information through other feature processing units to obtain processed third feature information.

[0225] The embodiment of the present application does not limit the specific network structure of the feature processing unit.

[0226] In one possible implementation, as shown in FIG9B , the second type of lightweight attention module further includes an inverted linear bottleneck unit with depthwise separable convolution. In this case, the above S102-B-b2 includes the step of S102-B-b21:

[0227] S102-B-b21. The decoding end extracts features of the third feature information through an inverted linear bottleneck unit with depthwise separable convolution to obtain processed third feature information.

[0228] The embodiment of the present application does not limit the specific network structure of the inverted linear bottleneck unit with depthwise separable convolution.

[0229] In one example, as shown in Figure 9C, the inverted linear bottleneck unit with depthwise separable convolution is MBConv, which includes the first convolution layer, the depth-wise (depthwise separable) convolution layer, the SE (Squeeze Excitation layer), and the second convolution layer. At this time, the above S102-B-b21 includes performing point-by-point convolution channel dimensionality increase on the i-th feature information through the first convolution layer, performing depth-wise convolution in the projected space after dimensionality increase, and the SE immediately following is used to enhance the representation of important channels. Finally, the second convolution layer is used again to perform point-by-point convolution to restore the dimension.

[0230] In one example, as shown in Figure 9D, the inverted linear bottleneck unit with depthwise separable convolution includes a first convolution layer, a squeeze-excitation layer (i.e., SE layer) and a second convolution layer. At this time, the above S102-B-b21 includes the following steps: performing channel dimensionality upscaling processing on the third feature information through the first convolution layer to obtain upscaling feature information; performing channel enhancement processing on the upscaling feature information through the squeeze-excitation layer to obtain enhanced feature information; performing channel dimensionality reduction processing on the enhanced feature information through the second convolution layer to obtain the processed third feature information.

[0231] Specifically, as shown in Figure 9D, the decoder inputs the third feature information into the first convolutional layer for channel dimensionality increase processing to obtain increased dimensional feature information, and then inputs the increased dimensional feature information into the SE layer for channel enhancement processing to obtain enhanced feature information. Next, the enhanced feature information is input into the second convolutional layer for channel dimensionality reduction processing to obtain reduced dimensional feature information, and the reduced dimensional feature information is fused with the third feature information to obtain the processed third feature information.

[0232] Exemplarily, the feature dimension of the dimensionality reduction feature information is equal to the feature dimension of the third feature information.

[0233] The embodiment of the present application does not limit the specific parameters of the first convolution layer and the second convolution layer.

[0234] Exemplarily, the first convolutional layer is a 1X1 convolutional layer.

[0235] Exemplarily, the second convolutional layer is a 1X1 convolutional layer.

[0236] Compared to the MBConv in Figure 9C, the inverted linear bottleneck unit with depthwise separable convolution shown in Figure 9D reduces the number of depth-wise convolution layers. Depth-wise convolution layers are typically followed by normalization, which is not very suitable for image compression tasks. Therefore, using the depthwise separable convolution unit shown in Figure 9D for image compression can improve image compression efficiency.

[0237] In some embodiments, the inverted linear bottleneck unit with depthwise separable convolution shown in FIG9D can be used as an improved MBConv.

[0238] Based on the above steps, the decoder determines the processed third feature information, as well as the first and second window sizes, and then executes steps S102-B-b3 and S102-B-b4. Specifically, the window attention unit divides the processed third feature information into multiple sub-blocks according to the first window size, and performs local attention processing on each of the multiple sub-blocks to obtain local feature information of the current image.

[0239] For example, for the processed third feature information X∈R H×W×C , according to the size of the first window, the processed third feature information is divided into multiple non-overlapping sub-blocks, each sub-block size is P×P, and finally self-attention calculation is performed in each window to obtain the local feature information of the current image.

[0240] The embodiments of the present application do not limit the specific network structure of the window attention unit.

[0241] In one possible implementation, as shown in Figure 9E , the window attention unit includes Block-SA (Block Self Attention) and FNN (Feed Forward Neural Network). For example, for each of the multiple sub-blocks, Block-SA first performs block-level self-attention calculations on the sub-block, and the calculation result is added to the sub-block to obtain the self-attention information of the sub-block. The self-attention information of the multiple sub-blocks is combined and input into the FNN for processing to obtain local feature information of the current image.

[0242] In one possible implementation, the window attention unit may include more or fewer modules than those in FIG9E , for example, adding at least one convolutional layer after the FNN shown in FIG9E , or adding at least one convolutional layer after the last addition operation shown in FIG9E , and so on.

[0243] After the decoding end obtains the local feature information of the current image through the window attention unit, the local feature information is input into the grid attention unit.

[0244] Specifically, the local feature information of the current image is divided into multiple grids according to the second window size, and global attention processing is performed on the multiple grids to obtain the global feature information of the current image.

[0245] For example, for the local feature information X1∈R H×W×C According to the second window size, the local feature information is uniformly gridded into (G×G, HG×WG, C), thereby generating a grid with adaptive size H / G×W / G. Self-attention is used on the decomposed grid axis (i.e., G×G) to perform global spatial blending to obtain the global feature information of the current image.

[0246] The embodiments of the present application do not limit the specific network structure of the grid attention unit.

[0247] In one possible implementation, as shown in FIG9F , the grid attention unit includes Grid-SA (Grid Self Attention) and FNN (Feed Forward Neural Network).

[0248] For example, the decoder first performs self-attention calculations on the entire grid using Grid-SA, and fuses the calculation results with local feature information to obtain the self-attention information of the entire grid. This self-attention information of the entire grid is input into the FNN for processing to obtain the global feature information of the current image.

[0249] In one possible implementation, the grid attention unit may include more or fewer modules than those in FIG9F , for example, adding at least one convolutional layer after the FNN shown in FIG9F , or adding at least one convolutional layer after the last addition operation shown in FIG9F , and so on.

[0250] After determining the global feature information of the current image based on the above steps, the decoding end determines the (i+1)th feature information according to the global feature information of the current image.

[0251] The embodiment of the present application does not limit the specific manner in which the decoding end determines the (i+1)th feature information based on the global feature information of the current image.

[0252] In one example, if the P types of lightweight attention modules are connected in series, and the second type of lightweight attention module is the last lightweight attention module among the P types of lightweight attention modules, the global feature information is determined as the i+1th feature information. If the second type of lightweight attention module is not the last lightweight attention module among the P types of lightweight attention modules, the decoding end inputs the global feature information into the other types of lightweight attention modules after the second type of lightweight attention module for processing to obtain the i+1th feature information.

[0253] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the above-mentioned global feature information and the feature information output by lightweight attention modules of other types among the P types except the second type are fused (for example, channel splicing) and processed to obtain the i+1th feature information.

[0254] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the decoding end fuses the above-mentioned global feature information and the feature information output by lightweight attention modules of other types among the P types except the second type (for example, channel splicing) to obtain fused feature information, and then fuses the fused feature information with the i-th feature information to obtain the i+1-th feature information.

[0255] In this embodiment, the proposed second type of lightweight attention module includes a window attention unit and a grid attention unit. As can be seen from the above, the window attention unit and the grid attention unit have simple structures, which in turn makes the entire second type of lightweight attention module simple in structure and low in computational complexity. Therefore, while ensuring image processing effects, it can reduce computational complexity and thus improve image decoding performance.

[0256] In some embodiments, as shown in FIG10A , the P types of lightweight attention modules in the embodiment of the present application include a third type of lightweight attention module, and the third type of lightweight attention module includes at least one of a multi-head transposed attention submodule and a gated feedforward network submodule. In this case, the above S102-B includes the following steps:

[0257] S102-B-c1. The decoding end processes the fourth feature information using at least one of the multi-head transposed attention submodule and the gated feedforward network submodule to obtain fifth feature information.

[0258] S102-B-c2. The decoding end determines the (i+1)th feature information based on the fifth feature information.

[0259] The fourth feature information is obtained based on the i-th feature information.

[0260] For example, if P types of lightweight attention modules are connected in series, and the third type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the fourth feature information is the i-th feature information. If the third type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the fourth feature information is the feature information obtained by processing the i-th feature information by the other type of lightweight attention module located before the third type of lightweight attention module.

[0261] For another example, if the P types of lightweight attention modules are connected in parallel, the fourth feature information mentioned above is the i-th feature information.

[0262] For another example, if P types of lightweight attention modules are jump-connected, the fourth feature information mentioned above is also the i-th feature information.

[0263] Then, the decoding end inputs the fourth feature information into the third type of lightweight attention module, and processes the fourth feature information through the multi-head transposition attention submodule and / or the gated feedforward network submodule in the third type of lightweight attention module to obtain the fifth feature information.

[0264] Among them, the multi-head transposition attention submodule is used to perform channel self-attention processing on the information input into the multi-head transposition attention submodule, and the gated feedforward network submodule is used to perform feature conversion processing on the information input into the gated feedforward network submodule.

[0265] In some embodiments, if the third type of lightweight attention module includes a multi-head transposed attention submodule and a gated feedforward network submodule, then the above S102-B-c1 includes the following steps:

[0266] S102-B-c11, the decoding end performs channel self-attention processing on the fourth feature information through the multi-head transposition attention sub-module to obtain sixth feature information;

[0267] S102-B-c12. The decoding end performs feature conversion processing on the sixth feature information through the gated feedforward network sub-module to obtain fifth feature information.

[0268] The third type of lightweight attention module in the embodiment of the present application includes a multi-head transposed attention submodule and a gated feedforward network submodule. The multi-head transposed attention submodule calculates self-attention on channels rather than on space, implicitly encoding global context information by calculating attention on channels. In addition, before calculating the self-attention map, depth-wise convolution operations are used to generate Q, K, and V, which can emphasize local information.

[0269] The embodiment of the present application does not limit the specific network structure of the multi-head transposition attention sub-module.

[0270] In one possible implementation, as shown in FIG10B , the multi-head transposed attention submodule includes a first feature processing unit, a second feature processing unit, and a third feature processing unit. In this case, the above S102-B-c11 includes the following steps:

[0271] S102-B-c111: The decoding end processes the fourth feature information through the first feature processing unit, the second feature processing unit, and the third feature processing unit, respectively, to obtain query information, key value information, and value item information;

[0272] S102-B-c112, the decoding end determines the transposed attention information according to the query information, the key value information and the value item information;

[0273] S102-B-c113, the decoding end obtains the sixth feature information based on the transposed attention information and the fourth feature information.

[0274] As shown in FIG10B , in an embodiment of the present application, the decoding end inputs the fourth feature information into the first feature processing unit for processing, outputting query information Q, which is also referred to as a query matrix. The fourth feature information is input into the second feature processing unit for processing, outputting key-value information K, which is also referred to as a key-value matrix. The fourth feature information is input into the third feature processing unit for processing, outputting value item information V, which is also referred to as a value item matrix. Furthermore, based on the query information, key-value information, and value item information, the transposed attention information is determined, and based on the transposed attention information and the fourth feature information, the sixth feature information is obtained.

[0275] The embodiment of the present application does not limit the specific method in which the decoding end determines the transposed attention information based on the query information, key information and value item information.

[0276] For example, the decoding end multiplies the query information Q, the key value information K and the value item information V to obtain the transposed attention information.

[0277] For another example, the decoder multiplies the query information Q and the key-value information K and then performs normalization processing. For example, the query information Q and the key-value information K are multiplied and then input into the softmax function for normalization processing, and the transposed attention map A is output. Then, the transposed attention map A is multiplied by the value item information V to obtain the transposed attention information.

[0278] The embodiment of the present application does not limit the specific network structure of the first feature processing unit, the second feature processing unit, and the third feature processing unit.

[0279] In one possible implementation, as shown in FIG10C , the first feature processing unit includes one convolutional layer and one deformable convolutional layer. The second feature processing unit includes one convolutional layer and one deformable convolutional layer. The third feature processing unit includes one convolutional layer and one deformable convolutional layer. Optionally, the convolutional layers included in the first, second, and third feature processing units may be the same or different. Optionally, the deformable convolutional layers included in the first, second, and third feature processing units may be the same or different.

[0280] Optionally, the convolution layer included in at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit is a 1X1 convolution layer.

[0281] Optionally, the deformable convolution layer included in at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit is a 3X3 deformable convolution layer.

[0282] In a possible implementation, at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit does not include a third convolutional layer, and a size of a convolution kernel of the third convolutional layer is a first preset value.

[0283] In an example, the third convolutional layer may be the 1X1 convolutional layer in FIG. 10C .

[0284] In one example, the third convolutional layer may be the 3X3 deformable convolutional layer in FIG10C .

[0285] That is, the multi-head transposed attention submodule shown in this implementation may not include at least one 1X1 convolution layer in Figure 10C. Alternatively, the multi-head transposed attention submodule shown in this implementation may not include at least one 3X3 deformable convolution layer in Figure 10C to reduce the computational complexity of the multi-head transposed attention submodule. Alternatively, the multi-head transposed attention submodule shown in this implementation includes fewer 1X1 convolution layers and / or fewer 3X3 deformable convolution layers than in Figure 10C.

[0286] In one example, if the first feature processing unit, the second feature processing unit, and the third feature processing unit do not include a 1X1 convolution layer, the network of the multi-head transposition attention submodule is shown in Figure 10D.

[0287] In some embodiments, as shown in Figure 10D, the multi-head transposed attention sub-module also includes a fourth convolutional layer. At this time, the decoding end obtains the sixth feature information based on the transposed attention information and the fourth feature information, including: processing the transposed attention information through the fourth convolutional layer and fusing it with the fourth feature information to obtain the sixth feature information.

[0288] This application does not limit the specific structure of the fourth convolutional layer.

[0289] Exemplarily, the fourth convolutional layer is a 1X1 convolutional layer.

[0290] In some embodiments, as shown in Figure 10E, the multi-head transposed attention sub-module does not include the fourth convolutional layer. At this time, the decoding end obtains the sixth feature information based on the transposed attention information and the fourth feature information, including: processing the transposed attention information and fusing it with the fourth feature information to obtain the sixth feature information.

[0291] In some embodiments, as shown in FIG10C , before inputting the fourth feature information into the first feature processing unit, the second feature processing unit, and the third feature processing unit, the solution end performs Norm processing, and inputs the normalized fourth feature information into the first feature processing unit, the second feature processing unit, and the third feature processing unit, respectively.

[0292] As can be seen from the above, in some embodiments, in order to reduce the computational complexity of the multi-head transposed attention submodule, compared to the MDTA (Multi-Dconv Head Transposed Attention, multi-head deformable convolution transposed attention) shown in Figure 10C, fewer 1X1 convolution layers, or fewer 3X3 deformable convolution layers, or fewer 1X1 convolution layers and 3X3 deformable convolution layers, to reduce the computational complexity of the multi-head transposed attention submodule and improve image processing efficiency. For example, the three 1X1 convolution layers on the left and / or the 1X1 convolution layer on the right in the MDTA shown in Figure 10C are reduced to obtain a multi-head transposed attention submodule with low computational complexity.

[0293] In some embodiments, at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit in the multi-head transposed attention submodule includes a residual block RB or a simplified residual block. That is, in this embodiment, the 1x1 convolution layer and the 3x3 convolution layer of any branch in the MDTA shown in 10C can be replaced with a residual block or a simplified residual block. Optionally, the last convolution layer (i.e., the 1x1 convolution layer in the lower right corner) can be removed to further reduce the complexity of the model. Optionally, the activation function in the simplified residual block can use LeakyReLU or other activation functions.

[0294] In some embodiments, the multi-head transposed attention submodule can be directly replaced by the simplified non-local residual block. As shown in the above embodiment, the simplified non-local residual block includes a first residual unit and a second residual unit, at least one of the first residual unit and the second residual unit includes one or more simplified residual blocks; or

[0295] The number of residual blocks included in the first residual unit is smaller than a first preset number, and / or the number of residual blocks included in the second residual unit is smaller than a second preset number.

[0296] In some embodiments, among the lightweight attention modules included in the synthetic transformation network, different lightweight attention modules correspond to multi-head transposition attention submodules with different numbers of heads. For example, some lightweight attention modules use head transposition attention submodules with a larger number of heads, while some lightweight attention modules use head transposition attention submodules with a smaller number of heads. For example, lightweight attention modules of different network depths correspond to multi-head transposition attention submodules with different numbers of heads.

[0297] Based on the above steps, the decoding end inputs the fourth feature information into the multi-head transposed attention submodule for channel self-attention processing. After obtaining the sixth feature information, the sixth feature information is input into the gated feedforward network submodule for feature conversion processing to obtain the fifth feature information.

[0298] The embodiment of the present application does not limit the specific network structure of the gated feedforward network submodule.

[0299] In one possible implementation, as shown in FIG10F , the gated feedforward network submodule includes a fourth feature processing unit and a fifth feature processing unit. In this case, the above S102-B-c12 includes the following steps:

[0300] S102-B-c121: The decoding end processes the sixth feature information through the fourth feature processing unit and the fifth feature processing unit respectively to obtain seventh feature information and eighth feature information;

[0301] S102-B-c122: The decoding end performs a dot product of the seventh feature information and the eighth feature information to obtain ninth feature information;

[0302] S102-B-c123. The decoding end obtains the fifth feature information based on the ninth feature information and the sixth feature information.

[0303] As shown in FIG10F , in this embodiment of the present application, the decoding end inputs the sixth feature information into the fourth feature processing unit for processing, outputting the seventh feature information. The sixth feature information is input into the fifth feature processing unit for processing, outputting the eighth feature information. The seventh feature information is dot-multiplied with the eighth feature information to obtain the ninth feature information. The fifth feature information is then obtained based on the ninth feature information and the sixth feature information.

[0304] The embodiment of the present application does not limit the specific network structure of the fourth feature processing unit and the fifth feature processing unit.

[0305] In one possible implementation, as shown in FIG10G , the fourth feature processing unit includes one convolutional layer and one deformable convolutional layer. The fifth feature processing unit includes one convolutional layer and one deformable convolutional layer. Optionally, the convolutional layers included in the fourth and fifth feature processing units may be the same or different. Optionally, the deformable convolutional layers included in the fourth and fifth feature processing units may be the same or different.

[0306] Optionally, the convolution layer included in at least one of the fourth feature processing unit and the fifth feature processing unit is a 1X1 convolution layer.

[0307] Optionally, the deformable convolution layer included in at least one of the fourth feature processing unit and the fifth feature processing unit is a 3X3 deformable convolution layer.

[0308] In a possible implementation, at least one of the fourth feature processing unit and the fifth feature processing unit does not include a fifth convolutional layer, and a size of a convolution kernel of the fifth convolutional layer is a second preset value.

[0309] In an example, the fifth convolutional layer may be the 1X1 convolutional layer in FIG10G .

[0310] In one example, the fifth convolutional layer may be the 3X3 deformable convolutional layer in FIG10G .

[0311] That is, the gated feedforward network submodule shown in this implementation may not include at least one 1X1 convolution layer in FIG10G . Alternatively, the gated feedforward network submodule shown in this implementation may not include at least one 3X3 deformable convolution layer in FIG10G to reduce the computational complexity of the gated feedforward network submodule. Alternatively, the gated feedforward network submodule shown in this implementation includes fewer 1X1 convolution layers and / or fewer 3X3 deformable convolution layers than FIG10G . For example, the two 1X1 convolution layers on the left side of FIG10G are reduced.

[0312] In one example, if neither the fourth feature processing unit nor the fifth feature processing unit includes a 1×1 convolutional layer, the network of the gated feedforward network submodule is shown in FIG10H .

[0313] In some embodiments, as shown in Figure 10H, the gated feedforward network sub-module also includes a sixth convolutional layer. At this time, the decoding end obtains the fifth feature information based on the ninth feature information and the sixth feature information, including: processing the ninth feature information through the sixth convolutional layer and fusing it with the sixth feature information to obtain the fifth feature information.

[0314] This application does not limit the specific structure of the sixth convolutional layer.

[0315] Exemplarily, the sixth convolutional layer is a 1X1 convolutional layer.

[0316] In some embodiments, as shown in Figure 10I, the gated feedforward network sub-module does not include the sixth convolutional layer. At this time, the decoding end obtains the fifth feature information based on the ninth feature information and the sixth feature information, including: fusing the ninth feature information and the sixth feature information to obtain the fifth feature information.

[0317] In some embodiments, before inputting the ninth feature information into the fourth feature processing unit and the fifth feature processing unit, the solution terminal performs Norm processing first, and inputs the normalized sixth feature information into the fourth feature processing unit and the fifth feature processing unit respectively.

[0318] As can be seen from the above, in some embodiments, in order to reduce the computational complexity of the gated feedforward network submodule, compared to the GDFN (Gated-Dconv Feed-Forward Network) shown in Figure 10G, fewer 1X1 convolutional layers, or fewer 3X3 deformable convolutional layers, or fewer 1X1 convolutional layers and 3X3 deformable convolutional layers are used to reduce the computational complexity of the multi-head transposed attention submodule and improve image processing efficiency. For example, by reducing the two 1X1 convolutional layers on the left and / or the 1X1 convolutional layer on the right in the GDFN shown in Figure 10G, a gated feedforward network submodule with low computational complexity is obtained.

[0319] In some embodiments, as shown in Figure 10F, the gated feedforward network sub-module of the embodiment of the present application also includes an activation function after the fifth feature processing unit, that is, the decoding end processes the second feature information through the fifth feature processing unit to obtain the fourth feature information, and then processes the fourth feature information through the activation function, and multiplies the processed fourth feature information with the third feature information and the fourth feature information to obtain the fifth feature information.

[0320] This embodiment of the present application does not limit the specific type of the activation function in Figure 10F.

[0321] In some embodiments, the activation function is GELU Activation.

[0322] In some embodiments, in order to further reduce the complexity of the gated feedforward network submodule, the activation function may be Sigmoid, ReLU, LeakyReLU, PReLU, ELU or other activation functions.

[0323] In some embodiments, at least one of the fourth feature processing unit and the fifth feature processing unit includes a residual block or a simplified residual block. That is, in this embodiment, the residual block RB or the simplified residual block simplified RB block can be used to replace the 1x1 and 3x3 convolutions of any branch in the gated feedforward network submodule. Optionally, the last convolution layer, that is, the 1x1 convolution layer in the lower right corner of the GDFN shown in Figure 10G, is removed to further reduce the complexity of the model. Optionally, the activation function in the simplified residual block can use LeakyReLU or other activation functions.

[0324] In some embodiments, the above-mentioned gated feedforward network submodule can be directly replaced by the above-mentioned simplified non-local residual block.

[0325] After determining the global feature information of the current image based on the above steps, the decoding end determines the (i+1)th feature information according to the global feature information of the current image.

[0326] The embodiment of the present application does not limit the specific manner in which the decoding end determines the (i+1)th characteristic information based on the fifth characteristic information.

[0327] In one example, if the P types of lightweight attention modules are connected in series, and the third type of lightweight attention module is the last lightweight attention module among the P types of lightweight attention modules, the decoding end determines the fifth feature information as the i+1th feature information. If the third type of lightweight attention module is not the last lightweight attention module among the P types of lightweight attention modules, the decoding end inputs the fifth feature information into the other types of lightweight attention modules after the third type of lightweight attention module for processing to obtain the i+1th feature information.

[0328] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the decoding end will fuse the above-mentioned fifth feature information and the feature information output by lightweight attention modules of other types among the P types except the third type (for example, channel splicing) and other processing to obtain the i+1th feature information.

[0329] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the decoding end will fuse the above-mentioned fifth feature information and the feature information output by lightweight attention modules of other types among the P types except the third type (for example, channel splicing) to obtain fused feature information, and then fuse the fused feature information with the i-th feature information to obtain the i+1-th feature information.

[0330] In this embodiment, the proposed third-type lightweight attention module includes at least one of a multi-head transposed attention submodule and a gated feedforward network submodule. As can be seen from the above, the simple structures of the multi-head transposed attention submodule and the gated feedforward network submodule reduce the computational complexity of the entire third-type lightweight attention module. Therefore, while maintaining image processing effectiveness, computational complexity can be reduced, thereby improving image decoding performance.

[0331] In some embodiments, as shown in FIG11 , the P types of lightweight attention modules in the embodiment of the present application include a fourth type of lightweight attention module, which includes a depthwise separable convolutional layer, a first convolutional layer, and a second convolutional layer. In this case, the above S102-B includes the following steps:

[0332] S102-B-d1, the decoding end processes the tenth feature information through a depthwise separable convolutional layer to obtain the eleventh feature information;

[0333] S102-B-d2: The decoding end obtains twelfth feature information based on the first convolutional layer and the eleventh feature information;

[0334] S102-B-d3, the decoding end obtains the thirteenth feature information based on the second convolutional layer and the twelfth feature information;

[0335] S102-B-d4, the decoding end fuses the thirteenth feature information and the tenth feature information to obtain the fourteenth feature information;

[0336] S102-B-d5. The decoding end obtains the (i+1)th feature information based on the fourteenth feature information.

[0337] In this embodiment, a lightweight attention module shown in FIG11 is proposed. The lightweight attention module can replace the RNBA in FIG2A above. Since the lightweight attention module has a simple structure and low computational complexity, it can improve the decoding efficiency of the image.

[0338] The tenth feature information is obtained based on the i-th feature information.

[0339] For example, if P types of lightweight attention modules are connected in series, and the fourth type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the tenth feature information is the i-th feature information. If the fourth type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the tenth feature information is the feature information obtained by processing the i-th feature information by a lightweight attention module of another type located before the fourth type of lightweight attention module.

[0340] For another example, if the P types of lightweight attention modules are connected in parallel, the tenth feature information mentioned above is the i-th feature information.

[0341] For another example, if P types of lightweight attention modules are jump-connected, the above-mentioned tenth feature information is also the i-th feature information.

[0342] Then, as shown in FIG11 , the decoding end inputs the tenth feature information into the depthwise separable convolutional layer for processing, inputs the eleventh feature information, and then obtains the twelfth feature information based on the first convolutional layer and the eleventh feature information.

[0343] The embodiment of the present application does not limit the specific manner in which the decoding end obtains the twelfth feature information based on the first convolutional layer and the eleventh feature information.

[0344] For example, the decoding end directly inputs the eleventh feature information into the first convolutional layer and outputs the twelfth feature information.

[0345] For another example, the decoder inputs the eleventh feature information into the normalization layer (layer-normolization, abbreviated as LN) for normalization processing to further reduce data complexity. Then, the normalized eleventh feature information is input into the first convolutional layer for processing to obtain the twelfth feature information.

[0346] Next, the decoding end obtains the thirteenth feature information based on the second convolutional layer and the twelfth feature information.

[0347] The embodiment of the present application does not limit the specific manner in which the decoding end obtains the thirteenth feature information based on the second convolutional layer and the twelfth feature information.

[0348] For example, the decoding end directly inputs the twelfth feature information into the second convolutional layer and outputs the thirteenth feature information.

[0349] For another example, the decoding end processes the twelfth feature information through an activation function (such as GELU), and inputs it into the second convolutional layer for processing to obtain the thirteenth feature information.

[0350] Finally, the decoding end fuses the thirteenth feature information and the tenth feature information to obtain the fourteenth feature information.

[0351] The embodiment of the present application does not limit the specific manner in which the decoding end obtains the fourteenth characteristic information by fusing the thirteenth characteristic information and the tenth characteristic information.

[0352] For example, the decoding end fuses the thirteenth feature information and the tenth feature information to obtain the fourteenth feature information.

[0353] For another example, the decoding end multiplies the thirteenth feature information by a certain coefficient and fuses it with the tenth feature information to obtain the fourteenth feature information.

[0354] The embodiments of the present application do not restrict the specific network structures of the depthwise separable convolutional layer, the first convolutional layer, and the second convolutional layer. In other words, the embodiments of the present application do not restrict the convolution kernel size and number of channels of the depthwise separable convolutional layer, the first convolutional layer, and the second convolutional layer.

[0355] In some embodiments, the convolution kernel of the depthwise separable convolution layer is 7×7, and the number of channels is 96. The convolution kernel of the first convolution layer is 1×1, and the number of channels is 384. The convolution kernel of the second convolution layer is 1×1, and the number of channels is 96.

[0356] In some embodiments, the convolution kernel of the depthwise separable convolution layer is larger than the preset convolution kernel. The embodiment of the present application does not limit the specific size of the preset convolution kernel. For example, the convolution kernel of the depthwise separable convolution layer is greater than or equal to 7×7.

[0357] Next, the decoding end obtains the (i+1)th feature information based on the fourteenth feature information determined above.

[0358] In one example, if the above-mentioned P types of lightweight attention modules are connected in series, and the fourth type of lightweight attention module is the last lightweight attention module among the P types of lightweight attention modules, then the above-mentioned fourteenth feature information is determined as the i+1th feature information. If the fourth type of lightweight attention module is not the last lightweight attention module among the P types of lightweight attention modules, the decoding end inputs the fourteenth feature information into the other types of lightweight attention modules after the fourth type of lightweight attention module for processing to obtain the i+1th feature information.

[0359] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the above-mentioned fourteenth feature information and the feature information output by the lightweight attention modules of other types among the P types except the fourth type are fused (for example, channel splicing) and processed to obtain the i+1th feature information.

[0360] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the above-mentioned fourteenth feature information and the feature information output by the lightweight attention modules of other types among the P types except the fourth type are fused (for example, channel splicing) to obtain fused feature information, and then the fused feature information is fused with the i-th feature information to obtain the i+1-th feature information.

[0361] The above description uses the P types of lightweight attention modules connected after the i-th convolutional layer of the synthetic transformer network as an example. The data processing process for at least one type of lightweight attention module connected after other convolutional layers in the M convolutional layers can refer to the data processing process for the P types of lightweight attention modules after the i-th convolutional layer.

[0362] In some embodiments, assuming that the number of channels of the input information to be input into the lightweight attention module is C, the input information with the number of channels C can be divided into several sub-input information with the number of channels a1, a1,…an (ensuring a1+a2+…+an=C), and several lightweight attention modules with the number of channels a1, a1,…an are set at the same time, and the above sub-input information is respectively input into the lightweight attention module with the corresponding number of channels to obtain the output results with the number of channels a1, a1,…an. For example, the sub-input information with the number of channels ai is input into the lightweight attention module with the number of channels ai for processing, and the output result with the number of channels ai is output. Then, the output results with the number of channels a1, a1,…an are spliced ​​to finally obtain the output result with the number of channels C.

[0363] In some embodiments, a resolution downsampling module may be added before at least one lightweight attention module in the synthetic transformation network proposed in the embodiments of the present application, and an upsampling module may be added after each lightweight attention module.

[0364] It should be noted that the types of lightweight attention modules proposed in this application example include but are not limited to the above types.

[0365] In an embodiment of the present application, the decoding end sets K types of lightweight attention modules in the synthetic transformation network, for example, connecting at least one type of lightweight attention module among the K types after at least one convolutional layer of the synthetic transformation network, so as to hierarchically construct the correlation between different positions of the latent variables, thereby reducing the bit rate loss, reducing the decoding time, improving the decoding efficiency and effectively controlling the complexity of the decoding.

[0366] In some embodiments, different numbers of lightweight attention modules can be used for the luma component and the chroma component, and can be arranged at different depths of the network.

[0367] In some embodiments, when the neural network that processes the luminance component and the chrominance component at the decoding end uses a new number of channels, it is necessary to readjust the parameters such as the position, number of channels, and window size of the lightweight attention module.

[0368] In some embodiments, when the decoding end uses a new bit rate point for decoding (such as a computer-generated animated picture or a picture of screen content), testing is required and the parameters such as the position, number of channels and window size of the lightweight attention module need to be adjusted again.

[0369] The image decoding method provided by the embodiment of the present application is that when the decoding end decodes the current image, it first decodes the code stream of the current image to obtain the residual value of the current image, and determines the transformation value of the current image based on the residual value; the transformation value of the current image is processed by a synthetic transformation network to obtain a reconstructed image of the current image, and the synthetic transformation network includes K types of lightweight attention modules, and the computational complexity of these K types of lightweight attention modules is less than a preset value. In other words, the embodiment of the present application proposes a new synthetic transformation network, which includes K types of lightweight attention modules, and the computational complexity of these K types of lightweight attention modules is less than a preset value. In this way, the synthetic transformation network processes the transformation value of the current image, and the reconstructed image of the current image obtained has a better effect and low computational complexity, thereby effectively controlling the image decoding complexity, reducing the decoding time, and improving the image decoding performance while improving the image processing effect.

[0370] The above describes the image decoding method according to the embodiment of the present application by taking the decoding end as an example. The following describes the image encoding method according to the embodiment of the present application by taking the encoding end as an example.

[0371] FIG12 is a flow chart of an image encoding method provided by an embodiment of the present application, which is applied to the encoder shown in FIG1. ​​As shown in FIG12, the method of the embodiment of the present application includes:

[0372] S201. Process the current image through an analysis transformation network to obtain a transformation value of the current image. The analysis transformation network includes K types of lightweight attention modules.

[0373] Among them, the computational complexity of K types of lightweight attention modules is less than the preset value.

[0374] The current analysis transformation network has the problem of incompatibility between computational complexity and image processing effect. In order to solve this technical problem, the embodiment of the present application proposes a new analysis transformation network, which includes K types of lightweight attention modules. The computational complexity of these K types of lightweight attention modules is less than a preset value. In this way, when the analysis transformation network encodes the current image, the encoding effect is good and the computational complexity is low, thereby effectively controlling the image encoding complexity and improving the image encoding performance while improving the image processing effect.

[0375] The embodiments of the present application do not limit the number of types of lightweight attention modules included in the analysis transformation network, and the specific number is determined according to actual needs. For example, the analysis transformation network includes one type of lightweight attention module, or the analysis transformation network includes multiple different types of lightweight attention modules.

[0376] In some embodiments, the number of lightweight attention modules of the same type included in the analysis-transformation network may be one or more. For example, the analysis-transformation network includes two types of lightweight attention modules, and the number of lightweight attention modules of the first type is two, and the number of lightweight attention modules of the second type is one.

[0377] The computational complexity of the K types of lightweight attention modules proposed in the embodiment of the present application for the current image is less than the predicted value. That is to say, the computational complexity of the K types of lightweight attention modules proposed in the embodiment of the present application for the current image is less than the computational complexity of RNAB shown in Figure 3A for the current image.

[0378] In some embodiments, the analysis transformation network of the embodiment of the present application only includes the K types of lightweight attention modules, and does not include the RNAB shown in Figure 3A.

[0379] In some embodiments, the analysis transformation network of the embodiments of the present application includes the K types of lightweight attention modules and includes at least one RNAB as shown in Figure 3A.

[0380] The embodiments of the present application do not limit the specific indicators for measuring the computational complexity of the lightweight attention module for the current image.

[0381] In some embodiments, at least one RNAB in the analysis transformation network shown in FIG. 3A above can be replaced with K types of lightweight attention modules proposed in the embodiments of the present application to reduce the computational complexity of the analysis transformation network.

[0382] In some embodiments, at least one of the K types of lightweight attention modules proposed in the embodiment of the present application can be added to the analysis transformation network shown in Figure 3B to improve the image processing capability of the analysis transformation network.

[0383] In some embodiments, the analysis transformation network of the embodiment of the present application only includes these K types of lightweight attention modules, and the encoding end processes the current image through these K types of lightweight attention modules to obtain the transformation value of the current image.

[0384] In some embodiments, the analysis transformation network of the embodiment of the present application also includes N convolutional layers, and M of the N convolutional layers are respectively connected to at least one lightweight attention module of the K types of lightweight attention modules.

[0385] In one example, M=N, that is, each of the N convolutional layers is connected to at least one lightweight attention module of the K types of lightweight attention modules, and the types of lightweight attention modules connected after different convolutional layers can be the same or different.

[0386] For example, as shown in Figure 5A, M=N=3, and the type of lightweight attention module connected to each of the three convolutional layers is the same. That is, each of the three convolutional layers is connected to two types of lightweight attention modules, for example, a first type of lightweight attention module and a second type of lightweight attention module. It should be noted that the number of first type lightweight attention modules connected to each of the three convolutional layers can be the same or different, and the number of second type lightweight attention modules connected to each of the three convolutional layers can be the same or different.

[0387] For another example, the type of lightweight attention module connected to each of the N convolutional layers is different, or the type of lightweight attention module connected to at least two of the N convolutional layers is different. For example, as shown in Figure 5B, M = N = 3, the first convolutional layer of the three convolutional layers is connected to the first type of lightweight attention module and the second type of lightweight attention module, the second convolutional layer is connected to the first type of lightweight attention module and the third type of lightweight attention module, and the third convolutional layer is connected to the third type of lightweight attention module.

[0388] In one example, M is less than N, that is, M convolutional layers in the N convolutional layers are respectively connected to at least one lightweight attention module of the K types of lightweight attention modules, and the types of lightweight attention modules connected after different convolutional layers in the M convolutional layers can be the same or different.

[0389] For example, as shown in Figure 5C, N = 3, M = 1, and the third convolutional layer of these three convolutional layers is connected to two types of lightweight attention modules, for example, the first type of lightweight attention module and the second type of lightweight attention module.

[0390] That is, in an embodiment of the present application, at least one type of lightweight attention module among the K types of lightweight attention modules can be connected after each of the N convolutional layers in the analysis transformation network, and the types of lightweight attention modules connected after each of the N convolutional layers can be the same or different. Alternatively, at least one type of lightweight attention module among the K types of lightweight attention modules can be connected after some of the N convolutional layers in the analysis transformation network, and the types of lightweight attention modules connected after each of the convolutional layers in these some convolutional layers can be the same or different.

[0391] In the embodiment of the present application, the data processing principles of the lightweight attention modules connected to each of the M convolutional layers of the analysis transformation network are basically the same. For ease of description, at least one type of lightweight attention module connected after the i-th convolutional layer among the M convolutional layers is used as an example. In this case, the above S201 includes the following steps:

[0392] S201-A. The encoder processes, for the i-th convolutional layer among the M convolutional layers, the i-th convolutional layer on the i-1th feature information of the current image to obtain the i-th feature information of the current image, where the i-1th feature information is obtained based on the current image, where N is a positive integer, M is a positive integer less than or equal to N, and i is a positive integer less than or equal to M.

[0393] S201-B, the encoder processes the i-th feature information through P types of lightweight attention modules connected to the i-th convolutional layer to obtain the i+1-th feature information of the current image;

[0394] S201-C: The encoding end determines a transformation value of the current image based on the (i+1)th feature information.

[0395] The above-mentioned i-th convolutional layer is any one of the M convolutional layers, and the i-th convolutional layer is connected to P types of lightweight attention modules, and these P types of lightweight attention modules are all or part of the above-mentioned K types of lightweight attention modules. For example, if P is less than K, it means that the i-th convolutional layer is connected to any P types of lightweight attention modules among the K types of lightweight attention modules. For another example, if P=K, it means that the i-th convolutional layer is connected to K types of lightweight attention modules. P is a positive integer, that is, the i-th convolutional layer can be connected to one type of lightweight attention module among the K types of lightweight attention modules, or to two or more types of lightweight attention modules among the K types of lightweight attention modules.

[0396] The embodiment of the present application does not limit the specific number of lightweight attention modules included in each of these P types. For example, the number of lightweight attention modules included in each of these P types can be one or more, and the number of lightweight attention modules included in different types can be the same or different.

[0397] The above-mentioned i-1th feature information is obtained based on the current image. For example, if the i-th convolutional layer is the first data processing layer in the analysis transformation network, then the above-mentioned i-1th feature information is the current image. For another example, if the i-th convolutional layer is not the first data processing layer in the analysis transformation network, then the above-mentioned i-1th feature information is the feature information after the current image is processed by other data processing layers in the analysis transformation network located before the i-th convolutional layer. In other words, the i-1th feature information can be understood as the input information of the i-th convolutional layer.

[0398] As shown in Figure 6, the encoder inputs the i-1th feature information of the current image into the i-th convolutional layer for convolution processing to obtain the i-th feature information of the current image. Next, the encoder inputs the i-th feature information into the P types of lightweight attention modules connected to the i-th convolutional layer for attention calculation, and records the calculation result as the i+1th feature information of the current image. Finally, the encoder determines the transformation value of the current image based on the i+1th feature information. For example, as shown in Figures 3A and 3B, the i+1th feature information is subjected to convolution, crop, and other processing to obtain the transformation value of the current image.

[0399] The embodiment of the present application does not limit the specific connection method (or fusion method) of these P types of lightweight attention modules.

[0400] In some embodiments, these P types of lightweight attention modules are connected in series or in parallel.

[0401] In some embodiments, the above-mentioned P types of lightweight attention modules are divided into Q attention units, and each attention unit includes at least one type of lightweight attention module among the P types of lightweight attention modules.

[0402] The specific division methods of P types of lightweight attention modules into Q attention units include but are not limited to the following examples:

[0403] Example 1: The type of lightweight attention modules included in the same attention unit among the Q attention units is consistent (that is, it includes one type of lightweight attention module), and the types of lightweight attention modules included in different attention units are different.

[0404] For example, the same type of lightweight attention modules among P types of lightweight attention modules can be divided into the same attention unit, and then P attention units can be obtained, and then Q=P.

[0405] For example, assuming that the P types of lightweight attention modules include the first type of lightweight attention modules and the second type of lightweight attention modules, and the Q attention units include 2 attention units. In this way, the first type of lightweight attention module can be divided into one attention unit, and the second type of lightweight attention module can be divided into another attention unit. In this case, the two attention units include different types of lightweight attention modules.

[0406] Example 2: At least one of the Q attention units includes two or more types of lightweight attention modules.

[0407] In a possible implementation of this example 2, each of the Q attention units includes two or more types of lightweight attention modules. At this time, the type of lightweight attention module included in each of the Q attention units can be the same or different. For example, Q=2, the types of lightweight attention modules included in the two attention modules are the same, for example, both include a first type of lightweight attention module and a second type of lightweight attention module. For another example, Q=2, the types of lightweight attention modules included in the two attention units are not exactly the same, for example, the first attention unit includes a first type of lightweight attention module and a second type of lightweight attention module, and the second attention unit includes a third type of lightweight attention module and a second type of lightweight attention module.

[0408] In another possible implementation of Example 2, some of the Q attention units include two or more types of lightweight attention modules, while some include one type of lightweight attention module. For example, if Q = 3, two of the three attention units include two or more types of lightweight attention modules, while the other includes one type of lightweight attention module.

[0409] That is, in this example 2, some or all of the Q attention units include two or more types of lightweight attention modules.

[0410] Based on the above description, at this time, the above S201-B processes the i-th feature information through P types of lightweight attention modules connected to the i-th convolutional layer to obtain the i+1-th feature information of the current image, including: processing the i-th feature information through Q attention units to obtain the i+1-th feature information, where Q is a positive integer less than or equal to P.

[0411] In this embodiment, the P types of lightweight attention modules connected to the i-th convolutional layer can be divided into Q attention units, each of which includes at least one type of lightweight attention module from the P types. In this way, the encoder can process the i-th feature information through these Q attention units to obtain the i+1-th feature information.

[0412] The embodiment of the present application does not limit the specific connection method of the Q attention units.

[0413] In some embodiments, the Q attention units are connected in series. In this case, the encoder can process the i-th feature information through the Q attention units connected in series to obtain the i+1-th feature information.

[0414] As shown in Figure 7A, Q = 2, and the two attention units are connected in series. The encoder inputs the i-th feature information into the first attention unit for processing. After obtaining the processed feature information 1, the feature information 1 is input into the second attention unit for processing, and the i+1-th feature information is output.

[0415] In one example, if the same attention unit in the two attention units shown in FIG7A includes a type of lightweight attention module. As shown in FIG7B , assuming that the analysis transformation network includes 4 convolutional layers, the i-th convolutional layer is the third convolutional layer of the analysis transformation network, the first attention unit includes the first type of lightweight attention module, denoted as lightweight attention module A, and the second attention unit includes the second type of lightweight attention module, denoted as lightweight attention module B. At this time, the lightweight attention module A and the lightweight attention module B after the i-th convolutional layer (i.e., the third convolutional layer) are connected in series.

[0416] In some examples, the lightweight attention modules connected to other convolutional layers in the M convolutional layers of the analysis transformation network can be the same as the lightweight attention module connected to the i-th convolutional layer. For example, some or all of the convolutional layers of the analysis transformation network can be connected to the lightweight attention module A and the lightweight attention module B connected in series as shown in Figure 7B.

[0417] In some embodiments, the Q attention units are connected in series, and the inputs and outputs of the Q attention units are jump-connected, i.e., the Q attention units are connected in series and then jump-connected to the i-th feature information. In this case, the encoder can process the i-th feature information through the Q attention units connected in series to obtain processed feature information, and then fuse the processed feature information with the i-th feature information to obtain the i+1-th feature information.

[0418] As shown in Figure 7C, Q = 2. The two attention units are connected in series and then jump-connected to the i-th feature information. In this way, the encoder can input the i-th feature information into the first attention unit for processing, obtain processed feature information 1, and then input this feature information 1 into the second attention unit for processing, obtaining processed feature information 2. Then, feature information 2 output by the second attention unit is fused with the i-th feature information to obtain the i+1-th feature information.

[0419] In one example, if the same attention unit in the two attention units shown in FIG7C includes a type of lightweight attention module. As shown in FIG7D , assuming that the analysis transformation network includes 4 convolutional layers, the i-th convolutional layer is the third convolutional layer of the analysis transformation network, the first attention unit includes the first type of lightweight attention module, denoted as lightweight attention module A, and the second attention unit includes the second type of lightweight attention module, denoted as lightweight attention module B. At this time, the lightweight attention module A and the lightweight attention module B after the i-th convolutional layer (i.e., the third convolutional layer) are jump-connected.

[0420] In some examples, the lightweight attention modules connected to other convolutional layers in the M convolutional layers of the analysis transformation network can be the same as the lightweight attention module connected to the i-th convolutional layer. For example, some or all of the convolutional layers of the analysis transformation network can be connected to the lightweight attention module A and the lightweight attention module B with skip connections as shown in Figure 7D.

[0421] In some embodiments, the Q attention units are connected in parallel. In this case, the encoder can divide the i-th feature information into Q first sub-feature information; for the j-th attention unit among the Q attention units, the j-th attention unit processes the j-th first sub-feature information among the Q sub-feature information to obtain the j-th second sub-feature information, where j is a positive integer less than or equal to Q; and the second sub-feature information output by the Q attention units is fused to obtain the i+1-th feature information.

[0422] As shown in Figure 7E, Q = 2, and the two attention units are connected in parallel. In this way, the encoding end first divides the i-th feature information into 2 parts to obtain 2 first sub-feature information. Then, these 2 first sub-feature information are respectively input into the corresponding attention units. For example, the first first sub-feature information is input into the first attention unit to obtain the feature information output by the first attention unit, which is recorded as the first second sub-feature information. At the same time, the second first sub-feature information is input into the second attention unit to obtain the feature information output by the second attention unit, which is recorded as the second second sub-feature information. Then, the first second sub-feature information and the second second sub-feature information are fused to obtain the i+1-th feature information.

[0423] The embodiment of the present application does not limit the manner in which the i-th feature information is divided into Q first sub-feature information.

[0424] For example, the encoder divides the i-th feature information into Q first sub-feature information based on the scale of the i-th feature information. Correspondingly, the encoder concatenates the Q second sub-feature information to obtain the i+1-th feature information.

[0425] For another example, the encoder divides the i-th feature information into the Q first sub-feature information according to the number of channels of the i-th feature information. That is, the encoder divides the number of channels of the i-th feature information into Q parts to obtain Q first sub-feature information. Correspondingly, the second sub-feature information output by the Q attention units is spliced ​​according to the number of channels to obtain the i+1th feature information, that is, the Q second sub-feature information is spliced ​​according to the number of channels to obtain the i+1th feature information.

[0426] In one example, if the same attention unit in the two attention units shown in FIG7E includes a type of lightweight attention module. As shown in FIG7F , assuming that the analysis transformation network includes 4 convolutional layers, the i-th convolutional layer is the third convolutional layer of the analysis transformation network, the first attention unit includes the first type of lightweight attention module, denoted as lightweight attention module A, and the second attention unit includes the second type of lightweight attention module, denoted as lightweight attention module B. At this time, the lightweight attention module A and the lightweight attention module B after the i-th convolutional layer (i.e., the third convolutional layer) are connected in parallel.

[0427] In some examples, the lightweight attention modules connected to other convolutional layers in the analysis transformation network can be the same as the lightweight attention module connected to the i-th convolutional layer. For example, some or all of the convolutional layers in the analysis transformation network can be connected to the lightweight attention module A and lightweight attention module B connected in parallel as shown in Figure 7F.

[0428] In some examples, for each of the Q attention units mentioned above, if the attention unit includes multiple lightweight attention modules, these multiple lightweight attention modules can be connected in series, in parallel, or connected in other ways, and the embodiments of the present application do not limit this.

[0429] The above describes the specific connection methods of the P types of lightweight attention modules connected after the i-th convolutional layer in the M convolutional layers in the analysis transformation network. For example, these P types of lightweight attention modules can be connected in series, in parallel, or in skip connections. Of course, other connection methods are also possible, and the embodiments of this application are not limited to this.

[0430] In some embodiments, the connection method of the lightweight attention module connected after other convolutional layers in the M convolutional layers is the same as the connection method of the lightweight attention module after the i-th convolutional layer.

[0431] In some embodiments, the connection method of the lightweight attention modules connected after other convolutional layers in the M convolutional layers is different from the connection method of the lightweight attention modules after the i-th convolutional layer. For example, the various types of lightweight attention modules after the first convolutional layer in the M convolutional layers are connected in series, the various types of lightweight attention modules after the second convolutional layer are skip-connected, and the various types of lightweight attention modules after the third convolutional layer are connected in parallel, etc.

[0432] In some embodiments, in at least two of the M convolutional layers, the types of lightweight attention modules connected after the same convolutional layer are the same, and the types of lightweight attention modules connected after different convolutional layers are different.

[0433] For example, as shown in Figure 7H, assume that the analysis transformation network includes four convolutional layers, and the second and third convolutional layers are connected to lightweight attention modules. For example, the second convolutional layer is connected to the first type of lightweight attention module, denoted as lightweight attention module A, and the third convolutional layer is connected to the second type of lightweight attention module, denoted as lightweight attention module B.

[0434] In some embodiments, before the encoding end processes the i-th feature information through P types of lightweight attention modules connected to the i-th convolutional layer to obtain the i+1-th feature information of the current image, it can downsample the i-th feature information to obtain the i-th feature information after downsampling, then process the i-th feature information after downsampling through P types of lightweight attention modules to obtain the i-th feature information after attention processing, and finally upsample the i-th feature information after attention processing to obtain the i+1-th feature information. That is to say, in an embodiment of the present application, before the encoding end performs attention calculation on the i-th feature information, it first downsamples to reduce the amount of data for attention calculation. In this way, when using P types of lightweight attention modules to perform attention calculation on the i-th feature information after downsampling, the processing speed of attention calculation can be improved, thereby improving the overall decoding efficiency. Finally, the i-th feature information after attention processing is upsampled to obtain the i+1-th feature information.

[0435] The embodiment of the present application does not limit the specific methods of downsampling and upsampling adopted by the encoding end, which can be determined according to actual needs.

[0436] The following introduces different types of lightweight attention modules involved in the embodiments of the present application. It should be noted that the types of lightweight attention modules in the embodiments of the present application include but are not limited to the types shown in the following examples, and may also include lightweight attention modules expanded on the basis of any of the above types of lightweight attention modules, or other types of lightweight attention modules that are easily conceived by those skilled in the art.

[0437] In some embodiments, the P types of lightweight attention modules include a first type of lightweight attention module, and the first type of lightweight attention module includes a simplified non-local residual block. In this case, S201-B includes the following steps:

[0438] S201-B-a1: The encoder processes the first feature information using a simplified local residual block to obtain second feature information, where the first feature information is obtained based on the i-th feature information.

[0439] S201-B-a2. The encoding end obtains the (i+1)th feature information based on the second feature information.

[0440] As shown in Figure 8A, the current RNAB consists of two parallel residual units, one of which consists of three residual blocks (RBs), and the other consists of six residual blocks (RBs), three convolutional layers, and a sigmoid function. Its structure is relatively complex.

[0441] In an embodiment of the present application, a simplified non-local residual block is proposed. The simplified non-local residual block can be understood as a lightweight RNAB.

[0442] The embodiments of the present application do not limit the specific network structure of the simplified non-local residual block. For example, it can be any structure that is simpler than the RNAB network structure shown in FIG8A . For example, a network structure with fewer convolutional layers, fewer residual blocks, or both fewer convolutional layers and fewer residual blocks than the RNAB network shown in FIG8A can serve as the simplified non-local residual block in the embodiments of the present application.

[0443] In an embodiment of the present application, if the P types of lightweight attention modules connected after the i-th convolutional layer include a first type of lightweight attention module, the encoding end can process the first feature information through a simplified local residual block to obtain second feature information, where the first feature information is obtained based on the i-th feature information.

[0444] For example, if P types of lightweight attention modules are connected in series, and the first type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the first feature information is the i-th feature information. If the first type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the first feature information is the feature information obtained by processing the i-th feature information by the other types of lightweight attention modules located before the first type of lightweight attention module.

[0445] For another example, if the P types of lightweight attention modules are connected in parallel, the above-mentioned first feature information is the i-th feature information.

[0446] For another example, if P types of lightweight attention modules are jump-connected, the above-mentioned first feature information is also the i-th feature information.

[0447] The encoding end processes the first feature information through a simplified local residual block (i.e., the first type of lightweight attention module) to obtain the second feature information, and then obtains the i+1th feature information based on the second feature information.

[0448] In one example, if the P types of lightweight attention modules are connected in series and the simplified local residual block is the last lightweight attention module among the P types of lightweight attention modules, the second feature information is determined as the i+1th feature information. If the simplified local residual block is not the last lightweight attention module among the P types of lightweight attention modules, the encoder inputs the second feature information into other types of lightweight attention modules after the simplified local residual block for processing to obtain the i+1th feature information.

[0449] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the above-mentioned second feature information and the feature information output by lightweight attention modules of other types among the P types except the first type are fused (for example, channel splicing) and processed to obtain the i+1th feature information.

[0450] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the encoding end will fuse the above-mentioned second feature information and the feature information output by lightweight attention modules of other types among the P types except the first type (for example, channel splicing) to obtain fused feature information, and then fuse the fused feature information with the i-th feature information to obtain the i+1-th feature information.

[0451] In a possible implementation, as shown in FIG8B , the simplified local residual block in the embodiment of the present application includes a first residual unit and a second residual unit. In this case, the above S201-B-a1 includes the following steps:

[0452] S201-B-a11: The encoder processes the first feature information through a first residual unit to obtain a first feature residual value;

[0453] S201-B-a12: The encoder processes the first feature information through a second residual unit to obtain a second feature residual value;

[0454] S201-B-a13. The encoding end obtains the second feature information based on the first feature residual value, the second feature residual value and the first feature information.

[0455] In the embodiment of the present application, the first residual unit and the second residual unit are connected in parallel to perform residual processing on the first feature information to obtain the first feature residual value and the second feature residual value of the current image.

[0456] In some embodiments, the number of residual blocks included in the first residual unit is smaller than a first preset number, and / or the number of residual blocks included in the second residual unit is smaller than a second preset number.

[0457] That is to say, the number of residual blocks included in the first residual unit is smaller than the number of residual blocks included in the upper residual unit in FIG8A, and / or the number of residual blocks included in the second residual unit is smaller than the number of residual blocks included in the lower residual unit in FIG8A, thereby making the network structure of the simplified local residual block proposed in the embodiment of the present application simpler than the RNAB network structure shown in FIG8A.

[0458] In some embodiments, at least one of the first residual unit and the second residual unit comprises a simplified residual block, which can be understood as a residual block with a simpler structure than an existing residual block.

[0459] In one example, the simplified residual block includes a convolutional layer.

[0460] As shown in FIG8C , the current residual block includes at least two convolutional layers, while the embodiment of the present application proposes a simplified residual block (RB), which includes only one convolutional layer, thereby reducing the computational complexity of the residual block.

[0461] In one example, as shown in FIG8D , the simplified residual block includes a convolutional layer and an activation function.

[0462] The embodiment of the present application does not limit the specific number of simplified residual blocks included in the first residual unit and the second residual unit.

[0463] In one example, the first residual unit and the second residual unit each include a simplified residual block. In this case, the simplified non-local residual block is shown in Figure 8E. The first feature information is processed by the simplified residual block in the first residual unit and the simplified residual block in the second residual unit respectively, and then multiplied. The multiplication result is added to the first feature information to obtain the second feature information.

[0464] In some embodiments, the at least one residual block shown in FIG. 8A may be replaced with a simplified residual block proposed in an embodiment of the present application as a simplified non-local residual block.

[0465] Since the network structure of the simplified non-local residual block proposed in the embodiment of the present application is simpler than the network structure of RNAB shown in Figures 3A and 8A above and has lower computational complexity, it reduces computational complexity while ensuring the image processing effect, thereby improving image decoding performance.

[0466] In some embodiments, as shown in FIG9A , the P types of lightweight attention modules in the embodiment of the present application include a second type of lightweight attention module, and the second type of lightweight attention module includes a window attention unit and a grid attention unit. In this case, the above S201-B includes the following steps:

[0467] S201-B-b1. The encoder determines a first window size and a second window size corresponding to the i-th convolutional layer;

[0468] S201-B-b2: The encoder determines third feature information based on the i-th feature information;

[0469] S201-B-b3: The encoder divides the third feature information into multiple sub-blocks based on the first window size and the window attention unit, and performs local attention processing on each of the multiple sub-blocks to obtain local feature information of the current image;

[0470] S201-B-b4: The encoder divides the local feature information of the current image into multiple grids based on the second window size and the grid attention unit, and performs global attention processing on the multiple grids to obtain global feature information of the current image;

[0471] S201-B-b5. The encoding end determines the (i+1)th feature information based on the global feature information of the current image.

[0472] In an embodiment of the present application, if the second type of lightweight attention module includes a window attention unit and a grid attention unit, the first window size and the second window size corresponding to the i-th convolutional layer are first determined.

[0473] Among them, the first window size can be understood as the window size corresponding to the window attention unit, and the second window size is the window corresponding to the grid attention unit.

[0474] The embodiment of the present application does not limit the specific values ​​of the first window size and the second window size.

[0475] In some embodiments, the first window sizes corresponding to different network layers are the same, and / or the second window sizes corresponding to different network layers are the same.

[0476] In some embodiments, different network layers correspond to different first window sizes, and / or different network layers correspond to different second window sizes.

[0477] In some embodiments, different window sizes can be set at different network layers to better capture the connections between each element of the latent variable while effectively controlling complexity. Exemplarily, S201-B-b1 includes determining at least one of a first window size and a second window size corresponding to the i-th convolutional layer based on the network depth of the i-th convolutional layer.

[0478] In this embodiment, different or different levels of first window sizes and / or second window sizes are set for the second type of lightweight attention modules of different network depths. For example, different first window sizes and / or second window sizes are set for the second type of lightweight attention modules of different network depths. Alternatively, different levels of first window sizes or second window sizes are set for the second type of lightweight attention modules of different network depth ranges.

[0479] For example, a smaller first window and / or second window may be used in a shallow layer of the network, while a larger first window and / or second window may be used in a deep layer of the network. That is, if the network depth of the i-th convolutional layer (or the second type of lightweight attention module) is small, a smaller first window and / or second window is used. If the network depth of the i-th convolutional layer (or the second type of lightweight attention module) is large, a larger first window and / or second window is used.

[0480] The embodiment of the present application does not limit the specific method in which the encoding end determines the third feature information based on the i-th feature information.

[0481] For example, if P types of lightweight attention modules are connected in series, and the second type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the third feature information is the i-th feature information. If the second type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the third feature information is the feature information obtained by processing the i-th feature information by the other type of lightweight attention module located before the second type of lightweight attention module.

[0482] For another example, if the P types of lightweight attention modules are connected in parallel, the third feature information mentioned above is the i-th feature information.

[0483] For another example, if P types of lightweight attention modules are jump-connected, the third feature information mentioned above is also the i-th feature information.

[0484] Based on the above steps, the encoding end determines the first window size and the third feature information, and then divides the third feature information into multiple sub-blocks based on the first window size and the window attention unit, and performs local attention processing on the multiple sub-blocks to obtain the local feature information of the current image.

[0485] In some embodiments, before dividing the third feature information into a plurality of sub-blocks, the encoding end further processes the third feature information through other feature processing units to obtain processed third feature information.

[0486] The embodiment of the present application does not limit the specific network structure of the feature processing unit.

[0487] In one possible implementation, as shown in FIG9B , the second type of lightweight attention module further includes an inverted linear bottleneck unit with depthwise separable convolution. In this case, the above S201-B-b2 includes the steps of S201-B-b21:

[0488] S201-B-b21. The encoding end extracts features of the third feature information through an inverted linear bottleneck unit with depthwise separable convolution to obtain processed third feature information.

[0489] The embodiment of the present application does not limit the specific network structure of the inverted linear bottleneck unit with depthwise separable convolution.

[0490] In one example, as shown in Figure 9C, the inverted linear bottleneck unit with depthwise separable convolution is MBConv, which includes the first convolution layer, the depth-wise (depthwise separable) convolution layer, the SE (Squeeze Excitation layer), and the second convolution layer. In this case, the above S201-B-b21 includes performing point-by-point convolution channel dimensionality increase on the i-th feature information through the first convolution layer, performing depth-wise convolution in the projected space after dimensionality increase, and the subsequent SE is used to enhance the representation of important channels. Finally, the second convolution layer is used again to perform point-by-point convolution to restore the dimension.

[0491] In one example, as shown in Figure 9D, the inverted linear bottleneck unit with depthwise separable convolution includes a first convolution layer, a squeeze-excitation layer (i.e., SE layer) and a second convolution layer. At this time, the above S201-B-b21 includes the following steps: performing channel dimensionality upscaling processing on the third feature information through the first convolution layer to obtain upscaling feature information; performing channel enhancement processing on the upscaling feature information through the squeeze-excitation layer to obtain enhanced feature information; performing channel dimensionality reduction processing on the enhanced feature information through the second convolution layer to obtain the processed third feature information.

[0492] Exemplarily, the feature dimension of the dimensionality reduction feature information is equal to the feature dimension of the third feature information.

[0493] The embodiment of the present application does not limit the specific parameters of the first convolution layer and the second convolution layer.

[0494] Exemplarily, the first convolutional layer is a 1X1 convolutional layer.

[0495] Exemplarily, the second convolutional layer is a 1X1 convolutional layer.

[0496] Compared to the MBConv in Figure 9C, the inverted linear bottleneck unit with depthwise separable convolution shown in Figure 9D reduces the number of depth-wise convolution layers. Depth-wise convolution layers are typically followed by normalization, which is not very suitable for image compression tasks. Therefore, using the depthwise separable convolution unit shown in Figure 9D for image compression can improve image compression efficiency.

[0497] In some embodiments, the inverted linear bottleneck unit with depthwise separable convolution shown in FIG9D can be used as an improved MBConv.

[0498] The embodiments of the present application do not limit the specific network structure of the window attention unit.

[0499] In one possible implementation, as shown in Figure 9E , the window attention unit includes Block-SA (Block Self Attention) and FNN (Feed Forward Neural Network). For example, for each of the multiple sub-blocks, Block-SA first performs block-level self-attention calculations on the sub-block, and the calculation result is added to the sub-block to obtain the self-attention information of the sub-block. The self-attention information of the multiple sub-blocks is combined and input into the FNN for processing to obtain local feature information of the current image.

[0500] In one possible implementation, the window attention unit may include more or fewer modules than those in FIG9E , for example, adding at least one convolutional layer after the FNN shown in FIG9E , or adding at least one convolutional layer after the last addition operation shown in FIG9E , and so on.

[0501] After the encoder obtains the local feature information of the current image through the window attention unit, it inputs this local feature information into the grid attention unit. Then, the local feature information of the current image is divided into multiple grids according to the second window size, and global attention processing is performed on the multiple grids to obtain the global feature information of the current image.

[0502] The embodiments of the present application do not limit the specific network structure of the grid attention unit.

[0503] In one possible implementation, as shown in FIG9F , the grid attention unit includes Grid-SA (Grid Self Attention) and FNN (Feed Forward Neural Network).

[0504] For example, Grid-SA first performs self-attention calculations on the entire grid and fuses the calculation results with local feature information to obtain the self-attention information of the entire grid. This self-attention information of the entire grid is then input into the FNN for processing to obtain the global feature information of the current image.

[0505] In one possible implementation, the grid attention unit may include more or fewer modules than those in FIG9F , for example, adding at least one convolutional layer after the FNN shown in FIG9F , or adding at least one convolutional layer after the last addition operation shown in FIG9F , and so on.

[0506] After determining the global feature information of the current image based on the above steps, the encoder determines the (i+1)th feature information according to the global feature information of the current image.

[0507] The embodiment of the present application does not limit the specific manner in which the encoding end determines the (i+1)th feature information based on the global feature information of the current image.

[0508] In one example, if the P types of lightweight attention modules are connected in series, and the second type of lightweight attention module is the last lightweight attention module among the P types of lightweight attention modules, the global feature information is determined as the i+1th feature information. If the second type of lightweight attention module is not the last lightweight attention module among the P types of lightweight attention modules, the encoding end inputs the global feature information into the other types of lightweight attention modules after the second type of lightweight attention module for processing to obtain the i+1th feature information.

[0509] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the above-mentioned global feature information and the feature information output by lightweight attention modules of other types among the P types except the second type are fused (for example, channel splicing) and processed to obtain the i+1th feature information.

[0510] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the encoding end fuses the above-mentioned global feature information and the feature information output by lightweight attention modules of other types among the P types except the second type (for example, channel splicing) to obtain fused feature information, and then fuses the fused feature information with the i-th feature information to obtain the i+1-th feature information.

[0511] In this embodiment, the proposed second type of lightweight attention module includes a window attention unit and a grid attention unit. As can be seen from the above, the window attention unit and the grid attention unit have simple structures, which in turn makes the entire second type of lightweight attention module simple in structure and low in computational complexity. Therefore, while ensuring image processing effects, it can reduce computational complexity and thus improve image decoding performance.

[0512] In some embodiments, as shown in FIG10A , the P types of lightweight attention modules in the embodiment of the present application include a third type of lightweight attention module, which includes at least one of a multi-head transposed attention submodule and a gated feedforward network submodule. In this case, the above S201-B includes the following steps:

[0513] S201-B-c1. The encoder processes the fourth feature information through at least one of the multi-head transposed attention submodule and the gated feedforward network submodule to obtain fifth feature information.

[0514] S201-B-c2. The encoding end determines the (i+1)th feature information based on the fifth feature information.

[0515] The fourth feature information is obtained based on the i-th feature information.

[0516] For example, if P types of lightweight attention modules are connected in series, and the third type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the fourth feature information is the i-th feature information. If the third type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the fourth feature information is the feature information obtained by processing the i-th feature information by the other type of lightweight attention module located before the third type of lightweight attention module.

[0517] For another example, if the P types of lightweight attention modules are connected in parallel, the fourth feature information mentioned above is the i-th feature information.

[0518] For another example, if P types of lightweight attention modules are jump-connected, the fourth feature information mentioned above is also the i-th feature information.

[0519] Then, the encoding end inputs the fourth feature information into the third type of lightweight attention module, and processes the fourth feature information through the multi-head transposition attention submodule and / or the gated feedforward network submodule in the third type of lightweight attention module to obtain the fifth feature information.

[0520] Among them, the multi-head transposition attention submodule is used to perform channel self-attention processing on the information input into the multi-head transposition attention submodule, and the gated feedforward network submodule is used to perform feature conversion processing on the information input into the gated feedforward network submodule.

[0521] In some embodiments, if the third type of lightweight attention module includes a multi-head transposed attention submodule and a gated feedforward network submodule, then the above S201-B-c1 includes the following steps:

[0522] S201-B-c11: The encoder performs channel self-attention processing on the fourth feature information through the multi-head transposition attention sub-module to obtain sixth feature information;

[0523] S201-B-c12. The encoding end performs feature conversion processing on the sixth feature information through a gated feedforward network sub-module to obtain fifth feature information.

[0524] The embodiment of the present application does not limit the specific network structure of the multi-head transposition attention sub-module.

[0525] In one possible implementation, as shown in FIG10B , the multi-head transposed attention submodule includes a first feature processing unit, a second feature processing unit, and a third feature processing unit. In this case, the above S201-B-c11 includes the following steps:

[0526] S201-B-c111: The encoding end processes the fourth feature information through the first feature processing unit, the second feature processing unit, and the third feature processing unit, respectively, to obtain query information, key value information, and value item information;

[0527] S201-B-c112, the encoding end determines the transposed attention information according to the query information, the key value information and the value item information;

[0528] S201-B-c113, the encoding end obtains the sixth feature information based on the transposed attention information and the fourth feature information.

[0529] As shown in Figure 10B, in this embodiment of the present application, the encoding end inputs the fourth feature information into the first feature processing unit for processing, outputting query information Q, which is also referred to as a query matrix. The fourth feature information is input into the second feature processing unit for processing, outputting key-value information K, which is also referred to as a key-value matrix. The fourth feature information is input into the third feature processing unit for processing, outputting value item information V, which is also referred to as a value item matrix. Furthermore, based on the query information, key-value information, and value item information, transposed attention information is determined, and based on the transposed attention information and the fourth feature information, sixth feature information is obtained.

[0530] The embodiment of the present application does not limit the specific network structure of the first feature processing unit, the second feature processing unit, and the third feature processing unit.

[0531] In one possible implementation, as shown in FIG10C , the first feature processing unit includes one convolutional layer and one deformable convolutional layer. The second feature processing unit includes one convolutional layer and one deformable convolutional layer. The third feature processing unit includes one convolutional layer and one deformable convolutional layer. Optionally, the convolutional layers included in the first, second, and third feature processing units may be the same or different. Optionally, the deformable convolutional layers included in the first, second, and third feature processing units may be the same or different.

[0532] Optionally, the convolution layer included in at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit is a 1X1 convolution layer.

[0533] Optionally, the deformable convolution layer included in at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit is a 3X3 deformable convolution layer.

[0534] In a possible implementation, at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit does not include a third convolutional layer, and a size of a convolution kernel of the third convolutional layer is a first preset value.

[0535] In an example, the third convolutional layer may be the 1X1 convolutional layer in FIG. 10C .

[0536] In one example, the third convolutional layer may be the 3X3 deformable convolutional layer in FIG10C .

[0537] That is, the multi-head transposed attention submodule shown in this implementation may not include at least one 1X1 convolution layer in Figure 10C. Alternatively, the multi-head transposed attention submodule shown in this implementation may not include at least one 3X3 deformable convolution layer in Figure 10C to reduce the computational complexity of the multi-head transposed attention submodule. Alternatively, the multi-head transposed attention submodule shown in this implementation includes fewer 1X1 convolution layers and / or fewer 3X3 deformable convolution layers than in Figure 10C.

[0538] In one example, if the first feature processing unit, the second feature processing unit, and the third feature processing unit do not include a 1X1 convolution layer, the network of the multi-head transposition attention submodule is shown in Figure 10D.

[0539] In some embodiments, as shown in Figure 10D, the multi-head transposed attention sub-module also includes a fourth convolutional layer. At this time, the encoding end obtains the sixth feature information based on the transposed attention information and the fourth feature information, including: processing the transposed attention information through the fourth convolutional layer and fusing it with the fourth feature information to obtain the sixth feature information.

[0540] This application does not limit the specific structure of the fourth convolutional layer.

[0541] Exemplarily, the fourth convolutional layer is a 1X1 convolutional layer.

[0542] In some embodiments, as shown in Figure 10E, the multi-head transposed attention sub-module does not include the fourth convolutional layer. At this time, the encoding end obtains the sixth feature information based on the transposed attention information and the fourth feature information, including: processing the transposed attention information and fusing it with the fourth feature information to obtain the sixth feature information.

[0543] In some embodiments, as shown in FIG10C , before inputting the fourth feature information into the first feature processing unit, the second feature processing unit, and the third feature processing unit, the solution end performs Norm processing, and inputs the normalized fourth feature information into the first feature processing unit, the second feature processing unit, and the third feature processing unit, respectively.

[0544] As can be seen from the above, in some embodiments, in order to reduce the computational complexity of the multi-head transposed attention submodule, compared to the MDTA (Multi-Dconv Head Transposed Attention, multi-head deformable convolution transposed attention) shown in Figure 10C, fewer 1X1 convolution layers, or fewer 3X3 deformable convolution layers, or fewer 1X1 convolution layers and 3X3 deformable convolution layers, to reduce the computational complexity of the multi-head transposed attention submodule and improve image processing efficiency. For example, the three 1X1 convolution layers on the left and / or the 1X1 convolution layer on the right in the MDTA shown in Figure 10C are reduced to obtain a multi-head transposed attention submodule with low computational complexity.

[0545] In some embodiments, at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit in the multi-head transposed attention submodule includes a residual block RB or a simplified residual block. That is, in this embodiment, the 1x1 convolution layer and the 3x3 convolution layer of any branch in the MDTA shown in 10C can be replaced with a residual block or a simplified residual block. Optionally, the last convolution layer (i.e., the 1x1 convolution layer in the lower right corner) can be removed to further reduce the complexity of the model. Optionally, the activation function in the simplified residual block can use LeakyReLU or other activation functions.

[0546] In some embodiments, the multi-head transposed attention submodule can be directly replaced by the simplified non-local residual block. As shown in the above embodiment, the simplified non-local residual block includes a first residual unit and a second residual unit, at least one of the first residual unit and the second residual unit includes one or more simplified residual blocks; or

[0547] The number of residual blocks included in the first residual unit is smaller than a first preset number, and / or the number of residual blocks included in the second residual unit is smaller than a second preset number.

[0548] In some embodiments, among the lightweight attention modules included in the analysis-transformation network, different lightweight attention modules correspond to multi-head transposition attention submodules with different numbers of heads. For example, some lightweight attention modules use head transposition attention submodules with a larger number of heads, while some lightweight attention modules use head transposition attention submodules with a smaller number of heads. For example, lightweight attention modules of different network depths correspond to multi-head transposition attention submodules with different numbers of heads.

[0549] Based on the above steps, the encoding end inputs the fourth feature information into the multi-head transposed attention submodule for channel self-attention processing. After obtaining the sixth feature information, the sixth feature information is input into the gated feedforward network submodule for feature conversion processing to obtain the fifth feature information.

[0550] The embodiment of the present application does not limit the specific network structure of the gated feedforward network submodule.

[0551] In one possible implementation, as shown in FIG10F , the gated feedforward network submodule includes a fourth feature processing unit and a fifth feature processing unit. In this case, the above S201-B-c12 includes the following steps:

[0552] S201-B-c121: The encoding end processes the sixth feature information through the fourth feature processing unit and the fifth feature processing unit respectively to obtain seventh feature information and eighth feature information;

[0553] S201-B-c122: The encoding end performs a dot product of the seventh feature information and the eighth feature information to obtain ninth feature information;

[0554] S201-B-c123. The encoding end obtains the fifth characteristic information based on the ninth characteristic information and the sixth characteristic information.

[0555] The embodiment of the present application does not limit the specific network structure of the fourth feature processing unit and the fifth feature processing unit.

[0556] In one possible implementation, as shown in FIG10G , the fourth feature processing unit includes one convolutional layer and one deformable convolutional layer. The fifth feature processing unit includes one convolutional layer and one deformable convolutional layer. Optionally, the convolutional layers included in the fourth and fifth feature processing units may be the same or different. Optionally, the deformable convolutional layers included in the fourth and fifth feature processing units may be the same or different.

[0557] Optionally, the convolution layer included in at least one of the fourth feature processing unit and the fifth feature processing unit is a 1X1 convolution layer.

[0558] Optionally, the deformable convolution layer included in at least one of the fourth feature processing unit and the fifth feature processing unit is a 3X3 deformable convolution layer.

[0559] In a possible implementation, at least one of the fourth feature processing unit and the fifth feature processing unit does not include a fifth convolutional layer, and a size of a convolution kernel of the fifth convolutional layer is a second preset value.

[0560] In an example, the fifth convolutional layer may be the 1X1 convolutional layer in FIG10G .

[0561] In one example, the fifth convolutional layer may be the 3X3 deformable convolutional layer in FIG10G .

[0562] That is, the gated feedforward network submodule shown in this implementation may not include at least one 1X1 convolution layer in FIG10G . Alternatively, the gated feedforward network submodule shown in this implementation may not include at least one 3X3 deformable convolution layer in FIG10G to reduce the computational complexity of the gated feedforward network submodule. Alternatively, the gated feedforward network submodule shown in this implementation includes fewer 1X1 convolution layers and / or fewer 3X3 deformable convolution layers than FIG10G . For example, the two 1X1 convolution layers on the left side of FIG10G are reduced.

[0563] In one example, if neither the fourth feature processing unit nor the fifth feature processing unit includes a 1×1 convolutional layer, the network of the gated feedforward network submodule is shown in FIG10H .

[0564] In some embodiments, as shown in Figure 10H, the gated feedforward network sub-module also includes a sixth convolutional layer. At this time, the encoding end obtains the fifth feature information based on the ninth feature information and the sixth feature information, including: processing the ninth feature information through the sixth convolutional layer and fusing it with the sixth feature information to obtain the fifth feature information.

[0565] This application does not limit the specific structure of the sixth convolutional layer.

[0566] Exemplarily, the sixth convolutional layer is a 1X1 convolutional layer.

[0567] In some embodiments, as shown in Figure 10I, the gated feedforward network sub-module does not include the sixth convolutional layer. At this time, the encoding end obtains the fifth feature information based on the ninth feature information and the sixth feature information, including: fusing the ninth feature information and the sixth feature information to obtain the fifth feature information.

[0568] In some embodiments, before inputting the ninth feature information into the fourth feature processing unit and the fifth feature processing unit, the solution terminal performs Norm processing first, and inputs the normalized sixth feature information into the fourth feature processing unit and the fifth feature processing unit respectively.

[0569] As can be seen from the above, in some embodiments, in order to reduce the computational complexity of the gated feedforward network submodule, compared to the GDFN (Gated-Dconv Feed-Forward Network) shown in Figure 10G, fewer 1X1 convolutional layers, or fewer 3X3 deformable convolutional layers, or fewer 1X1 convolutional layers and 3X3 deformable convolutional layers are used to reduce the computational complexity of the multi-head transposed attention submodule and improve image processing efficiency. For example, by reducing the two 1X1 convolutional layers on the left and / or the 1X1 convolutional layer on the right in the GDFN shown in Figure 10G, a gated feedforward network submodule with low computational complexity is obtained.

[0570] In some embodiments, as shown in Figure 10F, the gated feedforward network sub-module of the embodiment of the present application also includes an activation function after the fifth feature processing unit, that is, the encoding end processes the second feature information through the fifth feature processing unit to obtain the fourth feature information, and then processes the fourth feature information through the activation function, and multiplies the processed fourth feature information with the third feature information and the fourth feature information to obtain the fifth feature information.

[0571] This embodiment of the present application does not limit the specific type of the activation function in Figure 10F.

[0572] In some embodiments, the activation function is GELU Activation.

[0573] In some embodiments, in order to further reduce the complexity of the gated feedforward network submodule, the activation function may be Sigmoid, ReLU, LeakyReLU, PReLU, ELU or other activation functions.

[0574] In some embodiments, at least one of the fourth feature processing unit and the fifth feature processing unit includes a residual block or a simplified residual block. That is, in this embodiment, the residual block RB or the simplified residual block simplified RB block can be used to replace the 1x1 and 3x3 convolutions of any branch in the gated feedforward network submodule. Optionally, the last convolution layer, that is, the 1x1 convolution layer in the lower right corner of the GDFN shown in Figure 10G, is removed to further reduce the complexity of the model. Optionally, the activation function in the simplified residual block can use LeakyReLU or other activation functions.

[0575] In some embodiments, the above-mentioned gated feedforward network submodule can be directly replaced by the above-mentioned simplified non-local residual block.

[0576] After determining the global feature information of the current image based on the above steps, the encoder determines the (i+1)th feature information according to the global feature information of the current image.

[0577] The embodiment of the present application does not limit the specific manner in which the encoding end determines the (i+1)th characteristic information based on the fifth characteristic information.

[0578] In one example, if the above-mentioned P types of lightweight attention modules are connected in series, and the third type of lightweight attention module is the last lightweight attention module among the P types of lightweight attention modules, then the above-mentioned fifth feature information is determined as the i+1th feature information. If the third type of lightweight attention module is not the last lightweight attention module among the P types of lightweight attention modules, the encoding end inputs the fifth feature information into the other types of lightweight attention modules after the third type of lightweight attention module for processing to obtain the i+1th feature information.

[0579] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the above-mentioned fifth feature information and the feature information output by lightweight attention modules of other types among the P types except the third type are fused (for example, channel splicing) and processed to obtain the i+1th feature information.

[0580] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the above-mentioned fifth feature information and the feature information output by lightweight attention modules of other types among the P types except the third type are fused (for example, channel splicing) to obtain fused feature information, and then the fused feature information is fused with the i-th feature information to obtain the i+1-th feature information.

[0581] In this embodiment, the proposed third-type lightweight attention module includes at least one of a multi-head transposed attention submodule and a gated feedforward network submodule. As can be seen from the above, the simple structures of the multi-head transposed attention submodule and the gated feedforward network submodule reduce the computational complexity of the entire third-type lightweight attention module. Therefore, while maintaining image processing effectiveness, computational complexity can be reduced, thereby improving image decoding performance.

[0582] In some embodiments, as shown in FIG11 , the P types of lightweight attention modules in the embodiment of the present application include a fourth type of lightweight attention module, which includes a depthwise separable convolutional layer, a first convolutional layer, and a second convolutional layer. In this case, the above S201-B includes the following steps:

[0583] S201-B-d1: The encoder processes the tenth feature information through a depthwise separable convolutional layer to obtain the eleventh feature information;

[0584] S201-B-d2: The encoding end obtains twelfth feature information based on the first convolutional layer and the eleventh feature information;

[0585] S201-B-d3: The encoding end obtains thirteenth feature information based on the second convolutional layer and the twelfth feature information;

[0586] S201-B-d4: The encoding end fuses the thirteenth feature information and the tenth feature information to obtain the fourteenth feature information;

[0587] S201-B-d5. The encoding end obtains the (i+1)th feature information based on the fourteenth feature information.

[0588] In this embodiment, a lightweight attention module shown in FIG11 is proposed. The lightweight attention module can replace the RNBA in FIG2A above. Since the lightweight attention module has a simple structure and low computational complexity, it can improve the decoding efficiency of the image.

[0589] The tenth feature information is obtained based on the i-th feature information.

[0590] For example, if P types of lightweight attention modules are connected in series, and the fourth type of lightweight attention module is the first lightweight attention module directly connected to the i-th convolutional layer, then the tenth feature information is the i-th feature information. If the fourth type of lightweight attention module is not the first lightweight attention module directly connected to the i-th convolutional layer, then the tenth feature information is the feature information obtained by processing the i-th feature information by a lightweight attention module of another type located before the fourth type of lightweight attention module.

[0591] For another example, if the P types of lightweight attention modules are connected in parallel, the tenth feature information mentioned above is the i-th feature information.

[0592] For another example, if P types of lightweight attention modules are jump-connected, the above-mentioned tenth feature information is also the i-th feature information.

[0593] Then, as shown in FIG11 , the encoder inputs the tenth feature information into the depthwise separable convolutional layer for processing, inputs the eleventh feature information, and then obtains the twelfth feature information based on the first convolutional layer and the eleventh feature information.

[0594] The embodiment of the present application does not limit the specific manner in which the encoding end obtains the twelfth feature information based on the first convolutional layer and the eleventh feature information.

[0595] For example, the encoding end directly inputs the eleventh feature information into the first convolutional layer and outputs the twelfth feature information.

[0596] For another example, the encoder inputs the eleventh feature information into the normalization layer (layer-normolization, abbreviated as LN) for normalization processing to further reduce data complexity. Then, the normalized eleventh feature information is input into the first convolutional layer for processing to obtain the twelfth feature information.

[0597] Next, the encoding end obtains the thirteenth feature information based on the second convolutional layer and the twelfth feature information.

[0598] The embodiment of the present application does not limit the specific manner in which the encoding end obtains the thirteenth feature information based on the second convolutional layer and the twelfth feature information.

[0599] For example, the encoding end directly inputs the twelfth feature information into the second convolutional layer and outputs the thirteenth feature information.

[0600] For another example, the encoding end processes the twelfth feature information through an activation function (such as GELU), and then inputs it into the second convolutional layer for processing to obtain the thirteenth feature information.

[0601] Finally, the encoding end fuses the thirteenth feature information and the tenth feature information to obtain the fourteenth feature information.

[0602] The embodiment of the present application does not limit the specific manner in which the encoding end fuses the thirteenth characteristic information and the tenth characteristic information to obtain the fourteenth characteristic information.

[0603] For example, the encoding end fuses the thirteenth feature information and the tenth feature information to obtain the fourteenth feature information.

[0604] For another example, the encoding end multiplies the thirteenth feature information by a certain coefficient and fuses the result with the tenth feature information to obtain the fourteenth feature information.

[0605] The embodiments of the present application do not restrict the specific network structures of the depthwise separable convolutional layer, the first convolutional layer, and the second convolutional layer. In other words, the embodiments of the present application do not restrict the convolution kernel size and number of channels of the depthwise separable convolutional layer, the first convolutional layer, and the second convolutional layer.

[0606] In some embodiments, the convolution kernel of the depthwise separable convolution layer is 7×7, and the number of channels is 96. The convolution kernel of the first convolution layer is 1×1, and the number of channels is 384. The convolution kernel of the second convolution layer is 1×1, and the number of channels is 96.

[0607] In some embodiments, the convolution kernel of the depthwise separable convolution layer is larger than the preset convolution kernel. The embodiment of the present application does not limit the specific size of the preset convolution kernel. For example, the convolution kernel of the depthwise separable convolution layer is greater than or equal to 7×7.

[0608] Next, the encoding end obtains the (i+1)th feature information based on the fourteenth feature information determined above.

[0609] In one example, if the P types of lightweight attention modules are connected in series, and the fourth type of lightweight attention module is the last lightweight attention module among the P types of lightweight attention modules, the fourteenth feature information is determined as the i+1th feature information. If the fourth type of lightweight attention module is not the last lightweight attention module among the P types of lightweight attention modules, the encoding end inputs the fourteenth feature information into the other types of lightweight attention modules after the fourth type of lightweight attention module for processing to obtain the i+1th feature information.

[0610] In one example, if the above-mentioned P types of lightweight attention modules are connected in parallel, the above-mentioned fourteenth feature information and the feature information output by the lightweight attention modules of other types among the P types except the fourth type are fused (for example, channel splicing) and processed to obtain the i+1th feature information.

[0611] In one example, if the above-mentioned P types of lightweight attention modules are jump-connected, the above-mentioned fourteenth feature information and the feature information output by the lightweight attention modules of other types among the P types except the fourth type are fused (for example, channel splicing) to obtain fused feature information, and then the fused feature information is fused with the i-th feature information to obtain the i+1-th feature information.

[0612] The above description uses the P types of lightweight attention modules connected after the i-th convolutional layer of the M convolutional layers of the analysis transformation network as an example. The data processing process for at least one type of lightweight attention module connected after other convolutional layers in the M convolutional layers can refer to the data processing process for the P types of lightweight attention modules after the i-th convolutional layer.

[0613] In some embodiments, assuming that the number of channels of the input information to be input into the lightweight attention module is C, the input information with the number of channels C can be divided into several sub-input information with the number of channels a1, a1,…an (ensuring a1+a2+…+an=C), and several lightweight attention modules with the number of channels a1, a1,…an are set at the same time, and the above sub-input information is respectively input into the lightweight attention module with the corresponding number of channels to obtain the output results with the number of channels a1, a1,…an. For example, the sub-input information with the number of channels ai is input into the lightweight attention module with the number of channels ai for processing, and the output result with the number of channels ai is output. Then, the output results with the number of channels a1, a1,…an are spliced ​​to finally obtain the output result with the number of channels C.

[0614] In some embodiments, a resolution downsampling module can be added before at least one lightweight attention module in the analysis transformation network proposed in the embodiments of the present application, and an upsampling module can be added after each lightweight attention module.

[0615] It should be noted that the types of lightweight attention modules proposed in this application example include but are not limited to the above types.

[0616] In an embodiment of the present application, by setting K types of lightweight attention modules in the analysis transformation network, for example, connecting at least one type of lightweight attention module among the K types after at least one convolutional layer of the analysis transformation network, the correlation between different positions of the latent variables can be constructed in a hierarchical manner, thereby reducing the bit rate loss, improving the coding efficiency and effectively controlling the complexity of the coding.

[0617] S202: Encode the current image according to the transformation value of the current image to obtain a code stream.

[0618] For example, as shown in FIG2A and FIG2B , after the encoder obtains the transformation value of the current image through the above method, it obtains the residual value according to the transformation value, and quantizes and encodes the residual value to obtain a code stream.

[0619] The image encoding method provided by the embodiment of the present application is that when the encoding end encodes the current image, the current image is processed by the analysis transformation network to obtain the transformation value of the current image. The analysis transformation network includes K types of lightweight attention modules. The computational complexity of the K types of lightweight attention modules is less than a preset value. Then, based on the transformation value of the current image, the current image is encoded to obtain a code stream. In other words, the embodiment of the present application proposes a new analysis transformation network, which includes K types of lightweight attention modules. The computational complexity of the K types of lightweight attention modules is less than a preset value. In this way, the analysis transformation network processes the current image, reduces the computational complexity while ensuring the encoding effect, that is, while improving the image processing effect, effectively controls the image encoding complexity, reduces the encoding time, and improves the image encoding performance.

[0620] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner unless there is any contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, and as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0621] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0622] The above describes in detail the method embodiment of the present application in conjunction with Figures 4 to 12, and the following describes in detail the device embodiment of the present application in conjunction with Figures 13 to 15.

[0623] FIG13 is a schematic block diagram of an image decoding device provided in an embodiment of the present application.

[0624] As shown in FIG13 , the image decoding apparatus 10 may include:

[0625] The decoding unit 11 is configured to decode a code stream of a current image to obtain a residual value of the current image, and determine a transformation value of the current image based on the residual value;

[0626] The reconstruction unit 12 is used to process the transformation value of the current image through a synthetic transformation network to obtain a reconstructed image of the current image. The synthetic transformation network includes K types of lightweight attention modules, where K is a positive integer, and the computational complexity of the K types of lightweight attention modules is less than a preset value.

[0627] In some embodiments, the synthetic transformation network includes N convolutional layers, and M of the N convolutional layers are respectively connected to at least one type of lightweight attention module of the K types of lightweight attention modules. The reconstruction unit 12 is specifically used to process the i-1th feature information of the current image through the i-th convolutional layer among the M convolutional layers to obtain the i-th feature information of the current image, and the i-1th feature information is obtained based on the transformation value of the current image, N is a positive integer, M is a positive integer less than or equal to N, and i is a positive integer less than or equal to M; the i-th feature information is processed through P types of lightweight attention modules connected to the i-th convolutional layer to obtain the i+1th feature information of the current image, and P is a positive integer less than or equal to K; based on the i+1th feature information, the reconstructed image is determined.

[0628] In some embodiments, the P types of lightweight attention modules are divided into Q attention units, each of the attention units includes at least one type of lightweight attention module among the P types of lightweight attention modules, and the reconstruction unit 12 is specifically used to process the i-th feature information through the Q attention units to obtain the i+1-th feature information, where Q is a positive integer less than or equal to P.

[0629] In some embodiments, the type of lightweight attention modules included in the same attention unit among the Q attention units is consistent, and the types of lightweight attention modules included in different attention units are different.

[0630] In some embodiments, at least one of the Q attention units includes two or more types of lightweight attention modules.

[0631] In some embodiments, the Q attention units are connected in series, and the reconstruction unit 12 is specifically used to process the i-th feature information through the Q attention units connected in series to obtain the i+1-th feature information.

[0632] In some embodiments, the Q attention units are connected in series, and the input and output of the Q attention units are jump-connected. The reconstruction unit 12 is specifically used to process the i-th feature information through the Q attention units connected in series to obtain processed feature information; and fuse the processed feature information with the i-th feature information to obtain the i+1-th feature information.

[0633] In some embodiments, the Q attention units are connected in parallel, and the reconstruction unit 12 is specifically used to divide the i-th feature information into Q first sub-feature information; for the j-th attention unit among the Q attention units, the j-th first sub-feature information among the Q sub-feature information is processed by the j-th attention unit to obtain the j-th second sub-feature information, where j is a positive integer less than or equal to Q; the second sub-feature information output by the Q attention units are respectively fused to obtain the i+1-th feature information.

[0634] In some embodiments, the reconstruction unit 12 is specifically used to divide the i-th feature information into the Q first sub-feature information according to the number of channels of the i-th feature information; and splice the second sub-feature information output by the Q attention units respectively according to the number of channels to obtain the i+1-th feature information.

[0635] In some embodiments, in at least two of the M convolutional layers, the types of lightweight attention modules connected after the same convolutional layer are the same, and the types of lightweight attention modules connected after different convolutional layers are different.

[0636] In some embodiments, the reconstruction unit 12 is specifically used to downsample the i-th feature information to obtain the i-th feature information after downsampling; process the i-th feature information after downsampling through the P types of lightweight attention modules to obtain the i-th feature information after attention processing; and upsample the i-th feature information after attention processing to obtain the i+1-th feature information.

[0637] In some embodiments, the P types of lightweight attention modules include a first type of lightweight attention module, which includes a simplified non-local residual block. The reconstruction unit 12 is specifically used to process the first feature information through the simplified local residual block to obtain the second feature information, and the first feature information is obtained based on the i-th feature information; based on the second feature information, the i+1-th feature information is obtained.

[0638] In some embodiments, the P types of lightweight attention modules include a second type of lightweight attention module, the second type of lightweight attention module includes a window attention unit and a grid attention unit, and the reconstruction unit 12 is specifically used to determine the first window size and the second window size corresponding to the i-th convolutional layer; based on the i-th feature information, determine the third feature information; based on the first window size and the window attention unit, divide the third feature information into multiple sub-blocks, and perform local attention processing on the multiple sub-blocks to obtain the local feature information of the current image; based on the second window size and the grid attention unit, divide the local feature information of the current image into multiple grids, and perform global attention processing on the multiple grids to obtain the global feature information of the current image; based on the global feature information of the current image, determine the i+1-th feature information.

[0639] In some embodiments, the P types of lightweight attention modules include a third type of lightweight attention module, and the third type of lightweight attention module includes at least one of a multi-head transposition attention sub-module and a gated feedforward network sub-module. The reconstruction unit 12 is specifically used to process the fourth feature information through at least one of the multi-head transposition attention sub-module and the gated feedforward network sub-module to obtain fifth feature information. The fourth feature information is obtained based on the i-th feature information. The multi-head transposition attention sub-module is used to perform channel self-attention processing on the information input into the multi-head transposition attention sub-module, and the gated feedforward network sub-module is used to perform feature conversion processing on the information input into the gated feedforward network sub-module; based on the fifth feature information, the i+1-th feature information is determined.

[0640] In some embodiments, the third type of lightweight attention module includes the multi-head transposition attention sub-module and the gated feedforward network sub-module, and the reconstruction unit 12 is specifically used to perform channel self-attention processing on the fourth feature information through the multi-head transposition attention sub-module to obtain the sixth feature information; and perform feature conversion processing on the sixth feature information through the gated feedforward network sub-module to obtain the fifth feature information.

[0641] In some embodiments, the multi-head transposed attention submodule includes a first feature processing unit, a second feature processing unit, and a third feature processing unit, and a reconstruction unit 12, which is specifically used to process the four feature information through the first feature processing unit, the second feature processing unit, and the third feature processing unit, respectively, to obtain query information, key-value information, and value item information; determine the transposed attention information based on the query information, key-value information, and value item information; and obtain the sixth feature information based on the transposed attention information and the fourth feature information.

[0642] In some embodiments, at least one of the first feature processing unit, the second feature processing unit, and the third feature processing unit comprises a residual block or a simplified residual block.

[0643] In some embodiments, the gated feedforward network submodule includes a fourth feature processing unit and a fifth feature processing unit, and a reconstruction unit 12, which is specifically used to process the sixth feature information through the fourth feature processing unit and the fifth feature processing unit, respectively, to obtain seventh feature information and eighth feature information; multiply the seventh feature information and the eighth feature information by point multiplying the seventh feature information and the eighth feature information to obtain ninth feature information; and obtain the fifth feature information based on the ninth feature information and the sixth feature information.

[0644] In some embodiments, at least one of the fourth feature processing unit and the fifth feature processing unit comprises a residual block or a simplified residual block.

[0645] In some embodiments, the multi-head transposed attention submodule or the gated feedforward network submodule is a simplified non-local residual block.

[0646] In some embodiments, the simplified non-local residual block includes a first residual unit and a second residual unit; at least one of the first residual unit and the second residual unit includes one or more simplified residual blocks; or, the number of residual blocks included in the first residual unit is less than a first preset number, and / or the number of residual blocks included in the second residual unit is less than a second preset number.

[0647] In some embodiments, the P types of lightweight attention modules include a fourth type of lightweight attention module, and the fourth type of lightweight attention module includes a depth-separable convolutional layer, a first convolutional layer, and a second convolutional layer. The reconstruction unit 12 is specifically used to process the tenth feature information through the depth-separable convolutional layer to obtain the eleventh feature information, and the tenth feature information is obtained based on the i-th feature information; based on the first convolutional layer and the eleventh feature information, the twelfth feature information is obtained; based on the second convolutional layer and the twelfth feature information, the thirteenth feature information is obtained; based on the thirteenth feature information and the tenth feature information, the fourteenth feature information is obtained; based on the fourteenth feature information, the i+1th feature information is obtained.

[0648] It should be understood that the device embodiments and method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described in detail here. Specifically, the device shown in Figure 13 can perform the above-mentioned method embodiments, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the corresponding method embodiments of the decoder. For the sake of brevity, they will not be described in detail here.

[0649] FIG14 is a schematic block diagram of an image encoding device provided in an embodiment of the present application.

[0650] As shown in FIG14 , the image encoding apparatus 20 may include:

[0651] a transform unit 21 configured to process the current image through an analysis transform network to obtain a transform value of the current image, wherein the analysis transform network includes K types of lightweight attention modules, and the computational complexity of the K types of lightweight attention modules is less than a preset value, where K is a positive integer;

[0652] The encoding unit 22 is configured to encode the current image according to the transformation value of the current image to obtain a code stream.

[0653] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions can refer to the method embodiment. To avoid repetition, they are not described here. Specifically, the device shown in Figure 14 can perform the above-mentioned method embodiment, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the method embodiment corresponding to the encoder. For the sake of brevity, they are not described here.

[0654] The apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0655] FIG15 is a schematic block diagram of an electronic device provided in an embodiment of the present application. The electronic device in FIG15 may be the above-mentioned decoder or encoder.

[0656] As shown in FIG15 , the electronic device 30 may include:

[0657] The memory 31 and the processor 32 are configured to store a computer program 33 and transmit the program code 33 to the processor 32. In other words, the processor 32 can call and run the computer program 33 from the memory 31 to implement the method in the embodiment of the present application.

[0658] For example, the processor 32 may be configured to execute the steps of the method 200 according to the instructions in the computer program 33 .

[0659] In some embodiments of the present application, the processor 32 may include but is not limited to:

[0660] General-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0661] In some embodiments of the present application, the memory 31 includes but is not limited to:

[0662] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0663] In some embodiments of the present application, the computer program 33 may be divided into one or more modules, which are stored in the memory 31 and executed by the processor 32 to implement the method for recording a page provided by the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 33 in the electronic device.

[0664] As shown in FIG15 , the electronic device 30 may further include:

[0665] The transceiver 34 may be connected to the processor 32 or the memory 31 .

[0666] The processor 32 may control the transceiver 34 to communicate with other devices. Specifically, the processor 32 may send information or data to other devices or receive information or data sent by other devices. The transceiver 34 may include a transmitter and a receiver. The transceiver 34 may further include one or more antennas.

[0667] It should be understood that the various components in the electronic device 30 are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0668] According to one aspect of the present application, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer is enabled to perform the method of the above method embodiment.

[0669] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to perform the method of the above method embodiment.

[0670] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method of the above-described method embodiment.

[0671] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function of the embodiment of the present application is implemented in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0672] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0673] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0674] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.

[0675] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An image decoding method, characterized in that: Applied to a decoding device, the method comprises: Decoding a code stream of a current image to obtain a residual value of the current image, and determining a transformation value of the current image based on the residual value; The transformation value of the current image is processed through a synthetic transformation network to obtain a reconstructed image of the current image, the synthetic transformation network includes K types of lightweight attention modules, the computational complexity of the K types of lightweight attention modules is less than a preset value, and K is a positive integer.

2. The method according to claim 1, characterized in that The synthetic transformation network includes N convolutional layers, M of the N convolutional layers are respectively connected to at least one type of lightweight attention module among the K types of lightweight attention modules, and the transformation value of the current image is processed by the synthetic transformation network to obtain a reconstructed image of the current image, including: For an i-th convolution layer among the M convolution layers, processing the i-1th feature information of the current image through the i-th convolution layer to obtain the i-th feature information of the current image, wherein the i-1th feature information is obtained based on a transformation value of the current image, wherein N is a positive integer, M is a positive integer less than or equal to N, and i is a positive integer less than or equal to M; Processing the i-th feature information through P types of lightweight attention modules connected to the i-th convolutional layer to obtain i+1-th feature information of the current image, where P is a positive integer less than or equal to K; Based on the (i+1)th feature information, the reconstructed image is determined.

3. The method according to claim 2, characterized in that The P types of lightweight attention modules are divided into Q attention units, each of the attention units includes at least one type of lightweight attention module among the P types of lightweight attention modules, and the P types of lightweight attention modules connected to the i-th convolutional layer process the i-th feature information to obtain the i+1-th feature information of the current image, including: The i-th feature information is processed by the Q attention units to obtain the i+1-th feature information, where Q is a positive integer less than or equal to P.

4. The method according to claim 3, characterized in that The type of lightweight attention modules included in the same attention unit among the Q attention units is consistent, and the types of lightweight attention modules included in different attention units are different.

5. The method according to claim 3, characterized in that: At least one of the Q attention units includes two or more types of lightweight attention modules.

6. The method according to any one of claims 3 to 5, characterized in that: The Q attention units are connected in series, and the i-th feature information is processed by the Q attention units to obtain the i+1-th feature information, including: The i-th feature information is processed by the Q attention units connected in series to obtain the i+1-th feature information.

7. The method according to any one of claims 3 to 5, characterized in that: The Q attention units are connected in series, and the input and output of the Q attention units are jump-connected, and the i-th feature information is processed by the Q attention units to obtain the i+1-th feature information, including: Processing the i-th feature information through the Q attention units connected in series to obtain processed feature information; The processed feature information is fused with the i-th feature information to obtain the i+1-th feature information.

8. The method according to any one of claims 3 to 5, characterized in that: The Q attention units are connected in parallel, and the i-th feature information is processed by the Q attention units to obtain the i+1-th feature information, including: Divide the i-th feature information into Q first sub-feature information; For a j-th attention unit among the Q attention units, processing the j-th first sub-feature information among the Q sub-feature information by the j-th attention unit to obtain the j-th second sub-feature information, where j is a positive integer less than or equal to Q; The second sub-feature information outputted by the Q attention units are respectively fused to obtain the i+1th feature information.

9. The method according to claim 8, characterized in that The dividing the i-th feature information into Q first sub-feature information includes: According to the number of channels of the i-th feature information, the i-th feature information is divided into the Q first sub-feature information; The fusing the second sub-feature information respectively output by the Q attention units to obtain the i+1th feature information includes: The second sub-feature information outputted by the Q attention units are concatenated according to the number of channels to obtain the i+1th feature information.

10. The method according to any one of claims 2 to 9, characterized in that: In at least two of the M convolutional layers, the type of lightweight attention modules connected after the same convolutional layer is the same, and the types of lightweight attention modules connected after different convolutional layers are different.

11. The method according to any one of claims 2 to 10, characterized in that: The P types of lightweight attention modules connected to the i-th convolutional layer are used to process the i-th feature information to obtain the i+1-th feature information of the current image, including: Downsampling the i-th feature information to obtain the i-th feature information after downsampling; Processing the i-th feature information after the downsampling through the P types of lightweight attention modules to obtain the i-th feature information after attention processing; The i-th feature information after the attention processing is upsampled to obtain the i+1-th feature information.

12. The method according to any one of claims 2 to 11, characterized in that: The P types of lightweight attention modules include a first type of lightweight attention module, the first type of lightweight attention module includes a simplified non-local residual block, and the P types of lightweight attention modules connected to the i-th convolutional layer process the i-th feature information to obtain the i+1-th feature information of the current image, including: Processing the first feature information through the simplified local residual block to obtain second feature information, where the first feature information is obtained based on the i-th feature information; Based on the second feature information, the (i+1)th feature information is obtained.

13. The method according to any one of claims 2 to 11, characterized in that: The P types of lightweight attention modules include a second type of lightweight attention module, the second type of lightweight attention module includes a window attention unit and a grid attention unit, and the P types of lightweight attention modules connected to the i-th convolutional layer process the i-th feature information to obtain the i+1-th feature information of the current image, including: Determine a first window size and a second window size corresponding to the i-th convolutional layer; Determining third feature information based on the i-th feature information; Based on the first window size and the window attention unit, the third feature information is divided into a plurality of sub-blocks, and local attention processing is performed on the plurality of sub-blocks respectively to obtain local feature information of the current image; Based on the second window size and the grid attention unit, the local feature information of the current image is divided into a plurality of grids, and a global attention process is performed on the plurality of grids to obtain the global feature information of the current image; Based on the global feature information of the current image, the (i+1)th feature information is determined.

14. The method according to any one of claims 2 to 11, characterized in that: The P types of lightweight attention modules include a third type of lightweight attention module, the third type of lightweight attention module includes at least one of a multi-head transposition attention submodule and a gated feedforward network submodule, and the P types of lightweight attention modules connected to the i-th convolutional layer process the i-th feature information to obtain the i+1-th feature information of the current image, including: The fourth feature information is processed by at least one of the multi-head transposition attention submodule and the gated feedforward network submodule to obtain fifth feature information, wherein the fourth feature information is obtained based on the i-th feature information, the multi-head transposition attention submodule is used to perform channel self-attention processing on the information input into the multi-head transposition attention submodule, and the gated feedforward network submodule is used to perform feature conversion processing on the information input into the gated feedforward network submodule; Based on the fifth feature information, the (i+1)th feature information is determined.

15. The method according to claim 14, characterized in that The third type of lightweight attention module includes a multi-head transposition attention submodule and a gated feedforward network submodule, and the fourth feature information is processed by at least one of the multi-head transposition attention submodule and the gated feedforward network submodule to obtain the fifth feature information, including: Performing channel self-attention processing on the fourth feature information through the multi-head transposition attention submodule to obtain sixth feature information; The sixth feature information is subjected to feature conversion processing by the gated feedforward network submodule to obtain the fifth feature information.

16. The method according to claim 15, characterized in that The multi-head transposition attention submodule includes a first feature processing unit, a second feature processing unit and a third feature processing unit, and the multi-head transposition attention submodule performs channel self-attention processing on the fourth feature information to obtain the sixth feature information, including: The four feature information are processed by the first feature processing unit, the second feature processing unit and the third feature processing unit respectively to obtain query information, key value information and value item information; Determine transposition attention information according to the query information, key value information and value item information; The sixth feature information is obtained based on the transposed attention information and the fourth feature information.

17. The method according to claim 16, characterized in that At least one of the first feature processing unit, the second feature processing unit and the third feature processing unit includes a residual block or a simplified residual block.

18. The method according to any one of claims 15 to 17, characterized in that: The gated feedforward network submodule includes a fourth feature processing unit and a fifth feature processing unit, and the gated feedforward network submodule performs feature conversion processing on the sixth feature information to obtain the fifth feature information, including: The sixth feature information is processed by the fourth feature processing unit and the fifth feature processing unit respectively to obtain seventh feature information and eighth feature information; Multiply the seventh characteristic information by the eighth characteristic information to obtain ninth characteristic information; The fifth characteristic information is obtained according to the ninth characteristic information and the sixth characteristic information.

19. The method according to claim 18, characterized in that At least one of the fourth feature processing unit and the fifth feature processing unit includes a residual block or a simplified residual block.

20. The method according to any one of claims 14 to 19, characterized in that: The multi-head transposed attention submodule or the gated feedforward network submodule is a simplified non-local residual block.

21. The method according to claim 12 or 20, characterized in that The simplified non-local residual block includes a first residual unit and a second residual unit; At least one of the first residual unit and the second residual unit includes one or more simplified residual blocks; or, The number of residual blocks included in the first residual unit is smaller than a first preset number, and / or the number of residual blocks included in the second residual unit is smaller than a second preset number.

22. The method according to any one of claims 2 to 11, characterized in that: The P types of lightweight attention modules include a fourth type of lightweight attention module, the fourth type of lightweight attention module includes a depth-separable convolutional layer, a first convolutional layer, and a second convolutional layer, and the P types of lightweight attention modules connected to the i-th convolutional layer process the i-th feature information to obtain the i+1-th feature information of the current image, including: Processing the tenth feature information through the depthwise separable convolutional layer to obtain an eleventh feature information, wherein the tenth feature information is obtained based on the i-th feature information; Obtaining twelfth feature information based on the first convolutional layer and the eleventh feature information; Obtaining thirteenth feature information based on the second convolutional layer and the twelfth feature information; Based on the thirteenth characteristic information and the tenth characteristic information, obtain fourteenth characteristic information; Based on the fourteenth characteristic information, the (i+1)th characteristic information is obtained.

23. An image encoding method, characterized in that: Applied to an encoding device, the method comprises: Processing the current image through an analysis transformation network to obtain a transformation value of the current image, wherein the analysis transformation network includes K types of lightweight attention modules, and the computational complexity of the K types of lightweight attention modules is less than a preset value, and K is a positive integer; The current image is encoded according to the transformation value of the current image to obtain a code stream.

24. An image decoding device, characterized in that: Applied to a decoding device, the device comprises: A decoding unit, configured to decode a code stream of a current image to obtain a residual value of the current image, and determine a transformation value of the current image based on the residual value; A reconstruction unit is used to process the transformation value of the current image through a synthetic transformation network to obtain a reconstructed image of the current image, wherein the synthetic transformation network includes K types of lightweight attention modules, and the computational complexity of the K types of lightweight attention modules is less than a preset value, and K is a positive integer.

25. An image encoding device, characterized in that: Applied to an encoding device, the device comprises: A transformation unit, configured to process the current image through an analysis transformation network to obtain a transformation value of the current image, wherein the analysis transformation network includes K types of lightweight attention modules, and the computational complexity of the K types of lightweight attention modules is less than a preset value, and K is a positive integer; The encoding unit is used to encode the current image according to the transformation value of the current image to obtain a code stream.

26. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program to implement the method as described in any one of claims 1 to 22 or 23 above.

27. A computer-readable storage medium, characterized in that: For storing computer programs; The computer program enables a computer to execute the method according to any one of claims 1 to 22 or 23 above.

28. A computer program product, characterized in that The method comprises computer instructions, which implement the method according to any one of claims 1 to 22 or 23 when executed by a processor.

Citation Information

Patent Citations

  • Image filtering method, coding method and related equipment

    CN113497941A

  • Image compression method based on deep self-attention transformation network

    CN114494472A

  • Image coding and decoding method and device for eliminating spatial redundancy

    CN115086680A

  • Original image processing method, model and device, electronic equipment and storage medium

    CN115293991A

  • Image coding and decoding method and device, equipment and storage medium

    CN117714705A

Cited By

  • Image enhancement and model training method and device, equipment, medium and product

    CN119671870A

  • Efficient image restoration method and model based on non-local information mandatory modeling

    CN120471776A

  • Explainable squeeze-excitation multi-scale fusion network system and method for aerial scene and coastal area recognition using remote sensing images

    US12711759B1

  • Method and system for aerial land recognition based on remote sensing images

    US12749304B1