Image colorization method and system based on limited data multi-scale object learning
By adopting a multi-scale target learning method in image coloring, using feature memory modules and multi-scale discriminators, combined with fusion loss functions, the problem of difficult color boundary distinction in small target areas under limited training data is solved, and the quality of image coloring is significantly improved. and effect.
Patent Information
- Application Number
- CN202210860392.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing image coloring methods are difficult to effectively distinguish the color boundaries of small target areas under limited training data, resulting in coloring errors and poor results.
A multi-scale target learning method based on limited data is adopted, the feature memory module is used to construct spatial and color features, the generator and multi-scale discriminator are trained, and the generator and discriminator are optimized by combining the fusion loss function to achieve effective coloring of images.
It improves the peak signal-to-noise ratio of the image coloring results, enhances the color boundary resolution and overall semantic perception effect of small target areas, and obtains more natural and vivid coloring images.
Smart Images

Figure CN115100435B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image colorization, and in particular to an image colorization method and a system thereof based on limited data multi-scale target learning. Background Art
[0002] The purpose of image colorization is to add color information to the input grayscale image to obtain a color image, which is convenient for scene understanding and the next stage of analysis and processing. Traditional image colorization research uses methods such as function mapping, color extension, and reference examples, which require a lot of manual intervention and are time-consuming and labor-intensive. In recent years, with the development of deep learning, many studies have solved image colorization tasks based on deep convolutional neural networks. Deep learning-based methods have made significant progress in grayscale image colorization tasks using abundant training data, but colorization models for limited training data still perform poorly, and there are examples of mottled colors in colored images and incorrect coloring of some areas.
[0003] The existing image colorization methods have the following problems: First, they do not consider the differences in the color areas occupied by different target areas in the image, and colorize the small target area and the main area as a whole, resulting in colorization errors in some areas. Second, the color boundaries of the small target area after colorization are relatively fuzzy. Finally, this method requires sufficient training data. When the training data is limited, the image colorization effect is not good. Summary of the invention
[0004] The purpose of the present invention is to provide an image colorization method and system based on limited data multi-scale target learning, so as to effectively solve the problem that the existing technology is limited by the scale of training data and cannot effectively distinguish the color boundaries of small target areas.
[0005] The technical solution of the present invention to solve the above technical problems is as follows:
[0006] The present invention provides an image colorization method based on finite data multi-scale target learning, and the image colorization method based on finite data multi-scale target learning comprises:
[0007] S1: Use feature memory module to construct spatial features and color features;
[0008] S2: Processing the grayscale image of the training image using a generator according to the spatial features and the color features to obtain a colored image;
[0009] S3: using a discriminator to discriminate the colored image and the training image to obtain a discrimination result;
[0010] S4: According to the discrimination result, the generator and the discriminator are trained using a fusion loss function to obtain a trained generator and a trained discriminator;
[0011] S5: Input the grayscale image of the test image into the trained generator to obtain a colored image of the test image.
[0012] Optionally, in step S1, the feature memory module structure is:
[0013] M=(K1,V1,A1),(K2,V2,A2),…,(K m ,V m ,A m )
[0014] Wherein, m is the capacity of the feature memory module, K represents the spatial feature memory for storing the input image, V represents the color feature memory, and A represents the age vector.
[0015] Optionally, in step S2, the generator includes a plurality of residual connection blocks, the plurality of residual connection blocks constitute a Unet structure and include an encoding part and a decoding part, and the encoding part and the decoding part form an axisymmetric structure.
[0016] Optionally, each of the residual connection blocks includes a first 3×3 convolutional layer, a first Zoom-IN module, a first Relu activation function layer, a second 3×3 convolutional layer, a second Zoom-IN module, a second Relu activation function layer, a first 2×2 convolutional layer and a third Zoom-IN module;
[0017] The first 3×3 convolution layer, the first Zoom-IN module, the first Relu activation function layer, the second 3×3 convolution layer and the second Zoom-IN module are connected in sequence, the first 2×2 convolution layer and the third Zoom-IN module are connected, the input of the first 3×3 convolution layer and the first 2×2 convolution layer is the grayscale image of the test image or the output result of the previous residual connection block, the output result of the second Zoom-IN module and the output result of the third Zoom-IN module are added on the feature channel, and the sum is used as the input of the second Relu activation function layer, and the output of the second Relu activation function layer is used as the output result of the residual connection block.
[0018] Optionally, in step S3, the discriminator includes a plurality of sub-discriminators, and the plurality of sub-discriminators are arranged in sequence and have different feature scales.
[0019] Optionally, the multiple sub-discriminators include a first sub-discriminator D1, a second sub-discriminator D2 and a third sub-discriminator D3, the first sub-discriminator D1 includes 4 fully convolutional layers, the second sub-discriminator D2 includes 5 fully convolutional layers, the third sub-discriminator D3 includes 6 fully convolutional layers, the output result of the last layer of the first sub-discriminator D1 is used as the input of the second sub-discriminator D2, the output result of the last layer of the second sub-discriminator D2 is used as the input of the third sub-discriminator D3, and the last layer of the third sub-discriminator D3 is used to output the discrimination result.
[0020] Optionally, the feature scale size output by the last layer of the first sub-discriminator D1 is 16×16;
[0021] The feature scale size output by the last layer of the second sub-discriminator D2 is 8×8;
[0022] The feature scale size output by the last layer of the third sub-discriminator D3 is 4×4.
[0023] Optionally, in step S4, the fusion loss function L G for:
[0024] L G =λ1*L adv +λ2*L sL1 +λ3*L p
[0025] Among them, L adv represents adversarial loss and Indicates obedience to x~P data The mathematical expectation of the data distribution, x represents the grayscale image, C represents the color feature, G(x,C) represents the output of the generator, y is the real image, D(·) represents the probability that the discriminator identifies the generated image as a real image, P data represents the noise vector that follows the x distribution, L sL1 represents the content smoothing L1 loss and y1 represents the ab channel value of the colored image, represents the ab channel value of the real image, δ represents the constraint term of the loss function, and L p represents the multi-feature semantic-aware loss and E i represents the expected value of the data distribution of the i-th layer, C i H i W represents the shape of the feature map of the i-th layer, φ i represents the i-th layer of the pre-trained neural network, i represents the i-th layer feature map, N represents the number of convolutional layers, and y predrepresents the colored image, λ1, λ2 and λ3 represent the adversarial loss L adv , content smoothing L1 loss L sL1 and multi-feature semantic-aware loss L p The weight coefficient of .
[0026] The present invention also provides an image colorization system based on the above-mentioned image colorization method based on limited data multi-scale target learning, and the image colorization system comprises:
[0027] A feature construction module, wherein the feature construction module is used to construct spatial features and color features using a feature memory module;
[0028] A colored image generation module, the colored image generation module is used to process the grayscale image of the training image using a generator according to the spatial features and the color features to obtain a colored image;
[0029] A discriminant module, the discriminant module is used to discriminate the colored image and the training image using a discriminator to obtain a discriminant result;
[0030] A training module, wherein the training module is used to train the generator and the discriminator according to the discrimination result by using a fusion loss function to obtain a trained generator and a trained discriminator;
[0031] A test recognition module is used to input the grayscale image of the test image into the trained generator to obtain a colored image of the test image.
[0032] The present invention has the following beneficial effects:
[0033] 1. The feature memory module provided by the present invention can establish the correspondence between space and color features and input it into the coloring network as color guidance information;
[0034] 2. The generator based on the Zoom-IN module can transfer color features on both sides of the codec at the same time, and use residual connections to improve the transfer capability of color features and the correctness of image semantics. After using this generator, the peak signal-to-noise ratio (the higher the better) of the colorized image on the public image dataset Hero Dataset reached 25.012, which is significantly higher than the result of 23.218 using the traditional generator;
[0035] 3. The multi-scale structure discriminator provided by the present invention has different receptive field sizes in the outputs of different scale discriminators, which can better constrain the generation effect of different image target sizes, thereby avoiding the situation where a single scale discriminator ignores small targets. After using the multi-scale discriminator, the peak signal-to-noise ratio (the higher the better) of the coloring result image on the public image dataset Hero Dataset reached 25.7, which is a certain improvement over the result of 24.459 using a single scale discriminator;
[0036] 4. In addition, the present invention redefines a multi-feature semantic perception loss, and thereby constructs a fusion loss function that integrates adversarial loss, content smoothness loss, and multi-feature semantic perception loss, which can enhance semantic similarity and obtain more natural and vivid colorized images. Finally, the peak signal-to-noise ratio (the higher the better) of the colorized image of the present invention on the public image dataset Hero Dataset reached 25.705, which is significantly superior to 20.217 in the existing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of an image colorization method based on limited data multi-scale target learning of the present invention;
[0038] Figure 2 This is a schematic diagram of the image coloring process of the present invention;
[0039] Figure 3 Schematic diagram of the structure of the residual connection block in the generator. DETAILED DESCRIPTION
[0040] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0041] Example
[0042] The present invention provides an image colorization method based on limited data multi-scale target learning, referring to Figure 1 As shown, the image colorization method based on limited data multi-scale target learning includes:
[0043] S1: Use feature memory module to construct spatial features and color features;
[0044] The present invention constructs a feature memory module that combines spatial features and color features, uses the feature values obtained by pre-training ResNet18-Pool5 as spatial features, and uses the R, G, and B values of the first ten main colors of the image as color features. During training, the cosine similarity between the input image and the spatial feature is calculated, and the closest color feature is returned through the K nearest neighbor algorithm as the color guidance information of the coloring network.
[0045] Specifically, the feature memory module is used to store three types of information, including: spatial feature memory K, color feature memory V, and age vector A. K stores the spatial feature information of the input image, which can calculate the cosine similarity with the input query image. V stores the color features of the input image, which is used for the conditional color feature input of the coloring network. Both K and V are extracted from the training data. The age vector A represents the age of the data in the memory but not used, and is used to update the feature memory module during training. The complete feature memory module structure is defined as:
[0046] M=(K1,V1,A1),(K2,V2,A2),…,(K m ,V m ,A m )
[0047] Wherein, m is the capacity of the feature memory module, which is generally set to 1.2 times of the training set. K represents a spatial feature memory for storing input images, V represents a color feature memory, and A represents an age vector.
[0048] The feature values obtained by pre-training ResNet18-Pool5 of the input image are recorded as the spatial features of the image; the R, G, and B values of the first ten main colors of the image are taken as color features.
[0049] This module provides color conditions for the coloring network. The training image is input and normalized by the ResNet18 feature extraction network to obtain the index q. According to the cosine similarity between the index q and the spatial feature memory K, the feature memory module calculates the k nearest neighbors of q and returns the color feature V value of the nearest neighbor as the color guidance information of the coloring network.
[0050] The input image of the present invention includes a grayscale image of a training image and / or a test image and / or a real image (the same below).
[0051] S2: Processing the grayscale image of the training image using a generator according to the spatial features and the color features to obtain a colored image;
[0052] In the present invention, reference is made to Figure 2 As shown, the generator includes multiple residual connection blocks, and the multiple residual connection blocks constitute a Unet structure and include an encoding part and a decoding part, and the encoding part and the decoding part are in an axisymmetric structure.
[0053] Optionally, refer to Figure 3As shown, each of the residual connection blocks includes a first 3×3 convolutional layer, a first Zoom-IN module, a first Relu activation function layer, a second 3×3 convolutional layer, a second Zoom-IN module, a second Relu activation function layer, a first 2×2 convolutional layer and a third Zoom-IN module;
[0054] The first 3×3 convolution layer, the first Zoom-IN module, the first Relu activation function layer, the second 3×3 convolution layer and the second Zoom-IN module are connected in sequence, the first 2×2 convolution layer and the third Zoom-IN module are connected, and the input of the first 3×3 convolution layer and the first 2×2 convolution layer is the grayscale image of the test image or the output result of the previous residual connection block.
[0055] Specifically, when the current residual connection block is the first residual connection block, the input of the first 3×3 convolutional layer and the first 2×2 convolutional layer is the grayscale image of the test image; when the current residual connection block is the second to nth residual connection block, the input of the first 3×3 convolutional layer and the first 2×2 convolutional layer is the output result of the previous residual connection block.
[0056] The output result of the second Zoom-IN module and the output result of the third Zoom-IN module are added on the feature channel, and the sum is used as the input of the second Relu activation function layer, and the output of the second Relu activation function layer is used as the output result of the residual connection block.
[0057] Specifically, the design of the generator first uses the Unet structure composed of residual connection blocks that have the ability to transfer shallow information to the deep layer of the network to retain effective information for the grayscale feature maps of targets of different sizes. Then, a Zoom-IN module with zooming characteristics is designed to obtain feature maps of different scales, and it is applied to the mean and variance parameters of color features to realize the colorization of grayscale images.
[0058] Specifically, the generator with Unet structure consists of an encoder and a decoder. The encoder part includes 5 layers of residual connection blocks with different downsampling resolutions. Here, 3×3 convolutional layers, Zoom-IN modules, Relu activation functions and 2×2 convolutional layers are used to form residual connection blocks. The decoder part is symmetrically designed with the encoder and is also composed of 5 layers of residual connection blocks. However, in order to achieve the upsampling effect of restoring different image resolutions, the 3×3 convolutional layer is replaced by a 3×3 transposed convolutional layer.
[0059] The Zoom-IN module is designed after the convolution layer. First, the weight and bias of the previous convolution layer are resized. The scale coefficient is calculated based on the width and height of each feature map, and the adjustment coefficient is constructed based on the weight and bias of the previous convolution layer on each channel, thereby obtaining the new convolution layer weight and bias. The above steps can obtain feature maps of different scales, which are applied to the mean and variance parameters of color features to achieve grayscale coloring. This design can achieve better coloring effects for feature maps of small target areas after scaling.
[0060] S3: using a discriminator to discriminate the colored image and the training image to obtain a discrimination result;
[0061] refer to Figure 2 As shown, the discriminator includes multiple sub-discriminators, which are arranged in sequence and have different feature scales.
[0062] Optionally, the multiple sub-discriminators include a first sub-discriminator D1, a second sub-discriminator D2 and a third sub-discriminator D3, the first sub-discriminator D1 includes 4 fully convolutional layers, the second sub-discriminator D2 includes 5 fully convolutional layers, the third sub-discriminator D3 includes 6 fully convolutional layers, the output result of the last layer of the first sub-discriminator D1 is used as the input of the second sub-discriminator D2, the output result of the last layer of the second sub-discriminator D2 is used as the input of the third sub-discriminator D3, and the last layer of the third sub-discriminator D3 is used to output the discrimination result.
[0063] Optionally, the feature scale size output by the last layer of the first sub-discriminator D1 is 16×16;
[0064] The feature scale size output by the last layer of the second sub-discriminator D2 is 8×8;
[0065] The feature scale size output by the last layer of the third sub-discriminator D3 is 4×4.
[0066] Specifically, the discriminator structure consists of 3 different sub-discriminators (D1, D2, D3), D1 is 4 fully convolutional layers, D2 is 5 fully convolutional layers, and D3 is 6 fully convolutional layers. Using different numbers of convolutional layers, three discriminator groups with different feature scale outputs are constructed, and the feature scales of the last layer output are 16×16, 8×8, and 4×4 respectively. The outputs of discriminators of different scales have different receptive field sizes, which can better constrain the generation effect of different image target sizes, thereby avoiding the situation where a single scale discrimination ignores small targets.
[0067] S4: According to the discrimination result, the generator and the discriminator are trained using a fusion loss function to obtain a trained generator and a trained discriminator;
[0068] In order to maximize the encouragement of natural and diverse color output, the present invention uses an adversarial loss L adv , content smoothing L1 loss L sL1 and multi-feature semantic-aware loss L p Among them, L p It is a customized multi-feature semantic-aware loss.
[0069] Adversarial loss L adv : Generative adversarial networks use adversarial loss to train the network and produce more diverse outputs. The goal of the generator G is to minimize the distribution difference between the generated data and the sample data, while the goal of the discriminator D is to maximize the probability of judging the real data as true. The adversarial loss is defined as:
[0070]
[0071] Where x is the input grayscale image, C is the color feature, G(x,C) is the output of the generator, and y is the real data.
[0072] Content smoothing L1 loss L sL1 : In order to minimize the content deviation between the pseudo image generated by the generator and the real image, a smooth L1 constraint is imposed on the distance between the ab channel values of the generated image and the real image. The content smooth L1 loss is defined as:
[0073]
[0074] Where y1 represents the ab channel value of the colored image, Represents the ab channel value of the real image, δ represents the constraint term of the loss function, and its value here is 1.
[0075] Multi-feature semantic-aware loss L p : In order to make the generated image semantically closer to the real image and increase the vividness of the generated image, the present invention redefines the multi-feature semantic perception loss. The generated image and the real image are respectively subjected to pre-trained convolutional layers with richer semantic information, and the semantic perception similarity is achieved by minimizing the L1 distance between the feature maps obtained by the two images through different convolutional layers. The feature maps after the three convolution modules conv3_1, conv4_1, and conv5_1 are selected respectively, and weights are assigned for the feature matching of each module, with the weight coefficients α1=1 / 8, α2=1 / 4, and α3=1 respectively. The formula of multi-feature semantic perception loss is defined as:
[0076]
[0077] In the formula, E i represents the expected value of the data distribution of the i-th layer, C i H i W represents the shape of the feature map of the i-th layer, φ i represents the i-th layer of the pre-trained neural network, i represents the i-th layer feature map, N represents the number of convolutional layers, and y pred Represents a shaded image.
[0078] The final fusion loss function is defined as:
[0079] L G =λ1*L adv +λ2*L sL1 +λ3*L p
[0080] In order to obtain better colorization effect, λ1, λ2 and λ3 represent the adversarial loss L adv , content smoothing L1 loss L sL1 and multi-feature semantic-aware loss L p The weight coefficients of the present invention are as follows: λ1=1,λ2=10,λ3=5*10 -4 .
[0081] S5: Input the grayscale image of the test image into the trained generator to obtain a colored image of the test image.
[0082] The present invention also provides an image colorization system based on the above-mentioned image colorization method based on limited data multi-scale target learning, and the image colorization system comprises:
[0083] A feature construction module, wherein the feature construction module is used to construct spatial features and color features using a feature memory module;
[0084] A colored image generation module, the colored image generation module is used to process the grayscale image of the training image using a generator according to the spatial features and the color features to obtain a colored image;
[0085] A discriminant module, the discriminant module is used to discriminate the colored image and the training image using a discriminator to obtain a discriminant result;
[0086] A training module, wherein the training module is used to train the generator and the discriminator according to the discrimination result by using a fusion loss function to obtain a trained generator and a trained discriminator;
[0087] A test recognition module is used to input the grayscale image of the test image into the trained generator to obtain a colored image of the test image.
[0088] The present invention has the following beneficial effects:
[0089] 1. The feature memory module provided by the present invention can establish the correspondence between space and color features and input it into the coloring network as color guidance information;
[0090] 2. The generator based on the Zoom-IN module can transfer color features on both sides of the codec at the same time, and use residual connections to improve the transfer capability of color features and the correctness of image semantics. After using this generator, the peak signal-to-noise ratio (the higher the better) of the colorized image on the public image dataset Hero Dataset reached 25.012, which is significantly higher than the result of 23.218 using the traditional generator;
[0091] 3. The multi-scale structure discriminator provided by the present invention has different receptive field sizes in the outputs of different scale discriminators, which can better constrain the generation effect of different image target sizes, thereby avoiding the situation where a single scale discriminator ignores small targets. After using the multi-scale discriminator, the peak signal-to-noise ratio (the higher the better) of the coloring result image on the public image dataset Hero Dataset reached 25.7, which is a certain improvement over the result of 24.459 using a single scale discriminator;
[0092] 4. In addition, the present invention redefines a multi-feature semantic perception loss, and thereby constructs a fusion loss function that integrates adversarial loss, content smoothness loss, and multi-feature semantic perception loss, which can enhance semantic similarity and obtain more natural and vivid colorized images. Finally, the peak signal-to-noise ratio (the higher the better) of the colorized image of the present invention on the public image dataset Hero Dataset reached 25.705, which is significantly superior to 20.217 in the existing method.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An image colorization method based on limited data multi-scale object learning, characterized in that: Image colorization methods based on limited data multi-scale object learning include: S1: Use feature memory module to construct spatial features and color features; S2: Processing the grayscale image of the training image using a generator according to the spatial features and the color features to obtain a colored image; S3: using a discriminator to discriminate the colored image and the training image to obtain a discrimination result; S4: According to the discrimination result, the generator and the discriminator are trained using a fusion loss function to obtain a trained generator and a trained discriminator; S5: Inputting the grayscale image of the test image into the trained generator to obtain a colored image of the test image; In step S1, the feature memory module structure is: <h2 style=";text-align:left;direction:ltr">M = (K1,V1,A1),(K2,V2,A2),…,(K<h2 style=";text-align:left;direction:ltr"> m <h2 style=";text-align:left;direction:ltr"> V<h2 style=";text-align:left;direction:ltr"> m <h2 style=";text-align:left;direction:ltr"> A<h2 style=";text-align:left;direction:ltr"> m <h2 style=";text-align:left;direction:ltr"> ) Wherein, m is the capacity of the feature memory module, K represents the spatial feature memory for storing the input image, V represents the color feature memory, and A represents the age vector; In step S2, the generator includes a plurality of residual connection blocks, the plurality of residual connection blocks constitute a Unet structure and include an encoding part and a decoding part, and the encoding part and the decoding part form an axisymmetric structure; Each of the residual connection blocks includes a first 3×3 convolutional layer, a first Zoom-IN module, a first Relu activation function layer, a second 3×3 convolutional layer, a second Zoom-IN module, a second Relu activation function layer, a first 2×2 convolutional layer and a third Zoom-IN module; The first 3×3 convolution layer, the first Zoom-IN module, the first Relu activation function layer, the second 3×3 convolution layer and the second Zoom-IN module are connected in sequence, the first 2×2 convolution layer and the third Zoom-IN module are connected, the input of the first 3×3 convolution layer and the first 2×2 convolution layer is the grayscale image of the test image or the output result of the previous residual connection block, the output result of the second Zoom-IN module and the output result of the third Zoom-IN module are added on the feature channel, and the sum is used as the input of the second Relu activation function layer, and the output of the second Relu activation function layer is used as the output result of the residual connection block; In step S3, the discriminator includes a plurality of sub-discriminators, and the plurality of sub-discriminators are arranged in sequence and have different feature scales; The multiple sub-discriminators include a first sub-discriminator D1, a second sub-discriminator D2 and a third sub-discriminator D3, the first sub-discriminator D1 includes 4 fully convolutional layers, the second sub-discriminator D2 includes 5 fully convolutional layers, the third sub-discriminator D3 includes 6 fully convolutional layers, the last layer output result of the first sub-discriminator D1 is used as the input of the second sub-discriminator D2, the last layer output result of the second sub-discriminator D2 is used as the input of the third sub-discriminator D3, and the last layer of the third sub-discriminator D3 is used to output the discrimination result; The feature scale size output by the last layer of the first sub-discriminator D1 is 16×16; The feature scale size output by the last layer of the second sub-discriminator D2 is 8×8; The feature scale size output by the last layer of the third sub-discriminator D3 is 4×4; In step S4, the fusion loss function L G for: L G =λ1*L adv +λ2*L sL1 +λ3*L p Among them, L adv represents adversarial loss and Indicates obedience to x~P data The mathematical expectation of the data distribution, x represents the grayscale image, C represents the color feature, G(x,C) represents the output of the generator, y is the real image, D(·) represents the probability that the discriminator identifies the generated image as a real image, P data represents the noise vector that follows the x distribution, L sL1 represents the content smoothing L1 loss and y1 represents the ab channel value of the colored image, represents the ab channel value of the real image, δ represents the constraint term of the loss function, and L p represents the multi-feature semantic-aware loss and E i represents the expected value of the data distribution of the i-th layer, C i H i W represents the shape of the feature map of the i-th layer, φ i represents the i-th layer of the pre-trained neural network, i represents the i-th layer feature map, N represents the number of convolutional layers, and y pred represents the colored image, λ1, λ2 and λ3 represent the adversarial loss L adv , content smoothing L1 loss L sL1 and multi-feature semantic-aware loss L p The weight coefficient of .
2. An image colorization system based on the image colorization method based on limited data multi-scale object learning according to claim 1, characterized in that: The image rendering system comprises: A feature construction module, wherein the feature construction module is used to construct spatial features and color features using a feature memory module; A colored image generation module, the colored image generation module is used to process the grayscale image of the training image using a generator according to the spatial features and the color features to obtain a colored image; A discriminant module, the discriminant module is used to discriminate the colored image and the training image using a discriminator to obtain a discriminant result; A training module, wherein the training module is used to train the generator and the discriminator according to the discrimination result by using a fusion loss function to obtain a trained generator and a trained discriminator; A test recognition module is used to input the grayscale image of the test image into the trained generator to obtain a colored image of the test image.
