Unsupervised color constancy method based on achromatic priori guidance

By using the spatial attention mechanism and U-shaped codec neural network in the color constancy algorithm, combined with the large light source-free label dataset Flicker30k for unsupervised training, the problems of equipment differences and insufficient datasets are solved, and fast and accurate Image color correction, suitable for images acquired by different devices.

CN119205532APending Publication Date: 2024-12-27NANJING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411250178.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing color constancy algorithms require retraining when processing images acquired by different devices, and the lack of real light annotations to large data sets lead to long training and unstable results.

Method used

A method of unsupervised color constant based on deep learning was designed, using the spatial attention mechanism module and U-shaped codec neural network to construct the image light source estimation network S-SqueezeUnet, and unsupervised training was performed using a large light source-free label dataset Flicker30k. , by using angle error as a loss function, a fast and accurate color offset image calibration is achieved.

Benefits of technology

This method can improve processing speed on the basis of ensuring model accuracy, and is suitable for imbalanced images acquired by any device without retraining, significantly improving the accuracy and stability of color correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205532A_ABST
    Figure CN119205532A_ABST
Patent Text Reader

Abstract

The invention discloses an achromatic prior guidance-based unsupervised color constancy method, which relates to the field of image processing, and comprises the following steps of: designing a U-shaped coding and decoding color constancy network model, taking a network public large light source-free label data set as a training set, and inputting the training set into the network model for training; designing a space attention mechanism, and adding the model to further improve the performance; an unsupervised training method is designed, the training process does not depend on knowledge of the actual color of a light source in a scene, a training network detects achromatic pixels after a color image is converted into a gray level or a gradient, network parameters are adjusted according to a loss function gradient until the maximum number of iterations is reached, and a network model is output; and inputting a test set image with a real light source label into the trained network model, and outputting a color corrected image. According to the improved network model, the error between image light source estimation and a truth value, the visual effect of an image and the compatibility of equipment are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to an unsupervised color constancy method based on achromatic a priori guidance. Background Art

[0002] The color attribute of an object is an important part of the human eye's perception of the world. The color of an object will change under different light sources, but the human eye can maintain a constant perception of the color of the object under different light conditions. This characteristic is called the color constancy of the human eye. Unlike the human eye, in digital images captured by imaging devices, the light source will cause the color of objects in the image to change. These color changes will affect the performance of downstream image tasks such as image understanding and image segmentation algorithms. In practical applications, the captured images are often affected by various conditions such as the environment, lighting, and weather, and the image quality is therefore reduced. Image processing algorithms are needed to eliminate the influence of scene light sources in digital images as much as possible and restore the color of objects in the image to the standard light source. This type of method for restoring the color of image objects is collectively referred to as a color constancy algorithm.

[0003] Color constancy algorithms are usually divided into two categories: one is based on statistics, and the other is based on learning. Statistical algorithms have the characteristics of being unsupervised. They analyze the statistical laws of color in an image, find gray pixels in the image, and estimate the light source without labeling the data. For example, the White Patch, Max RGB, and Greyworld algorithms based on Retinex theory. These algorithms are easy to understand and calculate and are relatively simple, but they have high requirements for image scene conditions. When the image does not meet the scene requirements of these algorithms, the accuracy of the algorithms will be greatly reduced.

