Image joint processing method and system based on multi-task learning
Optimizing the image joint processing model through multi-task learning and joint loss functions solves the problems of high computational complexity and poor generalization ability of the multi-task model, achieves efficient image super-resolution and halftone processing, and improves model performance and computing efficiency.
Patent Information
- Application Number
- CN202410733392.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The existing multi-task models have high computational complexity and poor generalization ability, which limits the practical application effects of image super-resolution reconstruction and image halftone processing.
A joint loss function is designed using multi-task learning to jointly optimize image super-resolution reconstruction and image halftone, and build an image joint including a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module. Process the model and optimize the network structure through multi-scale atrous convolution and orthogonal position encoding.
It reduces the computational complexity of the network, improves the generalization ability, and enables simultaneous processing of super-resolution reconstruction and halftone image generation in a single model, improving the performance of both tasks without increasing the amount of additional calculations in the inference stage.
Smart Images

Figure CN118587091A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method and system for joint image processing based on multi-task learning. Background Art
[0002] Raster Image Processor (RIP) software technology converts digital image data into image dot data that can be accepted by the printer, which affects the effect of the image on the print medium. It is usually used in digital printing, printers, plotters and other equipment. There are three key technologies in RIP: image color separation, image super-resolution and image halftone.
[0003] Image halftoning technology is the process of converting a color-separated and super-resolved image into a binary image, that is, converting the image into a dot matrix containing only black and white. Through the delicate arrangement and size changes of dots, the effect of continuous tone images is visually simulated, making the printed image look rich in grayscale and color levels, rather than a simple black and white contrast.
[0004] Image super-resolution technology uses advanced software algorithms to finely reconstruct and restore low-resolution images (LR) to produce high-resolution (HR) images that are extremely rich in details. This technology plays an indispensable role in many key fields, especially in satellite remote sensing, medical imaging, security monitoring, image compression and transmission, etc., which have demonstrated its unique value. Although image super-resolution reconstruction technology based on deep learning has made significant progress, continuous research and technological innovation are still needed to fully realize its application value in real life. This includes but is not limited to improving algorithm efficiency, reducing resource consumption, and optimizing algorithm structure to adapt to different application scenarios.
[0005] Multi-task learning can jointly model the relevant information of multiple tasks by sharing the representation and learning process of the model, thereby improving the performance and generalization ability of each task. At present, most multi-task-based image joint models have problems such as complex model structure, large amount of calculation and poor generalization ability, which limit the practical application of these methods. Summary of the invention
[0006] To this end, the technical problem to be solved by the present invention is to overcome the problems of high computational complexity and poor generalization ability of the multi-task model in the prior art.
[0007] In order to solve the above technical problems, the present invention provides a method and system for joint image processing based on multi-task learning, which adopts a multi-task learning approach to jointly optimize image super-resolution reconstruction and image halftone, designs a joint loss function, and improves the performance of the two tasks at the same time, thereby realizing the simultaneous processing of super-resolution reconstruction and halftone image generation in a single model. The method comprises the following steps:
[0008] S1: constructing an image joint processing model; wherein the image joint processing model includes a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module, the output layer of the shallow feature extraction module is connected to the input layer of the deep feature extraction module, and two branches generated by the output layer of the deep feature extraction module are respectively connected to the super-resolution reconstruction module and the halftone reconstruction module;
[0009] S2: Designing a joint loss function to train the image joint processing model to obtain a trained image joint processing model;
[0010] S3: The trained image joint processing model generates a super-resolution image through the super-resolution reconstruction module, and generates a halftone image through the halftone reconstruction module.
[0011] In one embodiment of the present invention, the shallow feature extraction module is composed of a noise compensation module and a convolution layer with a convolution kernel of n×n;
[0012] The noise compensation block uses two collaborative convolutions as the feature map of the output of the previous network layer and the mapping of Gaussian noise, and then obtains the input of the next network layer through additive transformation.
[0013] In one embodiment of the present invention, the deep feature extraction module is constructed by sequentially connecting a plurality of cascaded residual blocks, wherein the cascaded residual block includes a CUNet module and a feature fusion module connected to the CUNet module;
[0014] Among them, the image joint processing model based on multi-task learning uses the deep feature extraction module to obtain a deep feature image, including: inputting a shallow feature image into the cascaded residual block, splicing the identity mapping of the shallow feature image and its output features after processing by the CUNet module, fusing the spliced features through the feature fusion module, obtaining a fused feature image as the input of the next CUNet module, and obtaining a deep feature image after processing by multiple cascaded residual blocks.
[0015] In one embodiment of the present invention, the CUNet module is based on an encoder-decoder architecture, and uses M jump connection blocks as basic blocks, wherein m jump connection blocks are used as encoders, and the remaining jump connection blocks are used as decoders. The output features of the m encoders are processed by the multi-scale hole convolution extraction module, and the features obtained by fusion and the output features of the encoder are used as the input of the decoder, and the multi-level features are spliced by the decoder;
[0016] The multi-scale dilated convolution extraction module uses the output features of the previous layer of network to undergo 1×1 point-by-point convolution processing, and then outputs dilated convolutions with expansion rates of 1, 2, and 3, and then obtains the input of the next layer of network through feature fusion.
[0017] In one embodiment of the present invention, the super-resolution reconstruction module is composed of a convolution with a convolution kernel of n×n and an upsampling block based on orthogonal position coding;
[0018] The super-resolution reconstruction module obtains a high-resolution image using the up-sampling block based on orthogonal position coding, including:
[0019] Extract features from the input image;
[0020] The extracted features are reordered, and the number of channels of the features is 3 (2n+1) 2 , each pixel in the feature corresponds to 3(2n+1) 2 The eigenvalues are divided into three equal parts, each corresponding to the features of the three RGB channels as the latent code of the pixel;
[0021] Select a pixel point in the input image, obtain the boundary point coordinates of the pixel point, define a query point in the area of the pixel point, obtain the nearest boundary point of the query point, and use the coordinate difference between the query point and the nearest boundary point as the orthogonal basis of the query point;
[0022] The orthogonal basis and the latent code of the point to be queried are subjected to matrix multiplication to calculate the RGB pixel value of the point to be queried, and each pixel value of the high-resolution image is rendered based on the RGB pixel value of the point to be queried, thereby obtaining a high-resolution image.
[0023] In one embodiment of the present invention, the halftone reconstruction module reconstructs the shallow feature image obtained by the shallow feature extraction module and the deep feature image obtained by the deep feature extraction module to obtain a halftone image.
[0024] In one embodiment of the present invention, the joint loss function The expression is:
[0025]
[0026] in, is the halftone loss, is the excess loss, the excess loss for:
[0027]
[0028] Among them, ||·|| represents L1 regularization, I SR represents the super-resolution image reconstructed from the low-resolution image through the image super-resolution model; N represents the number of high-resolution image and low-resolution image pairs contained in each batch during the training of the image super-resolution model; and Represent the super-resolution image I SR and high resolution image I HR The value of the i-th pixel in HR ,I SR ) represents the super-resolution image I SR and high resolution image I HR 's structural similarity.
[0029] In one embodiment of the present invention, the halftone loss The expression is:
[0030]
[0031] in, is the loss of hue consistency, is the blue noise loss, is the binary loss, For perceptual consistency loss, ω1, ω2, ω3, and ω4 are all hyperparameters;
[0032] The loss of hue consistency for:
[0033]
[0034] Where G(·) is a Gaussian filter, E Ic ∈I{·} represents all input images I in the training set c The average operator, O h Represents a halftone image;
[0035] The binary loss for:
[0036]
[0037] in is the pseudo halftone image before the binary gate, Cd is with A constant matrix of the same size, where all elements have the value d = {0, 1};
[0038] The perceptual consistency loss for:
[0039]
[0040] Where F(·) represents the inverse halftone mode.
[0041] In one embodiment of the present invention, the blue noise loss for:
[0042]
[0043] in, Indicates the loss of low-frequency components in the spectrum, represents the anisotropic loss in the high-frequency region, and σ is the weight factor;
[0044] The low frequency component loss for:
[0045]
[0046] Where DCT(·) represents discrete cosine transform, ⊙ represents element-wise product, and M is a constant binary mask;
[0047] The anisotropic loss in the high frequency region for:
[0048]
[0049] Among them, P i (f) and P i (f ρ ) represent the average power and sampling point power on the ith frequency band, respectively, and θ represents the number of frequency bands.
[0050] Based on the same inventive concept, the present invention also provides an image joint processing system based on multi-task learning, the system is used to implement the image joint processing method based on multi-task learning, and specifically includes the following modules:
[0051] A model construction module, used for constructing an image joint processing model; wherein the image joint processing model includes a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module, the output layer of the shallow feature extraction module is connected to the input layer of the deep feature extraction module, and two branches generated by the output layer of the deep feature extraction module are respectively connected to the super-resolution reconstruction module and the halftone reconstruction module;
[0052] A model training module, used for designing a joint loss function to train the image joint processing model to obtain a trained image joint processing model;
[0053] The result acquisition module is used for the trained image joint processing model to generate a super-resolution image through the super-resolution reconstruction module and to generate a halftone image through the halftone reconstruction module.
[0054] The above technical solution of the present invention has the following advantages compared with the prior art:
[0055] 1. The present invention can solve the problems of high computational complexity and single-scale super-resolution in existing image super-resolution reconstruction algorithms. It adopts a parameter-free upsampling module to achieve arbitrary-scale super-resolution and introduces a multi-scale hole convolution extraction module to reduce the computational complexity of the network and improve the generalization ability.
[0056] 2. The present invention performs joint modeling by sharing models. In the training phase, a joint loss function is designed to optimize the effects of image super-resolution and image half-toning at the same time, thereby improving the performance of both tasks at the same time. In the inference phase, separate task branches are used to implement image super-resolution or image half-toning, and the amount of calculation does not increase additionally. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein
[0058] Figure 1 is a flowchart of an implementation of an image joint processing method based on multi-task learning provided in an embodiment of the present invention;
[0059] Figure 2 is a structural schematic diagram of an image joint processing model based on multi-task learning provided in an embodiment of the present invention;
[0060] Figure 3 is a structural diagram of a CUNet module provided in an embodiment of the present invention;
[0061] Figure 4 is a schematic diagram of the structure of a jump connection block (DCB) provided in an embodiment of the present invention;
[0062] Figure 5 is a structural schematic diagram of a multi-scale dilated convolution extraction module (MDCB) provided in an embodiment of the present invention;
[0063] Figure 6 is an upsampling flow chart of an upsampling block based on orthogonal position encoding (OPE) provided in an embodiment of the present invention;
[0064] Figure 7 yes Figure 6 Flow chart of the method for obtaining the orthogonal basis of the query point in the middle;
[0065] Figure 8 is a structural schematic diagram of an image joint processing model based on multi-task learning for experimental verification provided in an embodiment of the present invention;
[0066] Fig. 9 is a structural schematic diagram of an image joint processing system based on multi-task learning provided in an embodiment of the present invention;
[0067] Description of the accompanying drawings in the specification: 100, model building module; 200, model training module; 300, result acquisition module. DETAILED DESCRIPTION
[0068] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0069] Embodiment 1
[0070] Reference Figures 1-2 As shown, the present invention proposes an image joint processing method based on multi-task learning, which includes the following steps:
[0071] S1: constructing an image joint processing model; wherein the image joint processing model includes a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module, the output layer of the shallow feature extraction module is connected to the input layer of the deep feature extraction module, and two branches generated by the output layer of the deep feature extraction module are respectively connected to the super-resolution reconstruction module and the halftone reconstruction module;
[0072] S2: Designing a joint loss function to train the image joint processing model to obtain a trained image joint processing model;
[0073] S3: The trained image joint processing model generates a super-resolution image through the super-resolution reconstruction module, and generates a halftone image through the halftone reconstruction module.
[0074] In S1, the multi-task learning-based image joint processing model includes a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module.
[0075] Specifically, the shallow feature extraction module is composed of a noise compensation module and a convolution layer with a convolution kernel of n×n; wherein the noise compensation block uses two collaborative convolutions as the feature map of the output of the previous layer of the network and the mapping of Gaussian noise respectively, and then obtains the input of the next layer of the network through additive changes.
[0076] Preferably, the shallow feature extraction module in this embodiment superimposes a layer of noise map on the original three-channel low-resolution image input, and then extracts shallow features by convolution with a convolution kernel of 3×3 and a filter number of 16:
[0077] PF=F SFE (Concat(I LR ,noise))
[0078] Among them, F SFE represents the shallow feature extraction operation, I LR Represents the input low-resolution image, noise represents the Gaussian noise map, and PF represents the shallow features of the image. The shallow feature PF is then used as the input of the deep feature module cascade residual block to further extract the deep features of the image.
[0079] The deep feature extraction module is constructed by sequentially connecting a plurality of cascaded residual blocks, wherein the cascaded residual block includes a CUNet module and a feature fusion module connected to the CUNet module;
[0080] Among them, the image joint processing model based on multi-task learning uses the deep feature extraction module to obtain a deep feature image, including: inputting a shallow feature image into the cascaded residual block, splicing the identity mapping of the shallow feature image and its output features after processing by the CUNet module, fusing the spliced features through the feature fusion module, obtaining a fused feature image as the input of the next CUNet module, and obtaining a deep feature image after processing by multiple cascaded residual blocks.
[0081] Preferably, in this embodiment, the deep feature extraction module is constructed using three cascade residual blocks (CRBs), including a CUNet module and a feature fusion module. The output of the shallow feature module is further used to extract deep features:
[0082] DF=F CRB (PF)
[0083] Among them, DF represents the deep features of the image, F CRB It represents the deep feature extraction operation, which is completed by three CRB modules. The processing flow is expressed as follows:
[0084]
[0085] in represents the operation of the i-th CUNet module. The Concat operation concatenates features instead of adding them directly. Fusion It represents the operation of the feature fusion module, which effectively fuses the output of the previous module and the current CUNet. It can fuse features at different levels, reduce the complexity of the model, and receive more useful information. This method also helps to avoid the gradient vanishing and explosion problems related to the deep learning model structure. The feature fusion module is composed of a convolution with a convolution kernel of 1×1 and a PReLU.
[0086] Furthermore, the CUNet module is based on an encoder-decoder architecture, using M jump connection blocks as basic blocks, wherein m jump connection blocks are used as encoders, and the remaining (Mm) jump connection blocks are used as decoders. The output features of the m encoders are processed by the multi-scale dilated convolution extraction module and the output features of the encoder are fused together as the input of the decoder, and the multi-level features are spliced by the decoder;
[0087] The multi-scale dilated convolution extraction module uses the output features of the previous layer of network to undergo 1×1 point-by-point convolution processing, and then outputs dilated convolutions with expansion rates of 1, 2, and 3, and then obtains the input of the next layer of network through feature fusion.
[0088] Preferably, the structure of the CUNet module is Figure 3 As shown in the figure, 9 skip connection blocks (DCBs) are used as basic blocks in the CUNet module, the first 5 DCBs are used as encoders (E1, E2, E3, E4, E5) for multi-level feature extraction, and the remaining 4 blocks are used as decoders (D1, D2, D3, D4) for feature fusion.
[0089] When the decoder features are fused, the jump connections of the decoders at the corresponding level are retained. Secondly, the output features of the five encoders are fused using the multi-scale dilated convolution extraction module (MDCB), so that the network can retain the original features to the greatest extent. The processing flow of the CUNet module is expressed as follows:
[0090]
[0091] MO=F MDCB (Concat(EO i ))i∈{1,2,3,4,5}
[0092]
[0093] in and Represent the operations of the i-th encoder and the i-th decoder respectively, CUI represents the input of the CUNet module, EO i and DO i Represent the output of the i-th encoder and the i-th decoder, respectively, and F MDCB Indicates the operation of MDCB, and MO is the output of MDCB. In order to indicate the hierarchical correspondence between the encoder and decoder, the two are connected in reverse order, and the decoder closest to the encoder is marked as 4.
[0094] The skip connection block (DCB) connects features along the channel dimension to achieve feature reuse, that is, the features generated by all previous convolution operations will be used as input in the current convolution operation through feature splicing, using fewer parameters and computational costs to improve network performance. The DCB structure is as follows: Figure 4 shown.
[0095] In order to achieve the purpose of lightweight model, the DCB module used in this embodiment only contains three convolutional layers, which can also effectively perform feature extraction operations. The convolutional layer in DCB includes a 3×3 convolution and a PReLU. In the feature extraction process, the original input of each convolutional layer is connected to the output of all previous convolutional layers through channel splicing, so the early feature information will be continuously retained and accessed by the subsequent convolutional layers. The output of the three layers of convolution is added pixel by pixel to obtain the final output feature, which can better utilize the features of all levels. The processing process of the DCB module is expressed by the following formula:
[0096] F1=FC1(I F )
[0097] F2=FC2(Concat(I F ,F1))
[0098] F3=FC3(Concat(I F ,F1,F2))
[0099] O F =F1+F2+F3
[0100] Among them I F Represents the input features of DCB, FC i represents the i-th convolutional layer operation, F i represents the output of the i-th convolutional layer, O F It represents the final output of the DCB block. The parameter information of the three convolutional layers in DCB is shown in Table 1. They all use the PReLU activation function, the convolution kernel size is 3×3, and the number of output channels of the convolution is 16. The difference is that the number of input channels of the convolution is different, which are 16, 32 and 48 respectively.
[0101] Table 1
[0102]
[0103] In traditional UNet, feature fusion is performed through long connections between corresponding encoders and decoders. However, after a layer of encoders and decoders, the details of the image are often lost. In addition, the number of output channels of the convolution layer in DCB is only 16, which will aggravate this problem. Therefore, a multi-scale dilated convolution extraction module (MDCB) is used to fuse the features output by the five encoders, and then the fused features are input to each encoder respectively, so that the encoder can learn information of different receptive fields. The structure of MDCB is as follows: Figure 5 shown.
[0104] The MDCB module first performs channel compression through a convolution layer with a convolution kernel of 1×1, and the feature dimension of the input multi-scale features is reduced. Then it is sent to three branches, which are composed of 3×3 dilated convolutions with expansion rates of 1, 2, and 3 respectively. This setting can have a wider receptive field without increasing network parameters. The processing flow of the MDCB module is expressed in the following mathematical formula:
[0105] I fd =F C (PReLU(I f ))
[0106]
[0107] O MDCB =PReLU(F fusion (Concat(B i ))),i∈{1,2,3}
[0108] Among them, I f is the input of the MDCB module, F C Indicates compression operation, I fd is the feature output after compression processing, represents the operation of the i-th dilated convolution branch, B i represents the output of the i-th dilated convolution branch, F fusion represents the fusion operation, using 3×3 convolution for fusion, O MFEB Indicates the final output characteristics of the MDCB module.
[0109] The super-resolution reconstruction module consists of a convolution with a kernel of n×n and an upsampling block based on orthogonal position encoding (OPE). OPE uses the two-dimensional coordinates of the query point and the local latent code as input, and then directly calculates the pixel value corresponding to the query point with a set of orthogonal bases. This method does not require training parameters but directly performs linear operations to reconstruct a high-resolution image. Therefore, compared with the commonly used implicit neural network representation method, the OPE-based method has higher computational efficiency and consumes less memory.
[0110] The multi-task learning-based image joint processing model uses the super-resolution reconstruction module to obtain a high-resolution image. The upsampling flow chart of the OPE-based method is as follows: Figure 6 As shown, including:
[0111] Extract features from the input image;
[0112] The extracted features are reordered, and the number of channels of the features is 3 (2n+1) 2 , each pixel in the feature corresponds to 3(2n+1) 2 The eigenvalues are divided into three equal parts, each corresponding to the features of the three RGB channels as the latent code of the pixel;
[0113] like Figure 7 As shown, a pixel point (a rectangular area formed by S1, S2, S3, and S4) is selected in the input image, the boundary point coordinates of the pixel point are obtained, and a query point q is defined in the area of the pixel point, and the nearest boundary point S1 of the query point q is obtained, and the coordinate difference between the query point and the nearest boundary point is used as the orthogonal basis P of the query point;
[0114] The orthogonal basis and the latent code of the point to be queried are subjected to matrix multiplication to calculate the RGB pixel value of the point to be queried, and each pixel value of the high-resolution image is rendered based on the RGB pixel value of the point to be queried, thereby obtaining a high-resolution image.
[0115] In this embodiment, the halftone reconstruction module reconstructs the shallow feature image obtained by the shallow feature extraction module and the deep feature image obtained by the deep feature extraction module to obtain a halftone image.
[0116] In S2, a joint loss function is designed to train the multi-task learning-based image joint processing model. The expression is:
[0117]
[0118] in, is the halftone loss, For excess loss.
[0119] The over-division loss It is composed of L1 loss and structural similarity loss, and its expression is:
[0120]
[0121] Among them, ||·|| represents L1 regularization, I SR represents the super-resolution image reconstructed from the low-resolution image through the image super-resolution model; N represents the number of high-resolution image and low-resolution image pairs contained in each batch during the training of the image super-resolution model; and Represent the super-resolution image I SR and high resolution image I HR The value of the i-th pixel in HR ,I SR ) represents the super-resolution image I SR and high resolution image I HR 's structural similarity.
[0122] Furthermore, the halftone loss The expression is:
[0123]
[0124] in, is the loss of hue consistency, is the blue noise loss, is the binary loss, For perceptual consistency loss, the hyperparameters ω1=0.6, ω2=0.3, ω3=0.1, and ω4=1 are set empirically.
[0125] The loss of hue consistency for:
[0126]
[0127] Where G(·) is a Gaussian filter, E Ic ∈I{·} represents all input images I in the training set c The average operator, O h Represents a halftone image;
[0128] The binary loss for:
[0129]
[0130] in is the pseudo halftone image before the binary gate, Cd is with A constant matrix of the same size, where all elements have the value d = {0, 1};
[0131] The perceptual consistency loss for:
[0132]
[0133] Where F(·) represents the inverse halftone mode.
[0134] Specifically, the blue noise loss for:
[0135]
[0136] in, Indicates the loss of low-frequency components in the spectrum, represents the anisotropic loss in the high-frequency region, and σ is the weight factor;
[0137] The low frequency component loss for:
[0138]
[0139] Where DCT(·) represents discrete cosine transform, ⊙ represents element-wise product, and M is a constant binary mask;
[0140] The anisotropic loss in the high frequency region for:
[0141]
[0142] Among them, P i (f) and P i (f ρ ) represent the average power and sampling point power on the ith frequency band, respectively, and θ represents the number of frequency bands.
[0143] This example uses the DIV2K dataset to train the model, which includes 800 training sets and 100 validation sets. The bilinear interpolation algorithm is used to generate low-resolution images (LR), and then the low-resolution images are randomly cropped into a size of 48×48 as input data. In order to expand the dataset, data enhancement methods (such as random rotation, translation, and flipping) are used to expand the dataset. In order to verify the reconstruction performance of the model, super-resolution test benchmark datasets are used: Set5, Set14, B100, and Urban100.
[0144] In training, RGB images of size 64×64 in LR images are used as input and corresponding HR as labels. All images are preprocessed by subtracting the average RGB value of the DIV2K dataset to obtain the image mean. The network is built based on the PyTorch framework and the model is trained using the NVIDIA GeForce RTX 2080Ti GPU. The model is trained using the ADAM optimizer, with β1=0.9, β2=0.999, the batch size is set to 16, and the learning rate is initialized to 10. -4 , the learning rate drops by half every 100 Epochs, and the entire model is trained for 1000 Epochs.
[0145] In order to verify the impact of different components in the network on the model performance, the present invention conducts ablation experiments on the noise compensation block (NCB), the multi-scale dilated convolution extraction module (MDCB), the dense connection block (DCB) and the activation function. In order to avoid the loss caused by the reduction of parameters, a 3×3 convolution with 64 filters (denoted by Conv-3-64) is used as the baseline model of CUNet, as shown in Figure 8 As shown in the figure. On this basis, NCB is first added to the shallow feature extraction module, then Conv-3-64 is replaced by DCB, then the ReLU activation function is replaced by PReLU, and finally MDCB is added, which is indicated by the dotted line in the figure. Peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) are used as the main evaluation indicators to measure the super-resolution reconstruction performance of the model.
[0146] The results of the Set5 test set × 4 times are shown in Table 2. It can be seen that the reconstruction effect on the baseline model is poor, and the reconstruction effect of the model has been improved to a certain extent after adding noise, indicating that noise helps to improve the performance of the model, and the increase in the number of parameters and the amount of calculation after the introduction of noise is not obvious. Subsequent experiments will further illustrate the impact of noise intensity on model performance. After the introduction of the DCB module, the performance of the model improved by 0.83 / 0.0127. This improvement illustrates the effectiveness of dense connections in making up for the lack of feature extraction capabilities of convolutional networks with small parameters. The dense connection block not only improves the performance of the model by promoting the flow of information between features, but also helps to reduce the number of parameters and the amount of calculation of the model, thereby improving processing efficiency. In addition, after adding the MDCB module and the PReLU activation function, the performance improved by 0.14 / 0.0022 and 0.07 / 0.0002, respectively, indicating that these two components are also important for improving model performance.
[0147] Table 2
[0148]
[0149] In order to verify the influence of the cascaded UNet module (CUNet) on the performance of the network model proposed in this invention, CUNet is replaced by a residual network with the same number of parameters for comparative experiments. The residual network selects the backbone network in the EDSR model, in which the number of channels of the convolutional layer is selected as 60 and the number of residual blocks is 8. The parameter comparison of the two modules is shown in Table 3.
[0150] Table 3
[0151]
[0152] The two networks were trained separately, and the PSNR / SSIM index was calculated on the Set5 test set. The experimental results are shown in Tables 4-8. Under the three magnification scales, the reconstruction effect of CUNet is better than that of the residual network-based model. This is because the U-type network combines multiple layers of information for deep information fusion, thus having good feature extraction capabilities.
[0153] Table 4
[0154]
[0155] In order to verify the influence of the multi-scale feature extraction module on the model performance, three multi-scale modules, MFEF, RFB and MSRB, were selected and added to the CRUN network for comparative experiments. The PSNR / SSIM index was calculated on the Set5 dataset. The experimental results are shown in Table 5. RFB and MDCB use the dilated convolution method to expand the receptive field, and the performance is improved to a certain extent. Compared with the other two modules, the MDCB module proposed in the present invention has a relatively small number of parameters and calculations, and the performance is the best, indicating that the multi-branch dilated convolution method can better increase the receptive field while retaining fine-grained features, so that the network has better reconstruction performance.
[0156] Table 5
[0157]
[0158] In order to verify the impact of input noise intensity on model performance, the noise intensity is set to 0.1, 0.2, 0.3, 0.4, 0.5 and 1.0 respectively to train the network, observe the impact of increasing noise intensity on the reconstruction effect, calculate the PSNR / SSIM index on the Set5 dataset, and the experimental results are shown in Table 6. It can be seen from the table that when the noise intensity is 0.3, the model performance is the best, and when the noise intensity increases, the performance decreases. Therefore, appropriate noise intensity is beneficial for the model to better learn the super-resolution mapping from a small amount of noise, which helps to improve the generalization ability of the model and can be better applied to super-resolution tasks in real scenes.
[0159] Table 6
[0160]
[0161]
[0162] In order to verify the impact of three upsampling modules: transposed convolution, sub-pixel convolution and orthogonal position coding on model performance, the super-resolution reconstruction module in the model uses these three upsampling modules to train the network, and performs ×4 times super-resolution on the Set5 dataset to calculate the PSNR / SSIM index. The experimental results are shown in Table 7. Orthogonal position coding performs best in both PSNR and SSIM indicators, which shows that orthogonal position coding upsampling technology can more effectively restore the details of high-resolution images. Compared with transposed convolution and sub-pixel convolution, it has significant advantages in maintaining image structural information and details. Orthogonal position coding can process high-frequency information in the image more accurately, thereby effectively improving the reconstruction performance of the model without increasing additional computational costs.
[0163] Table 7
[0164]
[0165] Embodiment 2
[0166] Based on the same inventive concept as the method described in Example 1, the present invention also provides an image joint processing system based on multi-task learning, and the system is used to implement the image joint processing method based on multi-task learning described in Example 1, such as Fig. 9 As shown, the system specifically includes the following modules:
[0167] A model construction module, used for constructing an image joint processing model; wherein the image joint processing model includes a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module, the output layer of the shallow feature extraction module is connected to the input layer of the deep feature extraction module, and two branches generated by the output layer of the deep feature extraction module are respectively connected to the super-resolution reconstruction module and the halftone reconstruction module;
[0168] A model training module, used for designing a joint loss function to train the image joint processing model to obtain a trained image joint processing model;
[0169] The result acquisition module is used for the trained image joint processing model to generate a super-resolution image through the super-resolution reconstruction module and to generate a halftone image through the halftone reconstruction module.
[0170] The present embodiment proposes a multi-task learning-based image joint processing system, which is used to implement the aforementioned multi-task learning-based image joint processing method. Therefore, the specific implementation method of the multi-task learning-based image joint processing system can be seen from the aforementioned multi-task learning-based image joint processing method embodiment part. For example, the model construction module 100, the model training module 200 and the result acquisition module 300 are respectively used to implement the steps S1, S2 and S3 of the multi-task learning-based image joint processing method in the first embodiment. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part. In order to avoid redundancy, it will not be repeated here.
[0171] It can be seen from the above embodiments that the present invention proposes to jointly learn two types of tasks by means of multi-task learning, and integrate the two tasks of image super-resolution and image halftoning by means of a novel framework. In the training phase, joint modeling is performed by means of weight sharing, and a joint loss function is designed to simultaneously optimize the performance of image super-resolution and image halftoning. In the inference phase, although the model is trained as a whole, the two tasks are processed independently, which means that when generating super-resolution images or halftone images, only the corresponding reconstruction module needs to be used, and the entire model does not need to be involved in the calculation. Therefore, this method does not increase the amount of additional model parameters and calculations.
[0172] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0173] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0174] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0175] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0176] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A method for joint image processing based on multi-task learning, characterized in that: The following steps are involved: S1: constructing an image joint processing model; wherein the image joint processing model includes a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module, the output layer of the shallow feature extraction module is connected to the input layer of the deep feature extraction module, and two branches generated by the output layer of the deep feature extraction module are respectively connected to the super-resolution reconstruction module and the halftone reconstruction module; S2: Designing a joint loss function to train the image joint processing model to obtain a trained image joint processing model; S3: The trained image joint processing model generates a super-resolution image through the super-resolution reconstruction module, and generates a halftone image through the halftone reconstruction module.
2. The image joint processing method based on multi-task learning according to claim 1, characterized in that: The shallow feature extraction module is composed of a noise compensation module and a convolution layer with a convolution kernel of n×n; The noise compensation block uses two collaborative convolutions as the feature map of the output of the previous network layer and the mapping of Gaussian noise, and then obtains the input of the next network layer through additive transformation.
3. The image joint processing method based on multi-task learning according to claim 1, characterized in that: The deep feature extraction module is constructed by sequentially connecting a plurality of cascaded residual blocks, wherein the cascaded residual block includes a CUNet module and a feature fusion module connected to the CUNet module; Among them, the image joint processing model based on multi-task learning uses the deep feature extraction module to obtain a deep feature image, including: inputting a shallow feature image into the cascaded residual block, splicing the identity mapping of the shallow feature image and its output features after processing by the CUNet module, fusing the spliced features through the feature fusion module, obtaining a fused feature image as the input of the next CUNet module, and obtaining a deep feature image after processing by multiple cascaded residual blocks.
4. The image joint processing method based on multi-task learning according to claim 3 is characterized in that: The CUNet module is based on an encoder-decoder architecture and uses M jump connection blocks as basic blocks, of which m jump connection blocks are used as encoders and the remaining jump connection blocks are used as decoders. The output features of the m encoders are processed by the multi-scale dilated convolution extraction module and the output features of the encoder are used as the input of the decoder, and the multi-level features are spliced by the decoder. The multi-scale dilated convolution extraction module uses the output features of the previous layer of network to undergo 1×1 point-by-point convolution processing, and then outputs dilated convolutions with expansion rates of 1, 2, and 3, and then obtains the input of the next layer of network through feature fusion.
5. The image joint processing method based on multi-task learning according to claim 1, characterized in that: The super-resolution reconstruction module is composed of a convolution with a convolution kernel of n×n and an upsampling block based on orthogonal position coding; The super-resolution reconstruction module obtains a high-resolution image using the up-sampling block based on orthogonal position coding, including: Extract features from the input image; The extracted features are reordered, and the number of channels of the features is 3 (2n+1) 2 , each pixel in the feature corresponds to 3(2n+1) 2 The eigenvalues are divided into three equal parts, each corresponding to the features of the three RGB channels as the latent code of the pixel; Select a pixel point in the input image, obtain the boundary point coordinates of the pixel point, define a query point in the area of the pixel point, obtain the nearest boundary point of the query point, and use the coordinate difference between the query point and the nearest boundary point as the orthogonal basis of the query point; The orthogonal basis and the latent code of the point to be queried are subjected to matrix multiplication to calculate the RGB pixel value of the point to be queried, and each pixel value of the high-resolution image is rendered based on the RGB pixel value of the point to be queried, thereby obtaining a high-resolution image.
6. The image joint processing method based on multi-task learning according to claim 1, characterized in that: The halftone reconstruction module reconstructs the shallow feature image obtained by the shallow feature extraction module and the deep feature image obtained by the deep feature extraction module to obtain a halftone image.
7. The image joint processing method based on multi-task learning according to claim 1, characterized in that: The joint loss function The expression is: in, is the halftone loss, is the excess loss, the excess loss for: Among them, ||·|| represents L1 regularization, I SR represents the super-resolution image reconstructed from the low-resolution image through the image super-resolution model; N represents the number of high-resolution image and low-resolution image pairs contained in each batch during the training of the image super-resolution model; and Represent the super-resolution image I SR and high resolution image I HR The value of the i-th pixel in HR ,I SR ) represents the super-resolution image I SR and high resolution image I HR 's structural similarity.
8. The image joint processing method based on multi-task learning according to claim 7, characterized in that: The halftone loss The expression is: in, is the loss of hue consistency, is the blue noise loss, is the binary loss, For perceptual consistency loss, ω1, ω2, ω3, and ω4 are all hyperparameters; The loss of hue consistency for: Where G(·) is a Gaussian filter, E Ic ∈I{·} represents all input images I in the training set c The average operator, O h Represents a halftone image; The binary loss for: in is the pseudo halftone image before the binary gate, C d is with A constant matrix of the same size, where all elements have the value d = {0, 1}; The perceptual consistency loss for: Where F(·) represents the inverse halftone mode.
9. The image joint processing method based on multi-task learning according to claim 8, characterized in that: The blue noise loss for: in, Indicates the loss of low-frequency components in the spectrum, represents the anisotropic loss in the high-frequency region, and σ is the weight factor; The low frequency component loss for: Where DCT(·) represents discrete cosine transform, ⊙ represents element-wise product, and M is a constant binary mask; The anisotropic loss in the high frequency region for: Among them, P i (f) and P i (f ρ ) represent the average power and sampling point power on the ith frequency band, respectively, and θ represents the number of frequency bands.
10. An image joint processing system based on multi-task learning, characterized in that: The system is used to implement the image joint processing method based on multi-task learning according to any one of claims 1 to 9, and specifically includes the following modules: A model construction module, used for constructing an image joint processing model; wherein the image joint processing model includes a shallow feature extraction module, a deep feature extraction module, a super-resolution reconstruction module and a halftone reconstruction module, the output layer of the shallow feature extraction module is connected to the input layer of the deep feature extraction module, and two branches generated by the output layer of the deep feature extraction module are respectively connected to the super-resolution reconstruction module and the halftone reconstruction module; A model training module, used for designing a joint loss function to train the image joint processing model to obtain a trained image joint processing model; The result acquisition module is used for the trained image joint processing model to generate a super-resolution image through the super-resolution reconstruction module and to generate a halftone image through the halftone reconstruction module.
Citation Information
Patent Citations
Image super-resolution reconstruction method based on residual learning
CN111754403A
Image processing method and device
CN112991165A
Image super-resolution network model and reconstruction method
CN116091313A
Image halftone method and system based on improved residual network, and medium
CN116934618A
Construction method, device and application of image super-resolution reconstruction model
CN116993592A
Cited By
Half-tuned image super-resolution reconstruction method and system
CN121304438A
Half-tone image super-resolution reconstruction method and system
CN121304438B
