Semantic segmentation noctilucent image enhancement method based on color space guidance
Through a semantic segmentation luminous image enhancement method based on color space guidance, combined with an iterative image enhancement network and an unsupervised semantic segmentation network, the problem of loss of detailed information and high computational complexity in improving luminous image quality is solved, and efficient image enhancement is achieved. Improved the visual effects and computational efficiency of images.
Patent Information
- Application Number
- CN202411095287.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for existing technologies to effectively retain image details while improving the quality of luminous images, and the calculation complexity is high, resulting in long processing time.
A semantic segmentation luminous image enhancement method based on color space guidance is adopted. Through iterative image enhancement network and unsupervised semantic segmentation network, combined with HSV color space and spatial consistency loss function, a total loss function is designed for end-to-end training to optimize the image enhancement process. .
It improves the visual effect of luminous images, retains image details and color authenticity, achieves lower computational complexity, is suitable for various environments with limited computing resources, and improves the detail clarity and color accuracy of images.
Smart Images

Figure CN118628422A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision and image processing, and in particular to a semantic segmentation luminous image enhancement method based on color space guidance. Background Art
[0002] With the popularity of multimedia and mobile devices, images are used more and more widely in various occasions. Images captured in night-light environments often face problems such as unclear details, insufficient contrast and color distortion. These problems seriously affect the visual effects of the images and subsequent visual processing tasks, such as target detection, image recognition and image understanding. Although a variety of image enhancement technologies have been proposed to improve the quality of night-light images, the existing technologies often find it difficult to effectively retain the detailed information of the images while improving the image quality, and also have the disadvantages of large amount of calculation and long processing time. In order to overcome these problems, the present invention proposes a novel night-light image enhancement method, which aims to improve the brightness and contrast of the image while maintaining the details and color authenticity of the image, and achieve low computational complexity. Summary of the invention
[0003] The purpose of the present invention is to provide a semantic segmentation luminous image enhancement method based on color space guidance, which can improve the brightness and contrast of the image while maintaining the details and color authenticity of the image and achieving lower computational complexity.
[0004] In order to achieve the above object, the solution of the present invention is: A semantic segmentation night light image enhancement method based on color space guidance comprises the following steps: Step S1, construct an iterative image enhancement network, design an image-specific curve, and obtain pixel-level and high-order curves by iteratively applying itself to effectively map between the night-light image and the enhanced image. The parameters of the curve are learned by a deep learning network to gradually learn the pixel-level optimal mapping between the night-light image and the enhanced image; Step S2: introducing an unsupervised semantic segmentation network and calculating the semantic loss to retain the semantic information of the image during the enhancement process; Step S3, designing a loss function using the HSV color space to solve the color distortion problem in night light image enhancement; Step S4, designing a spatial consistency loss to enhance image details and ensure the consistency of details between the enhanced image and the night light image; Step S5, performing end-to-end training and optimization on the network through a combination of total loss functions, where the combination of total loss functions includes semantic loss, HSV loss, and exposure loss; Step S6: Use the trained network to enhance the new luminous image and output an enhanced image with better visual effect.
[0005] Further, in step S1, the enhanced image is used to guide the training of the network to expand the curve into a pixel-by-pixel curve parameter map, expressed as:
[0006] In the formula, is the image after the nth enhancement, is the image before the nth enhancement, is the number of iterations used to control the curvature, is a mapping parameter map of the same size as the given image.
[0007] Further, in step S1, the iterative image enhancement network includes 7 convolutional layers with symmetric jump connections. In the first 6 convolutional layers, each convolutional layer consists of 32 convolutional kernels of size 3×3 and stride 1, followed by a ReLU activation function, and the last convolutional layer consists of 24 convolutional kernels of size 3×3 and stride 1, followed by a Tanh activation function, which generates 24 curve parameter maps for 8 iterations, where each iteration requires 3 curve parameter maps, one for each of the RGB channels. Further, in step S2, the unsupervised semantic segmentation network performs accurate pixel-by-pixel segmentation on the enhanced image, thereby retaining semantic information during the progressive image enhancement process. The unsupervised semantic segmentation network uses two pathways: one is a bottom-up pathway, using ResNet with ImageNet weights; the other is a top-down pathway, using Gaussian initialization with a mean of 0 and a standard deviation of 0.01; both pathways have 4 convolutional blocks, which are interconnected through lateral connections. The specific method of the unsupervised semantic segmentation network is: First, the enhanced image from the iterative image enhancement network will first enter the bottom-up path for feature extraction; Then, the top-down pathway transforms the high semantic layers into high-resolution layers for spatially-aware semantic segmentation; Each convolutional block in the top-down process performs bilinear upsampling on the image and concatenates it with the horizontal result; After concatenation, it passes through two smoothing layers with 3×3 convolutions to obtain better perceptual quality; Finally, the results of each block in the top-down path are concatenated and the segmentation is calculated.
[0008] Further, in step S2, the unsupervised semantic segmentation network calculates the semantic loss, which is conducive to retaining the semantic information of the image as much as possible during the enhancement process. The semantic loss does not require a segmentation label, but only requires a pre-initialized model. The semantic loss is expressed as:
[0009] In the formula, represents the semantic loss, is the estimated class probability of the segmentation network for the pixel, Represents the height and width of the image respectively. They represent the focus coefficients respectively, and i and j represent the coordinate values of the pixels.
[0010] Further, in step S3, the night light image is described in the HSV color space, and the H, S, and V channels are orthogonal to each other, thereby separating brightness and color. Based on this, the HSV loss function is used to retain all colors and truly restore the colors hidden in the dark. The HSV loss is expressed as:
[0011] In the formula, represents the HSV loss, Represents the height and width of the image respectively , represent the hue of the enhanced and input images respectively, , Represent the saturation of the enhanced and input images respectively, and Respectively represent the cumulative summation from the image height and width.
[0012] Furthermore, in step S4, the spatial consistency loss is mainly used to preserve the differences between adjacent pixels during the enhancement process, which helps to maintain the spatial consistency between the two images before and after the enhancement. The spatial consistency loss is expressed as:
[0013] In the formula, represents the spatial consistency loss, E and I are the average pixel values in 4×4 local regions in the enhanced image and the low-light image, respectively, B is the number of local regions, Refers to the four adjacent neighbors above, below, left and right, j represents The value of There are four non-adjacent neighbors: upper left, upper right, lower left, and lower right. k represents The current value, is 0.5.
[0014] Further, in step S5, the exposure loss is measured by measuring the L1 difference between the average pixel value of a specific area and the predefined exposure level D to limit underexposure and overexposure in the night light image. The exposure loss is expressed as:
[0015] In the formula, represents the exposure loss, B is the number of local regions, E is the average pixel value in the 4×4 local regions in the enhanced image, and D is the ideal image exposure level. Indicates the current local area.
[0016] Further, in step S5, the total loss function is expressed as:
[0017] In the formula, represents the total loss, Represents the weights corresponding to each loss function.
[0018] After adopting the above structure, the semantic segmentation luminous image enhancement method based on color space guidance of the present invention can effectively improve the visual effect of luminous images while retaining the key details in the image. By using deep learning technology and color space theory, the processing strategy of image enhancement is dynamically adjusted to achieve fine enhancement of luminous images. By performing multi-scale feature analysis on luminous images and combining spatial consistency loss, the present invention can effectively improve the detail clarity and color accuracy of the image. In addition, the application of unsupervised semantic segmentation networks further optimizes the retention of semantic information of the image and reduces color distortion. The present invention not only improves the effect of luminous image enhancement, but also maintains the naturalness and visual comfort of the image. Compared with the prior art, the present invention has the following advantages: (1) The present invention can accurately identify the enhancement-required areas in night-light images through an iterative image enhancement network and an unsupervised semantic segmentation network, thus providing accurate positioning information for image enhancement.
[0019] (2) The present invention adopts the loss function guided by the HSV color space, which can optimize the color distortion problem and generate a more natural and accurate color mapping, thereby improving the color quality of image enhancement.
[0020] (3) The design of the spatial consistency loss of the present invention enables the model to adaptively adjust detail features during the enhancement process, reducing the problems caused by local over-enhancement or under-enhancement and improving the robustness of the model.
[0021] (4) The present invention adopts a lightweight network structure design and optimizes the use of computing resources, so that the present invention can adapt to various computing resource-constrained environments and process images of different resolutions while maintaining high efficiency.
[0022] Through end-to-end training and optimization, the present invention can automatically learn the best strategy to enhance the visual effect from night-light images without manual intervention, thus improving the convenience and practicality of operation. In addition, the present invention has been verified on multiple image quality evaluation standards, and the experimental results show that it has significant performance in improving the visual quality of night-light images. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 It is a flowchart diagram of the present invention.
[0023] Figure 2 It is a schematic diagram of the overall network framework of the present invention.
[0024] Figure 3 Schematic diagram of the iterative image enhancement network of the present invention.
[0025] Figure 4 Schematic diagram of the unsupervised semantic segmentation network of the present invention. DETAILED DESCRIPTION
[0026] In order to further explain the technical solution of the present invention, the present invention is described in detail below through specific embodiments.
[0027] like Figure 1 and Figure 2 As shown, a semantic segmentation night light image enhancement method based on color space guidance includes the following steps: Step S1, constructing an iterative image enhancement network to gradually learn the pixel-level optimal mapping between the night light image and the enhanced image; Step S2: introducing an unsupervised semantic segmentation network and calculating the semantic loss to retain the semantic information of the image during the enhancement process; Step S3, designing a loss function using the HSV color space to solve the color distortion problem in night light image enhancement; Step S4, designing a spatial consistency loss to enhance image details and ensure the consistency of details between the enhanced image and the night light image; Step S5, training and optimizing the network end-to-end through a combination of total loss functions, including semantic loss, HSV loss, and exposure loss; Step S6: Use the trained network to enhance the new luminous image and output an enhanced image with better visual effect.
[0028] like Figure 3As shown, in step S1, the iterative image enhancement network is designed based on an iterative image enhancement method, which refers to designing an image-specific curve that can obtain pixel-level and high-order curves by iteratively applying itself, thereby effectively mapping between the night light image and the enhanced image. The parameters of the curve can be learned by a deep learning network, and the enhanced image can be used to guide the training of the network. The present invention expands the curve into a pixel-by-pixel curve parameter map, expressed as: (1) In formula (1), is the image after the nth enhancement, is the image before the nth enhancement, is the number of iterations used to control the curvature, is a mapping parameter map of the same size as the given image.
[0029] In step S1, the iterative image enhancement network comprises 7 convolutional layers with symmetric skip connections. In the first 6 convolutional layers, each convolutional layer consists of 32 convolutional kernels of size 3×3 and stride 1, followed by a ReLU activation function. The last convolutional layer consists of 24 convolutional kernels of size 3×3 and stride 1, followed by a Tanh activation function, which generates 24 curve parameter maps for 8 iterations, where each iteration requires 3 curve parameter maps for the three RGB channels.
[0030] like Figure 4 As shown, in step S2, the unsupervised semantic segmentation network performs accurate pixel-by-pixel segmentation on the enhanced image, thereby retaining semantic information during the progressive image enhancement process. The present invention uses two approaches: 1) a bottom-up approach using ImageNet [1] ResNet weights [2] ; 2) The top-down pathway uses Gaussian initialization with a mean of 0 and a standard deviation of 0.01. Both pathways have 4 convolutional blocks, which are connected to each other through lateral connections. The enhanced image from the iterative image enhancement network will first enter the bottom-up pathway for feature extraction. Then, the top-down pathway converts the high semantic layer into a high-resolution layer for spatially aware semantic segmentation. Each convolutional block in the top-down method performs bilinear upsampling on the image and concatenates it with the lateral results. After the concatenation, it passes through two smoothing layers with 3×3 convolutions to obtain better perceptual quality. Finally, the present invention concatenates the results of each block in the top-down path and calculates the segmentation.
[0031] In step S2, the unsupervised semantic segmentation network calculates the semantic loss, which is conducive to retaining the semantic information of the image as much as possible during the enhancement process. The semantic loss designed by the present invention does not require segmentation labels, but only requires a pre-initialized model. The semantic loss is expressed as: (2) In formula (2), represents the semantic loss, is the estimated class probability of the segmentation network for the pixel, Represents the height and width of the image respectively. They represent the focus coefficients respectively, and i and j represent the coordinate values of the pixels.
[0032] In step S3, a loss function is designed using the HSV color space to solve the color distortion problem in night light image enhancement. The present invention describes the night light image in the HSV color space, and the H (hue), S (saturation), and V (value) channels are orthogonal to each other, thereby separating brightness and color. Based on this, the present invention designs a loss function to retain all colors, which helps to truly restore the colors hidden in the dark. Especially in self-regularization learning, due to the lack of real normal light images, the convolutional neural network cannot learn the color mapping from night light images to normal light images, which highlights the advantages of the HSV space over the RGB space. The HSV loss is expressed as: (3) In formula (3), represents the HSV loss, Represents the height and width of the image respectively. , represent the hue of the enhanced and input images respectively, , Represent the saturation of the enhanced and input images respectively, and Respectively represent the cumulative summation from the image height and width.
[0033] In step S4, a spatial consistency loss is designed to enhance image details and ensure the consistency of details between the enhanced image and the night light image. The spatial consistency loss is mainly used to preserve the differences between adjacent pixels during the enhancement process, which helps to maintain the spatial consistency between the two images before and after the enhancement. The spatial consistency loss is expressed as: (4) In formula (4), represents the spatial consistency loss, E and I are the average pixel values in 4×4 local regions in the enhanced image and the low-light image, respectively, B is the number of local regions, Refers to the four adjacent neighbors above, below, left and right, j represents The value of There are four non-adjacent neighbors: upper left, upper right, lower left, and lower right. k represents The current value, is 0.5.
[0034] In step S5, the network is trained and optimized end-to-end through a combination of total loss functions, including semantic loss, HSV loss, and exposure loss. The exposure loss is mainly measured by the L1 difference between the average pixel value of a specific area and the predefined exposure level D. This is to limit underexposure and overexposure in the image. The exposure loss is expressed as: (5) In formula (5), represents the exposure loss, B is the number of local regions, E is the average pixel value in the 4×4 local regions in the enhanced image, and D is the ideal image exposure level. Indicates the current local area.
[0035] In step S5, the network is trained and optimized end-to-end through a combination of total loss functions, including semantic loss, HSV loss, and exposure loss. The total loss function can be defined as: (6) In formula (6), represents the total loss, Represents the weights corresponding to each loss function.
[0036] In step S6, the night light image to be enhanced is input, the image is processed through the complete network, and an enhanced image with better visual effect is output.
[0037] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
[0038] The literature materials involved in this article are as follows: [1]Deng, J., Dong, W., Socher, R., Li, LJ, Li, K. and Fei-Fei, L., 2009, June. Imagenet: A large-scale hierarchical image database. In2009 IEEEconference on computer vision and pattern recognition(pp. 248-255). Ieee. [1] The Chinese translation is: The authors are Deng, J., Dong, W., Socher, R., Li, LJ, Li, K. and Fei-Fei, and the publication date is June 2009. The article is titled "Imagenet: A large-scale hierarchical image database", published in the 2009 IEEE Conference on Computer Vision and Pattern Recognition (pages 248-255), published by IEEE.
[0039] [2] Targ, S., Almeida, D. and Lyman, K., 2016. Resnet in resnet: Generalizing residual architectures. arXiv preprint arXiv:1603.08029. [2] The Chinese translation of this paper is by Targ, S., Almeida, D. and Lyman, K, 2016. The title of the paper is “Resnet in resnet: Generalizing residual architectures”, which is an arXiv preprint with the arXiv number arXiv:1603.08029.
Claims
1. A semantic segmentation night light image enhancement method based on color space guidance, Features: The following steps are involved: Step S1, construct an iterative image enhancement network, design an image-specific curve, and obtain pixel-level and high-order curves by iteratively applying itself to effectively map between the night-light image and the enhanced image. The parameters of the curve are learned by a deep learning network to gradually learn the pixel-level optimal mapping between the night-light image and the enhanced image; Step S2: introducing an unsupervised semantic segmentation network and calculating the semantic loss to retain the semantic information of the image during the enhancement process; Step S3, designing a loss function using the HSV color space to solve the color distortion problem in night light image enhancement; Step S4, designing a spatial consistency loss to enhance image details and ensure the consistency of details between the enhanced image and the night light image; Step S5, performing end-to-end training and optimization on the network through a combination of total loss functions, where the combination of total loss functions includes semantic loss, HSV loss, and exposure loss; Step S6: Use the trained network to enhance the new luminous image and output an enhanced image with better visual effect.
2. According to the method for enhancing night light images based on semantic segmentation and color space guidance according to claim 1, Features: In step S1, the image enhanced by the iterative image enhancement network is used to guide the network training to expand the curve into a pixel-by-pixel curve parameter map, expressed as: In the formula, is the image after the nth enhancement, is the image before the nth enhancement, is the number of iterations used to control the curvature, is a mapping parameter map of the same size as the given image.
3. According to the color space guided semantic segmentation night light image enhancement method of claim 2, Features: In step S1, the iterative image enhancement network comprises 7 convolutional layers with symmetric jump connections. In the first 6 convolutional layers, each convolutional layer consists of 32 convolutional kernels of size 3×3 and stride 1, followed by a ReLU activation function. The last convolutional layer consists of 24 convolutional kernels of size 3×3 and stride 1, followed by a Tanh activation function, which generates 24 curve parameter maps for 8 iterations, where each iteration requires 3 curve parameter maps, one for each of the RGB channels.
4. According to the method for enhancing night light images based on semantic segmentation and color space guidance according to claim 1, Features: In step S2, the unsupervised semantic segmentation network performs accurate pixel-by-pixel segmentation on the enhanced image, thereby retaining semantic information during the progressive image enhancement process. The unsupervised semantic segmentation network uses two pathways: one is a bottom-up pathway, using ResNet with ImageNet weights; the other is a top-down pathway, using Gaussian initialization with a mean of 0 and a standard deviation of 0.01; both pathways have 4 convolutional blocks, which are interconnected by lateral connections. The specific method of the unsupervised semantic segmentation network is: First, the enhanced image from the iterative image enhancement network will first enter the bottom-up path for feature extraction; Then, the top-down pathway transforms the high semantic layers into high-resolution layers for spatially-aware semantic segmentation; Each convolutional block in the top-down process performs bilinear upsampling on the image and concatenates it with the horizontal result; After concatenation, it passes through two smoothing layers with 3×3 convolutions to obtain better perceptual quality; Finally, the results of each block in the top-down path are concatenated and the segmentation is calculated.
5. According to the method for enhancing night light images based on semantic segmentation and color space guidance according to claim 1, Features: In step S2, the unsupervised semantic segmentation network calculates the semantic loss, which is conducive to retaining the semantic information of the image as much as possible during the enhancement process. The semantic loss does not require a segmentation label, but only requires a pre-initialized model. The semantic loss is expressed as: In the formula, represents the semantic loss, is the estimated class probability of the segmentation network for the pixel, Represents the height and width of the image respectively. They represent the focus coefficients respectively, and i and j represent the coordinate values of the pixels.
6. According to the method for enhancing night light images based on semantic segmentation and color space guidance according to claim 1, Features: In step S3, the night light image is described in the HSV color space. The H, S, and V channels are orthogonal to each other, thereby separating brightness and color. Based on this, the HSV loss function is used to retain all colors and truly restore the colors hidden in the dark. The HSV loss is expressed as: In the formula, represents the HSV loss, Represents the height and width of the image respectively. , represent the hue of the enhanced and input images respectively, , Represent the saturation of the enhanced and input images respectively, and Respectively represent the cumulative summation from the image height and width.
7. According to the method for enhancing night light images based on semantic segmentation and color space guidance according to claim 1, Features: In step S4, the spatial consistency loss is mainly used to preserve the differences between adjacent pixels during the enhancement process, which helps to maintain the spatial consistency between the two images before and after enhancement. The spatial consistency loss is expressed as: In the formula, represents the spatial consistency loss, E and I are the average pixel values in 4×4 local regions in the enhanced image and the low-light image, respectively, B is the number of local regions, Refers to the four adjacent neighbors above, below, left and right, j represents The value of There are four non-adjacent neighbors: upper left, upper right, lower left, and lower right. k represents The current value, is 0.
5.
8. According to the method for enhancing night light images based on semantic segmentation and color space guidance according to claim 1, Features: In step S5, the exposure loss is calculated by measuring the L1 difference between the average pixel value of a specific area and the predefined exposure level D to limit underexposure and overexposure in the night light image. The exposure loss is expressed as: In the formula, represents the exposure loss, B is the number of local regions, E is the average pixel value in the 4×4 local regions in the enhanced image, and D is the ideal image exposure level. Indicates the current local area.
9. According to the method for enhancing night light images based on semantic segmentation and color space guidance according to claim 1, Features: In step S5, the total loss function is expressed as: In the formula, represents the total loss, Represents the weights corresponding to each loss function.
Citation Information
Patent Citations
Unsupervised remote sensing image semantic segmentation based on spatial resolution domain adaptation
CN113850813A
Low-illumination image enhancement method and computer readable medium
CN116342878A
No-reference enhancement method for images acquired by unmanned aerial vehicle at night
CN116385298A
Linear low-light image enhancement method and system based on knowledge distillation
CN116883252A
No-reference low-illumination image enhancement method based on high-order curve iteration
CN116912114A