[0004] Learning-based algorithms are divided into color constancy algorithms based on traditional learning and color constancy algorithms based on deep learning. Color constancy algorithms based on traditional learning include related color method, color gamut mapping method and Bayesian color constancy algorithm. This type of algorithm also has high requirements for data sets. If the data set does not contain most of the spatial and texture information, it will produce inaccurate light source estimation, which will eventually affect the effect of the algorithm. Algorithms based on deep learning have gradually emerged in recent years. As a classic framework of deep learning, convolutional neural networks can extract image features from multiple dimensions and obtain estimated illumination values ​​of images by training with a large number of data sets. CNN has achieved higher efficiency and better results in color constancy algorithms than statistical algorithms and traditional learning algorithms. It was first calculated by Bianco et al. using AlexNet and SVR and CNN-based models. et al. used a model with 5 convolutional layers and a convolution kernel of size 1×1. The fully convolutional neural network Fc4 proposed by Hu et al. achieved higher efficiency and accuracy by dividing the image into blocks and assigning different confidence levels to different image blocks to estimate the light source. However, the training and testing of these networks require a large number of calibration training sets with known real lighting, which is very time-consuming. In addition, the trained model can only be used for images obtained by a single device. For devices that have not been seen in the training set, retraining is still required to obtain accurate correction results. Summary of the invention

[0005] In order to overcome the above-mentioned deficiencies of the prior art, the present invention provides an unsupervised color constancy method based on deep learning to achieve fast and accurate color correction of color-biased images.

[0006] The technical solution to achieve the purpose of the present invention is: an unsupervised color constancy method based on achromatic a priori guidance, comprising the following steps:

[0007] Step 1: Construct a spatial attention mechanism module S;

[0008] Step 2: Combine the channel attention mechanism module S in step 1 with the U-type encoding and decoding neural network to construct the image light source estimation network S-SqueezeUnet;

[0009] Step 3: Construct the loss function of the image light source estimation network S-SqueezeUnet;

[0010] Step 4: Initialize the parameters of the image light source estimation network S-SqueezeUnet: learning rate lr, patch-size of each batch of images sent to the network, and maximum number of iterations;

[0011] Step 5: Use Flicker30k, a large dataset of images without light source labels for image recognition and retrieval, as training images and input them into the image light source estimation network S-SqueezeUnet until the loss function converges to obtain a trained S-SqueezeUnet network model.

[0012] Step 6: Input the color-biased image with the real lighting label into the S-Squeeze-Unet network trained in step 5 to perform image light source estimation and color correction.

[0013] Preferably, constructing the spatial attention mechanism module S in step 1 includes the following steps:

[0014] Step 1.1: Compress the spatial features of the input feature map, perform global maximum pooling on the input feature map, and find the maximum value of all pixel values ​​in each channel map. The feature map changes from a matrix of [H, W, C] to a matrix of [H, W, 1], where [H, W, C] represents the number of channels, width, and height of the feature map.

[0015] Step 1.2: Compress the spatial features of the input feature map, perform global average pooling on the input feature map, average all pixel values ​​of each channel map, and convert the feature map from a [H, W, C] matrix to a [H, W, 1] matrix;

[0016] Step 1.3: stack the feature maps after maximum pooling and average pooling in the channel dimension, and the feature map becomes a matrix of [H, W, 2];

[0017] Step 1.4: Convolve the feature map to fuse channel information. The feature map changes from a matrix of [H, W, 2] to a matrix of [H, W, 1]. Multiply the normalized weights and the original input feature map channel by channel to output a feature map with spatial attention.

[0018] Preferably, the spatial attention mechanism module S in step 2 is combined with the U-type encoding and decoding neural network to construct an image light source estimation network S-SqueezeUnet, wherein the network includes an input layer, a hidden layer, and an output layer, wherein the input layer is used to input the original image, the hidden layer is used to perform convolution calculation and deconvolution calculation on the input image, and the output layer is used to output the illumination estimation;

[0019] The hidden layer adopts an encoder-decoder structure consisting of 4 pairs of encoding layers and decoding layers;

[0020] The output of each coding layer is input to the mirror decoding layer according to the skip connection processing method.

[0021] Preferably, the spatial attention mechanism module S in step 2 is combined with the U-type encoding and decoding neural network to construct the specific structure of the image light source estimation network S-SqueezeUnet as follows:

[0022] Encoding layer 1: Input a 256*256 feature map with 3 channels, perform two convolutions, add a spatial attention module, generate a weighted feature map, and output a 120*120 feature map with 64 channels;

[0023] Coding layer 2: Input the feature map output by coding layer 1, perform one maximum pooling and two fire convolution blocks, where each fire convolution block contains two 1*1 output convolution layers and one 3*3 convolution layer, add a spatial attention module, generate a weighted feature map, and output a 60*60 feature map with 128 channels;

[0024] Coding layer 3: Input the feature map output by coding layer 2, perform one maximum pooling and two fire convolution blocks, add a spatial attention module, generate a weighted feature map, and output a 30*30 feature map with 256 channels;

[0025] Coding layer 4: Input the feature map output by coding layer 3, perform a maximum pooling and four fire convolution blocks, add a spatial attention module, generate a weighted feature map, and output a 15*15 feature map with 512 channels;

[0026] Decoding layer 1: Input the feature map output by encoding layer 4, perform upsampling and convolution once, and output a 30*30 feature map with 256 channels;

[0027] Decoding layer 2: Input the feature map output by decoding layer 1, concatenate this feature map with the feature map output by encoding layer 3, perform convolution and upsampling after concatenation, and output a 60*60 feature map with 128 channels;

[0028] Decoding layer 3: Input the feature map output by decoding layer 2, concatenate this feature map with the feature map output by encoding layer 2, perform convolution and upsampling after concatenation, and output a 120*120 feature map with 64 channels;

[0029] Decoding layer 4: Input the feature map output by decoding layer 3, concatenate this feature map with the feature map output by encoding layer 1, perform convolution and upsampling after concatenation, and output a 256*256 feature map with 3 channels.

[0030] Preferably, the loss function of constructing the image light source estimation network S-SqueezeUnet in step 3 is specifically:

[0031]

[0032] In the color constancy algorithm, in order to intuitively represent the color of the light source, the chromaticity value of the light source is directly used to represent the light source. When measuring the illumination error, the brightness of the light source can be easily adjusted by the modulus value of the light source vector. Therefore, it is only necessary to compare the vector direction difference between the estimated light source and the real light source, and ignore the modulus value difference of the light source vector. The chromaticity of the light source consists of three channels of red, green and blue. The angle between the estimated light source and the real light source in three-dimensional space is called the angle error. Therefore, the angle error is selected as the correction model parameter of the loss function, where, represents the normalized light source estimation value of the input image after each round of network training, is the normalized light source truth value of the input image.

[0033] Preferably, in step 5, the image Flicker30k of the large dataset without light source label for image recognition and retrieval is used as a training image, which is input into the image light source estimation network S-SqueezeUnet until the loss function converges to obtain a trained S-SqueezeUnet network model, and the steps are as follows:

[0034] Step 5.1. The main difficulty in applying deep learning to color constancy methods is the lack of a large dataset with real light source annotations. The present invention assumes that the training images are roughly balanced and the light source color is close to gray. A large dataset without light source labels is used to train the network image to detect achromatic pixels in an unsupervised setting, so that the real light source color of the image is not required. The network estimates the cosine of the angle between the light source and the gray axis as the loss function. By minimizing the loss function, the network will learn to assign high weights to possible achromatic pixels. If the network can see the input color image, the detection of achromatic pixels and the assignment of weights will become simple. In order to force the network to learn more complex strategies, the present invention provides a grayscale or gradient version of the color image to the network input.

[0035] Step 5.2: Use the loss function to optimize the network parameters according to the Adam optimization algorithm; crop and rotate the training set according to the patch-size and send it to the network, train until the maximum number of iterations, and obtain the trained network model.

[0036] Compared with the prior art, the present invention has the following significant advantages:

[0037] (1) The present invention designs an S-SqueezeUnet network structure, and uses the core module of SqueezeNet as the Fire convolution module to extract image features, which can improve the processing speed of the model while ensuring the accuracy of the model. The U-type network structure is used to directly connect the encoder and the decoder through a jump connection, which effectively retains the high-resolution features. In view of the fact that some feature layers have a large effect while some feature layers have a small effect in the process of extracting image features from feature maps, a spatial attention mechanism module S is constructed to ensure that channel weights are adaptively given based on feature map extraction, so that feature maps with a large effect have a greater impact on the results. Therefore, in the final result, it is more effective in extracting features than ordinary convolutional layers;

[0038] (2) Using the large dataset image Flicker30k as training images instead of a dataset with real lighting labels solves the problem of insufficient datasets. In addition, the model trained through unsupervised training can process unbalanced images obtained by any device without retraining.

[0039] The present invention will be further described below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 The present invention is a flowchart of an unsupervised color constancy method based on achromatic prior guidance.

[0041] Figure 2 Schematic diagram of the spatial attention mechanism.

[0042] Figure 3 This is the network structure diagram of S-SqueezeUnet.

[0043] Figure 4 The following are the image test results of each algorithm on the Color Checker dataset.

[0044] Figure 5 The image test results of each algorithm on the NUS dataset are shown below. Specific implementation plan

[0045] Combination Figure 1 , an unsupervised color constancy method based on achromatic prior guidance, comprising the following steps:

[0046] Step 1: Combine Figure 2 , construct a spatial attention mechanism module S, which is used to adaptively give channel weights based on feature map extraction, so that feature maps with greater effects have a greater impact on the results. The specific process of the spatial attention mechanism module S processing the input feature map includes the following steps:

[0047] Step 1.1: Compress the spatial features of the input feature map, perform global maximum pooling on the input feature map, and find the maximum value of all pixel values ​​in each channel map. The feature map changes from a matrix of [H, W, C] to a matrix of [H, W, 1], where [H, W, C] represents the number of channels, width, and height of the feature map.

[0048] Step 1.2: Compress the spatial features of the input feature map, perform global average pooling on the input feature map, average all pixel values ​​of each channel map, and convert the feature map from a [H, W, C] matrix to a [H, W, 1] matrix;

[0049] Step 1.3: stack the feature maps after maximum pooling and average pooling in the channel dimension, and the feature map becomes a matrix of [H, W, 2];

[0050] Step 1.4: Convolve the feature map to fuse channel information, and the feature map changes from a matrix of [H, W, 2] to a matrix of [H, W, 1]. Multiply the normalized weights and the original input feature map channel by channel to output a feature map with spatial attention.

[0051] Step 2, construct an image light source estimation network S-SqueezeUnet; the network includes an input layer, a hidden layer, and an output layer, the input layer is used to input the original image, the hidden layer is used to perform convolution calculation and deconvolution calculation on the input image, and the output layer is used to output the light estimation;

[0052] The hidden layer adopts an encoder-decoder structure consisting of 4 pairs of encoding layers and decoding layers;

[0053] The output of each coding layer is input to the mirror decoding layer according to the skip connection processing method.

[0054] Encoding layer 1: Input a 256*256 feature map with 3 channels, perform two convolutions, add a spatial attention module, generate a weighted feature map, and output a 120*120 feature map with 64 channels;

[0055] Coding layer 2: Input the feature map output by coding layer 1, perform one maximum pooling and two fire convolution blocks, where each fire convolution block contains two 1*1 output convolution layers and one 3*3 convolution layer, add a spatial attention module, generate a weighted feature map, and output a 60*60 feature map with 128 channels;

[0056] Coding layer 3: Input the feature map output by coding layer 2, perform one maximum pooling and two fire convolution blocks, add a spatial attention module, generate a weighted feature map, and output a 30*30 feature map with 256 channels;

[0057] Coding layer 4: Input the feature map output by coding layer 3, perform a maximum pooling and four fire convolution blocks, add a spatial attention module, generate a weighted feature map, and output a 15*15 feature map with 512 channels;

[0058] Decoding layer 1: Input the feature map output by encoding layer 4, perform upsampling and convolution once, and output a 30*30 feature map with 256 channels;

[0059] Decoding layer 2: Input the feature map output by decoding layer 1, concatenate this feature map with the feature map output by encoding layer 3, perform convolution and upsampling after concatenation, and output a 60*60 feature map with 128 channels;

[0060] Decoding layer 3: Input the feature map output by decoding layer 2, concatenate this feature map with the feature map output by encoding layer 2, perform convolution and upsampling after concatenation, and output a 120*120 feature map with 64 channels;

[0061] Decoding layer 4: Input the feature map output by decoding layer 3, concatenate this feature map with the feature map output by encoding layer 1, perform convolution and upsampling after concatenation, and output a 256*256 feature map with 3 channels.

[0062] Step 3: Construct the loss function of the image light source estimation network S-SqueezeUnet as follows:

[0063]

[0064] In the color constancy algorithm, in order to intuitively represent the color of the light source, the chromaticity value of the light source is directly used to represent the light source. When measuring the illumination error, the brightness of the light source can be easily adjusted by the modulus value of the light source vector. Therefore, it is only necessary to compare the vector direction difference between the estimated light source and the real light source, and ignore the modulus value difference of the light source vector. The chromaticity of the light source consists of three channels of red, green and blue. The angle between the estimated light source and the real light source in three-dimensional space is called the angle error. Therefore, the angle error is selected as the correction model parameter of the loss function, where, represents the normalized light source estimation value of the input image after each round of network training, is the normalized light source truth value of the input image.

[0065] Step 4: Initialize the image light source estimation network S-SqueezeUnet parameters: learning rate lr, patch-size of each batch of images sent to the network, and maximum number of iterations, as follows:

[0066] Set the input image patch-size to 256×256 and the initial learning rate to 1×10 -4 , the learning rate lr parameter decreases with the number of training rounds epoch.

[0067] Step 5: Use Flicker30k, a large dataset of images without light source labels for image recognition and retrieval, as training images. Assume that the image colors in this dataset are approximately balanced, so the labels are all set to 1 during the training process. Input them into the image light source estimation network S-SqueezeUnet until the loss function converges, and obtain the trained S-SqueezeUnet network model, as follows:

[0068] Step 5.1. The main difficulty in applying deep learning to color constancy methods is the lack of a large dataset with real light source annotations. The present invention assumes that the training images are roughly balanced and the light source color is close to gray. A large dataset without light source labels is used to train the network image to detect achromatic pixels in an unsupervised setting, so that the real light source color of the image is not required. The network estimates the cosine of the angle between the light source and the gray axis as the loss function. By minimizing the loss function, the network will learn to assign high weights to possible achromatic pixels. If the network can see the input color image, the detection of achromatic pixels and the assignment of weights will become simple. In order to force the network to learn more complex strategies, the present invention provides a grayscale or gradient version of the color image to the network input.

[0069] Step 5.2: Optimize the network parameters according to the Adam optimization algorithm; crop and rotate the training set according to the patch-size and send it to the network, train until the maximum number of iterations, and obtain the trained network model.

[0070] Step 6: Input the color-biased image with the real lighting label into the S-Squeeze-Unet network trained in step 5 to perform image light source estimation and color correction.

[0071] Step 6.1: Perform color correction on the two benchmark datasets with real lighting labels using real lighting and estimated lighting respectively.

[0072] Step 6.2: Compare the vector direction difference between the estimated illumination and the real illumination, and the angle between the estimated illumination and the real illumination in three-dimensional space, i.e., the angle error. The angle error is used as an important indicator to evaluate the effect of the color constancy algorithm and compared with other algorithms.

[0073] Example 1

[0074] In this embodiment, the present invention is compared with the traditional methods Gray-World, White-Patch, quasi-unsupervised Net based on deep learning unsupervised algorithm, and FC4 Net based on deep learning supervised algorithm on the public data sets Color Checker and NUS.

[0075] Using Flicker30k, a large dataset for image recognition and retrieval, as a training set, about 30,000 approximately balanced training images, the grayscale information and gradient information of the training images are used as network inputs, and complex convolutional neural networks are trained to detect achromatic pixels used to estimate the color of the light source, assign high weights to possible achromatic pixels, generate corresponding weight maps, and finally estimate the illumination as the weighted sum of the input pixels. The trained model is tested on the Color Checker and NUS datasets with real illumination labels.

[0076] Table 1 Experimental results of each algorithm on the Color Checker dataset

[0077]

[0078] Table 2 Experimental results of each algorithm on the NUS dataset

[0079]

[0080] Tables 1 and 2 are the comparative test results of the two input versions of the present invention with the traditional methods Gray-World, White-Patch, quasi-unsupervisedNet based on deep learning unsupervised algorithm, and FC4 Net based on deep learning supervised algorithm on the public datasets Color Checker and NUS.

[0081] Among them, Baselines are two traditional methods, Learned (cross dataset) is an unsupervised method based on learning, and the training set and test set belong to two different datasets, and Learned (in dataset) is a supervised method based on learning, and the training set and test set belong to the same dataset.

[0082] Angle error is an indicator for evaluating the deviation between the estimated light source and the real light source of an image, and can reflect the image correction result to the greatest extent. Therefore, in addition to being a loss function, angle error is also the most important indicator for evaluating the effect of the color constancy algorithm. After the model training is completed, the estimated light source obtained from each test image is processed using the model, and the angle error with the real light source of the scene is calculated. The average, median, triple mean, best 25% mean and worst 25% mean of the angle error are statistically calculated. It can be seen from the above table that the present invention is significantly better than the traditional method and the quasi-unsupervised Net of the unsupervised algorithm. Although the indicators of the FC4 Net based on the deep learning supervision algorithm are better than those of the present invention, the model can only be used to process images obtained from the same device as the training set, and the processing effect on images obtained from different devices from the training set is poor. The present invention has a stable processing effect on images obtained from different devices.

[0083] Combination Figure 4 , Figure 5 The result comparison chart shows that the present invention can achieve stable and obvious image color correction.

[0084] Figure 4Figure 1 is the image test results of each algorithm on the Color Checker dataset. From left to right, the images are (a) the original input image; (b) the test result of version 1 of the present invention (the input is gradient information); (c) the test result of version 1 of the present invention (the input is grayscale information); (d) the test result of quasi-unsupervised Net; (e) the test result of Gray-World; (f) the test result of White-Patch; and (h) the test result of FC4 Net.

[0085] Figure 5 These are the image test results of each algorithm on the NUS dataset. From left to right, the images are (a) the original input image; (b) the test result of version 1 of the present invention (the input is gradient information); (c) the test result of version 1 of the present invention (the input is grayscale information); (d) the test result of quasi-unsupervisedNet; (e) the test result of Gray-World; (f) the test result of White-Patch; and (h) the test result of FC4 Net.

Claims

1. An unsupervised color constancy method based on achromatic prior guidance, characterized in that: The following steps are involved: Step 1: Construct a spatial channel attention mechanism module S; Step 2: Construct the image light source estimation network S-SqueezeUnet; Step 3: Construct the loss function of the image light source estimation network S-SqueezeUnet; Step 4: Initialize the parameters of the image light source estimation network S-SqueezeUnet; Step 5: Use Flicker30k, a large dataset of images without light source labels for image recognition and retrieval, as training images and input them into the image light source estimation network S-SqueezeUnet until the loss function converges to obtain a trained S-SqueezeUnet network model. Step 6: Input the color-biased image with the real lighting label into the S-Squeeze-Unet network trained in step 5 to perform image light source estimation and color correction.

2. The unsupervised color constancy method based on achromatic prior guidance according to claim 1, characterized in that: Constructing the spatial channel attention mechanism module S in step 1 includes the following steps: Step 1.1: Compress the spatial features of the input feature map, perform global maximum pooling on the input feature map, and find the maximum value of all pixel values ​​in each channel map. The feature map changes from a matrix of [H, W, C] to a matrix of [H, W, 1], where [H, W, C] represents the number of channels, width, and height of the feature map. Step 1.2: Compress the spatial features of the input feature map, perform global average pooling on the input feature map, average all pixel values ​​of each channel map, and convert the feature map from a [H, W, C] matrix to a [H, W, 1] matrix; Step 1.3: stack the feature maps after maximum pooling and average pooling in the channel dimension, and the feature map becomes a matrix of [H, W, 2]; Step 1.4: Convolve the feature map to fuse channel information. The feature map changes from a matrix of [H, W, 2] to a matrix of [H, W, 1]. Multiply the normalized weights and the original input feature map channel by channel to output a feature map with spatial attention.

3. The unsupervised color constancy method based on achromatic prior guidance according to claim 1, characterized in that: The image light source estimation network S-SqueezeUnet includes an input layer, a hidden layer, and an output layer. The input layer is used to input the original image, the hidden layer is used to perform convolution calculation and deconvolution calculation on the input image, and the output layer is used to output the illumination estimation; the hidden layer adopts an encoder-decoder structure consisting of 4 pairs of encoding layers and decoding layers, specifically including encoding layers 1 to 4 and decoding layers 1 to 4, and the processing process of each layer is as follows: Encoding layer 1: Input a 256*256 feature map with 3 channels, perform two convolutions, add a spatial attention module, generate a weighted feature map, and output a 120*120 feature map with 64 channels; Coding layer 2: Input the feature map output by coding layer 1, perform one maximum pooling and two fire convolution blocks, where each fire convolution block contains two 1*1 output convolution layers and one 3*3 convolution layer, add a spatial attention module, generate a weighted feature map, and output a 60*60 feature map with 128 channels; Coding layer 3: Input the feature map output by coding layer 2, perform one maximum pooling and two fire convolution blocks, add a spatial attention module, generate a weighted feature map, and output a 30*30 feature map with 256 channels; Coding layer 4: Input the feature map output by coding layer 3, perform a maximum pooling and four fire convolution blocks, add a spatial attention module, generate a weighted feature map, and output a 15*15 feature map with 512 channels; Decoding layer 1: Input the feature map output by encoding layer 4, perform upsampling and convolution once, and output a 30*30 feature map with 256 channels; Decoding layer 2: Input the feature map output by decoding layer 1, concatenate this feature map with the feature map output by encoding layer 3, perform convolution and upsampling after concatenation, and output a 60*60 feature map with 128 channels; Decoding layer 3: Input the feature map output by decoding layer 2, concatenate this feature map with the feature map output by encoding layer 2, perform convolution and upsampling after concatenation, and output a 120*120 feature map with 64 channels; Decoding layer 4: Input the feature map output by decoding layer 3, concatenate this feature map with the feature map output by encoding layer 1, perform convolution and upsampling after concatenation, and output a 256*256 feature map with 3 channels.

4. The unsupervised color constancy method based on achromatic prior guidance according to claim 1, characterized in that: The loss function of the image light source estimation network S-SqueezeUnet constructed in step 3 is specifically: in, represents the normalized light source estimation value of the input image after each round of network training, is the normalized light source truth value of the input image.

5. The unsupervised color constancy method based on achromatic prior guidance according to claim 1, characterized in that: In step 5, the large dataset image Flicker30k is used as the training image to train the network model. The steps are as follows: The training set is cropped and rotated according to the patch-size and then fed into the network. By minimizing the loss function, the network will learn to assign high weights to possible achromatic pixels. The network parameters are optimized according to the Adam optimization algorithm and trained until the maximum number of iterations to obtain the trained network model.

6. The unsupervised color constancy method based on achromatic prior guidance according to claim 1, characterized in that: The parameters of the initialized image light source estimation network S-SqueezeUnet include: learning rate lr, patch-size of each batch of images sent to the network, and maximum number of iterations.