Detail learning low-light image enhancement method and device for smart home perception

By constructing a low-light image enhancement model based on learning of details, the problem of image quality degradation of smart home devices in low-light environments has been solved, achieving brightness restoration and structural detail enhancement, thereby improving the stability and recognition accuracy of visual perception.

CN121660953BActive Publication Date: 2026-04-17HUAQIAO UNIVERSITY +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAQIAO UNIVERSITY
Filing Date
2026-02-09
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Smart home devices suffer from image quality degradation in low-light environments. Existing low-light image enhancement methods cannot effectively restore brightness or enhance structural details, leading to a decline in visual perception stability and recognition accuracy.

Method used

We construct a low-light image enhancement model based on learning of details, which adopts a structure of progressive convolutional feature extraction and feature skip connections, combined with channel detail and spatial detail attention modules, to achieve joint modeling of brightness, local structure and fine-grained texture.

Benefits of technology

While improving overall brightness, it effectively preserves details and edge structure, suppresses noise and color deviation, improves visual quality, and enhances the reliability of target recognition and environmental understanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660953B_ABST
    Figure CN121660953B_ABST
Patent Text Reader

Abstract

This invention discloses a detail-learning-based low-light image enhancement method and apparatus for smart home sensing, relating to the field of image processing. The method includes: constructing and training a detail-learning-based low-light image enhancement model to obtain a trained low-light image enhancement model. The detail-learning attention module of the feature enhancement module in the low-light image enhancement model includes a channel detail attention module and a spatial detail attention module connected in sequence. The method involves acquiring low-light images collected by smart home sensing devices and inputting them into the trained low-light image enhancement model. The low-light images first pass through a feature extraction module to obtain initial image features. These initial image features are then input into a feature enhancement module, sequentially passing through N detail enhancement modules to obtain the Nth detail enhancement feature. The Nth detail enhancement feature is then processed by a feature mapping module and residually connected to the low-light image to obtain the corresponding enhanced image. This invention addresses the problem of prominent low-light image degradation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more specifically to a method and apparatus for low-light image enhancement based on detail learning for smart home perception. Background Technology

[0002] With the increasing prevalence of smart home devices, service robots and other sensing devices are becoming increasingly reliant on image quality for tasks such as target recognition, behavior analysis, and environmental understanding. However, lighting conditions in the home environment fluctuate significantly over time, depending on scene layout, lighting methods, and obstructions. Many captured images exhibit degradation issues such as insufficient brightness, uneven exposure, increased noise, loss of detail, and color shift, significantly reducing the stability and accuracy of visual perception systems. Limited by device size and cost, home-grade imaging hardware generally suffers from small sensor size and low signal-to-noise ratio, making low-light degradation even more pronounced and failing to meet the real-time sensing needs of smart homes in low-light environments.

[0003] While existing low-light image enhancement methods can improve brightness, traditional histogram equalization, Retinex methods, and some deep learning models still suffer from problems such as insufficient detail recovery, inadequate noise suppression, overly smoothed enhancement results, or structural blurring. Therefore, there is an urgent need for a low-light image enhancement method that can effectively recover brightness and enhance structural details under low-light conditions to meet the visual perception needs of smart homes. Summary of the Invention

[0004] The purpose of this application is to propose a detail learning-based low-light image enhancement method and apparatus for smart home perception, addressing the aforementioned technical problems.

[0005] In a first aspect, the present invention provides a detail-learning low-light image enhancement method for smart home perception, comprising the following steps:

[0006] A low-light image enhancement model based on learning of details is constructed and trained to obtain the trained low-light image enhancement model. The low-light image enhancement model includes a feature extraction module, a feature enhancement module, and a feature mapping module. The feature enhancement module includes N detail enhancement modules and adopts a structure of progressive convolutional feature extraction and feature skip connections, where N is a positive even number. Each detail enhancement module includes a first convolutional module and a detail learning attention module connected in sequence. The detail learning attention module includes a channel detail attention module and a spatial detail attention module connected in sequence.

[0007] The system acquires low-light images collected by smart home sensing devices and inputs them into a trained low-light image enhancement model. The low-light images first pass through a feature extraction module to obtain initial image features. The initial image features are then input into a feature enhancement module, which sequentially passes through N detail enhancement modules to obtain the Nth detail enhancement feature. The Nth detail enhancement feature is then passed through a feature mapping module and residually connected to the low-light images to obtain the corresponding enhanced image.

[0008] Preferably, the feature extraction module includes a first convolution module, which includes a first convolutional layer and a first ReLU activation function layer connected in sequence. The first convolutional layer uses a convolution operation with a kernel size of 3×3, and the first ReLU activation function layer uses the ReLU activation function. The input features of the detail learning attention module first pass through the channel detail attention module to obtain channel enhanced features, and the channel enhanced features pass through the spatial detail attention module to obtain detail enhanced features.

[0009] Preferably, the initial image features are first input into the first detail enhancement module in the feature enhancement module, and then sequentially pass through the first convolution module and the detail learning attention module in the first detail enhancement module to obtain the first detail enhancement feature, as shown in the following formula:

[0010] ;

[0011] in, Represents the initial image features. This indicates the first detail enhancement feature. Represents the spatial detail attention module, This indicates the channel detail attention module;

[0012] The first detail enhancement feature is input into the second detail enhancement module within the feature enhancement module. It then passes sequentially through the first convolutional module and the detail learning attention module within the second detail enhancement module to obtain the second detail enhancement feature, as shown in the following equation:

[0013] ;

[0014] in, This indicates the second detail enhancement feature;

[0015] This process continues until the N / 2-1th detail enhancement module in the feature enhancement module outputs the N / 2-1th detail enhancement feature;

[0016] The N / 2-1th detail enhancement feature is input into the N / 2th detail enhancement module in the feature enhancement module. It then passes through the first convolutional module and the detail learning attention module in the N / 2th detail enhancement module to obtain the N / 2th detail enhancement feature, as shown in the following formula:

[0017] ;

[0018] in, This represents the N / 2th detail enhancement feature;

[0019] After skip connection between the N / 2-1th and N / 2th detail enhancement features, the input is fed into the N / 2+1th detail enhancement module in the feature enhancement module. The input then passes through the first convolutional module and the detail learning attention module in the N / 2+1th detail enhancement module to obtain the N / 2+1th detail enhancement feature, as shown in the following equation:

[0020] ;

[0021] in, This indicates a splicing operation. This represents the N / 2+1th detail enhancement feature;

[0022] After skip connection between the N / 2-2th and N / 2+1th detail enhancement features, the input is fed into the N / 2+2th detail enhancement module in the feature enhancement module. The input then passes through the first convolutional module and the detail learning attention module in the N / 2+2th detail enhancement module to obtain the N / 2+2th detail enhancement feature, as shown in the following equation:

[0023] ;

[0024] in, This represents the N / 2+2th detail enhancement feature;

[0025] This process continues until the (N-1)th detail enhancement module in the feature enhancement module outputs the (N-1)th detail enhancement feature;

[0026] The initial image features and the (N-1)th detail enhancement feature are skip-connected and then input into the Nth detail enhancement module within the feature enhancement module. The input then passes through the first convolutional module and the detail learning attention module within the Nth detail enhancement module to obtain the Nth detail enhancement feature, as shown in the following equation:

[0027] ;

[0028] in, This represents the Nth detailed enhancement feature.

[0029] Preferably, the channel detail attention module includes a global average pooling layer, a global max pooling layer, and a fully connected network. The fully connected network includes a first fully connected layer, a second ReLU activation function layer, a second fully connected layer, and a first Sigmoid activation function layer connected in sequence. The second ReLU activation function layer uses the ReLU activation function, and the first Sigmoid activation function layer uses the Sigmoid activation function. The input features of the channel detail attention module are respectively input to the global average pooling layer and the global max pooling layer to perform global average pooling and global max pooling operations, resulting in average pooling features and max pooling features, as shown in the following formula:

[0030] ;

[0031] ;

[0032] in, This represents the input features of the channel detail attention module. This represents the average pooling characteristic. This indicates an average pooling operation; This represents the max pooling feature. This represents the max pooling operation;

[0033] The average pooling feature and the max pooling feature are input into the fully connected network to obtain the first intermediate feature and the second intermediate feature, respectively. The first intermediate feature and the second intermediate feature are added together to obtain the channel detail attention weights, as shown in the following formula:

[0034] ;

[0035] in, Indicates the attention weights for channel details. This represents the Sigmoid activation function. Represents the ReLU activation function. and Let represent the weight matrices of the first and second fully connected layers, respectively; r is the channel reduction rate; and C represents the number of channels in the input features of the channel detail attention module. Represents the set of real numbers;

[0036] The channel attention weights are expanded to the same spatial dimension as the input features of the channel detail attention module through a broadcast operation, and then multiplied element-wise with the input features of the channel detail attention module to obtain the channel enhanced features, as shown in the following formula:

[0037] ;

[0038] in, Indicates channel enhancement features, This indicates element-wise multiplication. This indicates a broadcast operation.

[0039] Preferably, the spatial detail attention module includes an edge detection module, a texture detection module, a stitching layer, and a second convolutional module. The second convolutional module includes a second convolutional layer and a second sigmoid activation function layer connected in sequence, with the second sigmoid activation function layer using the sigmoid activation function. The edge detection module includes a horizontal edge detection operator, a vertical edge detection operator, a third convolutional layer, and a fourth convolutional layer. Both the third and fourth convolutional layers use a 3×3 kernel size convolution operation. Channel enhancement features are obtained by passing the horizontal and vertical edge detection operators respectively to obtain horizontal edge response maps and vertical edge response maps. The horizontal and vertical edge response maps are then passed through the third and fourth convolutional layers respectively to obtain horizontal edge features and vertical edge features. The edge features are calculated based on the horizontal and vertical edge features, as shown in the following formula:

[0040] ;

[0041] in, Indicates edge features, This indicates a convolution operation with a kernel size of 3×3; This represents the horizontal edge detection operator. This represents the vertical edge detection operator. It is a very small constant;

[0042] The texture detection module includes a texture detection operator and a fifth convolutional layer. Both the second and fifth convolutional layers use a 7×7 kernel for convolution. Channel enhancement features are input into the texture detection module, first passing through the texture detection operator to obtain a texture response map. The texture response map is then input into the fifth convolutional layer to extract texture features, as shown in the following formula:

[0043] ;

[0044] in, Represents texture features, This represents a convolution operation with a kernel size of 7×7. This represents a texture detection operator;

[0045] The channel enhancement features, edge features, and texture features are concatenated and then input into the second convolutional module to obtain spatial attention weights, as shown in the following formula:

[0046] ;

[0047] in, This indicates a splicing operation. This represents the Sigmoid activation function. Indicates spatial attention weights;

[0048] The spatial attention weight is extended to the same spatial dimension as the channel enhancement feature through a broadcast operation, and then multiplied element-wise with the channel enhancement feature to obtain the detail enhancement feature, as shown in the following formula:

[0049] ;

[0050] in, Indicates details enhancement features, This indicates element-wise multiplication. This indicates a broadcast operation.

[0051] Preferably, the feature mapping module includes a channel fusion convolutional layer, a spatial reconstruction convolutional layer, and an output mapping convolutional layer connected in sequence. The channel fusion convolutional layer and the output mapping convolutional layer both use convolution operations with a kernel size of 1×1, while the spatial reconstruction convolutional layer uses convolution operations with a kernel size of 3×3.

[0052] Secondly, the present invention provides a detail-learning low-light image enhancement device for smart home perception, comprising:

[0053] The model building module is configured to construct and train a low-light image enhancement model based on learning of details, resulting in a trained low-light image enhancement model. This model includes a feature extraction module, a feature enhancement module, and a feature mapping module. The feature enhancement module comprises N detail enhancement modules and employs a structure of progressive convolutional feature extraction and feature skip connections, where N is a positive even number. Each detail enhancement module includes a first convolutional module and a detail learning attention module connected in sequence. The detail learning attention module includes a channel detail attention module and a spatial detail attention module connected in sequence.

[0054] The enhancement module is configured to acquire low-light images collected by smart home sensing devices and input them into a trained low-light image enhancement model. The low-light image first passes through a feature extraction module to obtain initial image features. The initial image features are then input into a feature enhancement module, which sequentially passes through N detail enhancement modules to obtain the Nth detail enhancement feature. The Nth detail enhancement feature is then passed through a feature mapping module and residually connected to the low-light image to obtain the corresponding enhanced image.

[0055] Thirdly, the present invention provides an electronic device including one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.

[0056] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the implementations of the first aspect.

[0057] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in any of the implementations in the first aspect.

[0058] Compared with the prior art, the present invention has the following beneficial effects:

[0059] (1) The detail learning low-light image enhancement method for smart home perception mentioned in this invention achieves joint modeling of brightness information, local structure and fine-grained texture through multi-level feature extraction, skip connections and detail learning attention mechanism. It can effectively preserve details and edge structure while improving overall brightness, and suppress noise and color deviation that are common in low-light images, thereby obtaining enhanced images with higher visual quality and clearer details.

[0060] (2) The detail learning low-light image enhancement method for smart home perception mentioned in this invention can further train the low-light image enhancement model and the downstream task-specific network, so that the enhanced image not only meets the visual enhancement requirements, but also has the discriminability and stability of task-related features. This improves the reliability of the enhanced image in tasks such as target recognition, behavior analysis and environmental understanding in smart home scenarios, and significantly improves the perception ability and recognition performance of the system in low light environment. It has high practical value and application promotion significance. Attached Figure Description

[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0062] Figure 1 This is a flowchart illustrating a detail-learning low-light image enhancement method for smart home perception, as described in an embodiment of this application.

[0063] Figure 2 This is a schematic diagram of the low-light image enhancement model of the detail learning low-light image enhancement method for smart home perception, as an embodiment of this application.

[0064] Figure 3A comparison image of an enhanced image generated by the detail learning low-light image enhancement method for smart home perception according to an embodiment of this application and the corresponding input low-light image.

[0065] Figure 4 This is a schematic diagram of a detail learning low-light image enhancement device for smart home perception, as an embodiment of this application.

[0066] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0068] Figure 1 This application illustrates a detail-learning low-light image enhancement method for smart home perception, comprising the following steps:

[0069] S1. Construct and train a low-light image enhancement model based on learning of details to obtain the trained low-light image enhancement model. The low-light image enhancement model includes a feature extraction module, a feature enhancement module, and a feature mapping module. The feature enhancement module includes N detail enhancement modules and adopts a structure of progressive convolutional feature extraction and feature skip connections, where N is a positive even number. Each detail enhancement module includes a first convolutional module and a detail learning attention module connected in sequence. The detail learning attention module includes a channel detail attention module and a spatial detail attention module connected in sequence.

[0070] Specifically, in the embodiments of this application, a low-light image enhancement model based on learning of details is first constructed. This low-light image enhancement model consists of a feature extraction module, a feature enhancement module, and a feature mapping module. The feature extraction module is used to extract initial image features from the input low-light image, and then input the initial image features into the feature enhancement module to obtain the Nth detail enhancement feature. The feature enhancement module adopts a structure of progressive convolutional feature extraction and feature skip connections, and embeds a detail learning attention module in each detail enhancement module. After the Nth detail enhancement feature is processed by the feature mapping module, it is residually connected with the low-light image to generate the corresponding enhanced image. The low-light images mentioned in the embodiments of this application are mainly collected by smart home sensing devices, including cameras in robotic vacuum cleaners. The low-light images collected by these devices meet the requirements of legality and compliance, and the data used to train the low-light image enhancement model also meets the requirements of legality and compliance.

[0071] The following sections provide a detailed introduction to the feature extraction module, feature enhancement module, and feature mapping module.

[0072] In a specific embodiment, the feature extraction module includes a first convolution module, which includes a first convolutional layer and a first ReLU activation function layer connected in sequence. The first convolutional layer uses a convolution operation with a kernel size of 3×3, and the first ReLU activation function layer uses the ReLU activation function. The input features of the detail learning attention module first pass through the channel detail attention module to obtain channel enhanced features, and the channel enhanced features pass through the spatial detail attention module to obtain detail enhanced features.

[0073] Specifically, the feature extraction module is constructed by combining a first convolutional layer with a kernel size of 3×3 and a stride of 1 with the ReLU activation function, and the input is a low-light image. First, the feature extraction module extracts the initial image features. As shown in the following formula:

[0074] .

[0075] Furthermore, initial image features Then it is input into the feature enhancement module for feature enhancement.

[0076] In a specific embodiment, the initial image features are first input into the first detail enhancement module in the feature enhancement module, and then sequentially pass through the first convolution module and the detail learning attention module in the first detail enhancement module to obtain the first detail enhancement feature, as shown in the following formula:

[0077] ;

[0078] in, Represents the initial image features. This indicates the first detail enhancement feature. Represents the spatial detail attention module, This indicates the channel detail attention module;

[0079] The first detail enhancement feature is input into the second detail enhancement module within the feature enhancement module. It then passes sequentially through the first convolutional module and the detail learning attention module within the second detail enhancement module to obtain the second detail enhancement feature, as shown in the following equation:

[0080] ;

[0081] in, This indicates the second detail enhancement feature;

[0082] The N / 2-1th detail enhancement feature is input into the N / 2th detail enhancement module in the feature enhancement module. It then passes through the first convolutional module and the detail learning attention module in the N / 2th detail enhancement module to obtain the N / 2th detail enhancement feature, as shown in the following formula:

[0083] ;

[0084] in, This represents the N / 2th detail enhancement feature;

[0085] After skip connection between the N / 2-1th and N / 2th detail enhancement features, the input is fed into the N / 2+1th detail enhancement module in the feature enhancement module. The input then passes through the first convolutional module and the detail learning attention module in the N / 2+1th detail enhancement module to obtain the N / 2+1th detail enhancement feature, as shown in the following equation:

[0086] ;

[0087] in, This indicates a splicing operation. This represents the N / 2+1th detail enhancement feature;

[0088] After skip connection between the N / 2-2th and N / 2+1th detail enhancement features, the input is fed into the N / 2+2th detail enhancement module in the feature enhancement module. The input then passes through the first convolutional module and the detail learning attention module in the N / 2+2th detail enhancement module to obtain the N / 2+2th detail enhancement feature, as shown in the following equation:

[0089] ;

[0090] in, This represents the N / 2+2th detail enhancement feature;

[0091] The initial image features and the (N-1)th detail enhancement feature are skip-connected and then input into the Nth detail enhancement module within the feature enhancement module. The input then passes through the first convolutional module and the detail learning attention module within the Nth detail enhancement module to obtain the Nth detail enhancement feature, as shown in the following equation:

[0092] ;

[0093] in, This represents the Nth detailed enhancement feature.

[0094] For details, please refer to Figure 2 The number N of detail enhancement modules mentioned in the embodiments of this application is a positive even number and In a preferred embodiment, N is an even number greater than or equal to 6 and less than or equal to 10. Taking N=6 as an example, the feature enhancement module contains 6 detail enhancement modules. The initial image features are first input to the first detail enhancement module within the feature enhancement module, and then sequentially pass through the first convolutional module and the detail learning attention module within the first detail enhancement module to obtain the first detail-enhanced feature, as shown in the following formula:

[0095] ;

[0096] in, Represents the initial image features. This indicates the first detail enhancement feature. Represents the spatial detail attention module, This indicates the channel detail attention module;

[0097] The first detail enhancement feature is input into the second detail enhancement module within the feature enhancement module. It then passes sequentially through the first convolutional module and the detail learning attention module within the second detail enhancement module to obtain the second detail enhancement feature, as shown in the following equation:

[0098] ;

[0099] in, This indicates the second detail enhancement feature;

[0100] The second detail enhancement feature is input into the third detail enhancement module within the feature enhancement module. It then passes through the first convolutional module and the detail learning attention module within the third detail enhancement module to obtain the third detail enhancement feature, as shown in the following equation:

[0101] ;

[0102] in, This indicates the third detail enhancement feature;

[0103] The second and third detail enhancement features are skip-connected and then input into the fourth detail enhancement module within the feature enhancement module. The feature enhancement features then pass through the first convolutional module and the detail learning attention module within the fourth detail enhancement module to obtain the fourth detail enhancement feature, as shown in the following equation:

[0104] ;

[0105] in, This indicates a splicing operation. This indicates the fourth detail enhancement feature;

[0106] The first and fourth detail enhancement features are skip-connected and then input into the fifth detail enhancement module within the feature enhancement module. The feature enhancement features then pass through the first convolutional module and the detail learning attention module within the fifth detail enhancement module to obtain the fifth detail enhancement feature, as shown in the following equation:

[0107] ;

[0108] in, This indicates the fifth detail enhancement feature;

[0109] The initial image features and the fifth detail enhancement feature are skip-connected and then input into the sixth detail enhancement module within the feature enhancement module. The input then passes through the first convolutional module and the detail learning attention module within the sixth detail enhancement module to obtain the sixth detail enhancement feature, as shown in the following equation:

[0110] ;

[0111] in, This indicates the sixth detailed enhancement feature.

[0112] The feature enhancement module in the embodiments of this application adopts a structure of hierarchical convolutional feature extraction and feature skip connections to jointly model the brightness distribution, local structure and detail information of low-light images at different scales. Specifically, multiple detail enhancement modules are constructed by using a first convolutional layer with a kernel size of 3×3 and a stride of 1, combined with a first ReLU activation function layer and a detail learning attention module. Shallow detail features and deep semantic features are fused between detail enhancement modules through skip connections to maintain the integrity and continuity of structural information. A detail learning attention module is embedded after each first convolutional module, enabling the feature enhancement process to first suppress redundant interference in the channel dimension through a channel detail attention mechanism, and then strengthen key structural regions and fine-grained texture details through a spatial detail attention mechanism, thereby obtaining detail-enhanced features.

[0113] In a specific embodiment, the channel detail attention module includes a global average pooling layer, a global max pooling layer, and a fully connected network. The fully connected network includes a first fully connected layer, a second ReLU activation function layer, a second fully connected layer, and a first Sigmoid activation function layer connected in sequence. The second ReLU activation function layer uses the ReLU activation function, and the first Sigmoid activation function layer uses the Sigmoid activation function. The input features of the channel detail attention module are respectively input to the global average pooling layer and the global max pooling layer to perform global average pooling and global max pooling operations, obtaining average pooling features and max pooling features, as shown in the following formula:

[0114] ;

[0115] ;

[0116] in, This represents the input features of the channel detail attention module. This represents the average pooling characteristic. This indicates an average pooling operation; This represents the max pooling feature. This represents the max pooling operation;

[0117] The average pooling feature and the max pooling feature are input into the fully connected network to obtain the first intermediate feature and the second intermediate feature, respectively. The first intermediate feature and the second intermediate feature are added together to obtain the channel detail attention weights, as shown in the following formula:

[0118] ;

[0119] in, Indicates the attention weights for channel details. This represents the Sigmoid activation function. Represents the ReLU activation function. and Let represent the weight matrices of the first and second fully connected layers, respectively; r is the channel reduction rate; and C represents the number of channels in the input features of the channel detail attention module. Represents the set of real numbers;

[0120] The channel attention weights are expanded to the same spatial dimension as the input features of the channel detail attention module through a broadcast operation, and then multiplied element-wise with the input features of the channel detail attention module to obtain the channel enhanced features, as shown in the following formula:

[0121] ;

[0122] in, Indicates channel enhancement features, This indicates element-wise multiplication. This indicates a broadcast operation.

[0123] Specifically, the detail learning attention module mentioned in the embodiments of this application includes a channel detail attention module and a spatial detail attention module. The channel detail attention module is used to characterize the differences in interference in each channel of a low-light image from the channel dimension. By extracting channel statistical information of average pooling and max pooling from the input features of the channel detail attention module, channel attention weights are generated to achieve adaptive adjustment of the enhancement magnitude of each channel and obtain discriminative channel enhancement features. The spatial detail attention module uses the channel enhancement features as input features to explicitly model their local structural information. It models local structural information through edge detection and texture detection and generates spatial attention weights to strengthen structurally sensitive areas and suppress noise areas. The channel detail attention module and the spatial detail attention module work together to obtain detail enhancement features that have both channel discriminativeness and spatial structural sensitivity, which are used to improve the overall brightness recovery, structure preservation and noise suppression capabilities of low-light images.

[0124] In the channel detail attention module, global average pooling and global max pooling operations are first performed on the input features of the channel detail attention module to obtain average pooling features and max pooling features. The average pooling features and max pooling features are then input into a two-layer fully connected network with shared parameters for feature compression and nonlinear mapping. The channel attention weights are obtained by activation through the Sigmoid activation function. The channel attention weights are then expanded to the same spatial dimension as the input features of the channel detail attention module through dimensionality broadcasting operation, and multiplied element-wise with the input features of the channel detail attention module to obtain channel enhancement features, so as to achieve adaptive enhancement of different channels under low light conditions.

[0125] In a specific embodiment, the spatial detail attention module includes an edge detection module, a texture detection module, a stitching layer, and a second convolutional module. The second convolutional module includes a second convolutional layer and a second sigmoid activation function layer connected in sequence, with the second sigmoid activation function layer employing the sigmoid activation function. The edge detection module includes a horizontal edge detection operator, a vertical edge detection operator, a third convolutional layer, and a fourth convolutional layer. Both the third and fourth convolutional layers employ convolution operations with a kernel size of 3×3. Channel enhancement features are obtained by passing the horizontal and vertical edge detection operators, respectively, to obtain horizontal and vertical edge response maps. These maps are then passed through the third and fourth convolutional layers to obtain horizontal and vertical edge features, respectively. Edge features are calculated based on these horizontal and vertical edge features, as shown in the following formula:

[0126] ;

[0127] in, Indicates edge features, This indicates a convolution operation with a kernel size of 3×3; This represents the horizontal edge detection operator. This represents the vertical edge detection operator. It is a very small constant;

[0128] The texture detection module includes a texture detection operator and a fifth convolutional layer. Both the second and fifth convolutional layers use a 7×7 kernel for convolution. Channel enhancement features are input into the texture detection module, first passing through the texture detection operator to obtain a texture response map. The texture response map is then input into the fifth convolutional layer to extract texture features, as shown in the following formula:

[0129] ;

[0130] in, Represents texture features, This represents a convolution operation with a kernel size of 7×7. This represents a texture detection operator;

[0131] The channel enhancement features, edge features, and texture features are concatenated and then input into the second convolutional module to obtain spatial attention weights, as shown in the following formula:

[0132] ;

[0133] in, This indicates a splicing operation. This represents the Sigmoid activation function. Indicates spatial attention weights;

[0134] The spatial attention weight is extended to the same spatial dimension as the channel enhancement feature through a broadcast operation, and then multiplied element-wise with the channel enhancement feature to obtain the detail enhancement feature, as shown in the following formula:

[0135] ;

[0136] in, Indicates details enhancement features, This indicates element-wise multiplication. This indicates a broadcast operation.

[0137] Specifically, the spatial detail attention module includes an edge detection module and a texture detection module. The edge detection module extracts the edge responses of the aforementioned channel enhancement features in the horizontal and vertical directions based on horizontal and vertical edge detection operators, obtaining horizontal edge response maps and vertical edge response maps. These are then processed through a third and a fourth convolutional layer to obtain horizontal and vertical edge features, respectively, ultimately calculating the edge features. In one embodiment, both the horizontal and vertical edge detection operators use the Sobel operator; in other embodiments, other operators may be used. This is a very small constant used to maintain numerical stability. The texture detection module extracts high-frequency texture information from the aforementioned channel enhancement features based on the texture detection operator to obtain texture features. In one embodiment, the texture detection operator uses the Laplacian operator; in other embodiments, other operators may also be used. The channel enhancement features, edge features, and texture features are further concatenated and input into the second convolutional layer of the second convolution module for convolution. Spatial attention weights are obtained by activating the sigmoid activation function. These spatial attention weights are then expanded to the same spatial dimension as the channel enhancement features through a dimension broadcasting operation and multiplied element-wise with the channel enhancement features to form detail enhancement features.

[0138] The above operation is repeated in each of the N detail enhancement modules in the feature enhancement module to finally obtain the Nth detail enhancement feature.

[0139] In a specific embodiment, the feature mapping module includes a channel fusion convolutional layer, a spatial reconstruction convolutional layer, and an output mapping convolutional layer connected in sequence. The channel fusion convolutional layer and the output mapping convolutional layer both use a convolution operation with a kernel size of 1×1, while the spatial reconstruction convolutional layer uses a convolution operation with a kernel size of 3×3.

[0140] Specifically, the Nth detail enhancement feature output by the feature enhancement module is restored through a convolutional operation in the feature mapping module and residually connected to the input low-light image to generate the corresponding enhanced image. The feature mapping module can restore the feature map, jointly modeled by the multi-level skip connections and the detail learning attention module, to the image domain, and then residually connect it to the input low-light image to obtain an enhanced image with improved brightness, restored details, and suppressed noise. This results in an enhanced image that outperforms the input low-light image in terms of brightness uniformity, edge structure clarity, and texture representation integrity. The feature mapping module includes a channel fusion convolutional layer for channel fusion, a spatial reconstruction convolutional layer for spatial detail reconstruction, and an output mapping convolutional layer for image domain mapping. These three convolutional layers are connected sequentially to restore the Nth detail enhancement feature output by the feature enhancement module to the image domain and residually connect it to the input low-light image to generate the corresponding enhanced image.

[0141] To verify the effectiveness of the detail learning-based low-light image enhancement method for smart home perception described in this invention, this embodiment constructs an experimental model based on the overall network structure proposed in this invention, and trains and tests it on a real multi-exposure dataset.

[0142] To enhance the model's adaptability under varying brightness conditions in home settings, this embodiment incorporates both low-light and overexposed images into the training data. The experiment uses multi-exposure image sequences from the first part of the SICE dataset as the training and validation data source. All 3,022 images in this subset are uniformly resized to 512×512×3 before being used for model training and performance validation. This experimental configuration effectively evaluates the actual enhancement effects of this invention in brightness restoration, structure preservation, and noise suppression.

[0143] After completing model training under the above conditions, this embodiment conducted enhancement tests on real low-light images of multiple scenes, and the results are as follows: Figure 3 As shown in the figure. Experimental results demonstrate that this method effectively restores the edge and texture details of objects while improving overall brightness, and has a good suppression effect on dark noise, resulting in stable and reliable output images in terms of brightness uniformity, color naturalness, and structural fidelity. Therefore, the trained low-light image enhancement model can meet the image quality requirements of visual perception tasks such as pedestrian re-identification in smart home scenarios.

[0144] S2, acquire the low-light image collected by the smart home sensing device and input it into the trained low-light image enhancement model. The low-light image first passes through the feature extraction module to obtain the initial image features. The initial image features are input into the feature enhancement module and pass through N detail enhancement modules in sequence to obtain the Nth detail enhancement feature. The Nth detail enhancement feature is then passed through the feature mapping module and residually connected with the low-light image to obtain the corresponding enhanced image.

[0145] Specifically, the trained low-light image enhancement model is deployed. During the inference phase, the low-light image to be enhanced is acquired and input into the trained low-light image enhancement model to generate an enhanced image that improves brightness, restores structure, and meets the sensing needs of smart homes.

[0146] Furthermore, the enhanced image can be input into a downstream task-specific network, which is used to perform task-related representation learning and result generation on the enhanced image to meet the needs of target recognition, behavior analysis, event detection, or environmental understanding in smart home scenarios. The trained low-light image enhancement model is then trained using a downstream task-related loss function, making the enhanced image more in line with the discriminative requirements of visual input in multiple smart home scenarios, thereby improving overall perception performance and task execution reliability under low-light conditions.

[0147] Taking a Transformer-based re-identification model with a downstream task-specific network as an example, this model includes a backbone network based on the TransReID-SSL network architecture, batch normalization layers, and a classifier. The enhanced image first extracts deep representation features through the TransReID-SSL backbone network, and then optimizes the inter-class separability and intra-class compactness of these deep representation features using triplet loss. Subsequently, after processing by the batch normalization layer, the classifier calculates cross-entropy loss to further optimize the identity discrimination ability. Thus, a finely tuned low-light image enhancement model and a finely tuned re-identification model are trained. Through the above joint optimization, this finely tuned low-light image enhancement model can generate enhanced images with further improved re-identification accuracy and stability.

[0148] The total loss function of the joint optimization is shown in the following equation:

[0149] ;

[0150] in, Represents the total loss function. This represents the weights of the triplet loss function. Represents the triplet loss function. The weights represent the cross-entropy loss function weights. The cross-entropy loss function is represented by the following formulas: The specific formulas for calculating the triplet loss function and the cross-entropy loss function are shown below:

[0151] ;

[0152] ;

[0153] Where N' represents the number of triples in the training batch; m represents the interval hyperparameter of the triple loss, which is used to limit the minimum difference between the feature distances of positive and negative samples; These represent anchor samples constructed from enhanced images, positive samples belonging to the same category, and negative samples belonging to other categories, respectively. This represents the deep representation features extracted by the backbone network of the re-identification model from the input augmented image; Euclidean distance is used to measure the similarity between feature vectors; in cross-entropy loss, This indicates the probability that the classifier in the re-identification model predicts the true label of a sample given an augmented image corresponding to a low-light image. This is the true label for the sample; Let represent the low-light image of the i-th input. Since all the above variables are based on the enhanced image and its corresponding depth representation features, the triplet loss and cross-entropy loss can back-transmit the supervision signal of the downstream re-identification task to the trained low-light image enhancement model, enabling it to actively generate more discriminative enhancement results while improving brightness and restoring structure, thereby significantly improving the accuracy and stability of the re-identification task in the smart home scenario.

[0154] Further reference Figure 4 As an implementation of the methods shown in the above figures, this application provides an embodiment of a detail learning low-light image enhancement device for smart home perception. This device embodiment is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0155] This application provides a detail-learning low-light image enhancement device for smart home perception, comprising:

[0156] Model building module 1 is configured to build and train a low-light image enhancement model based on learning of details, resulting in a trained low-light image enhancement model. This model includes a feature extraction module, a feature enhancement module, and a feature mapping module. The feature enhancement module comprises N detail enhancement modules and employs a structure of progressive convolutional feature extraction and feature skip connections, where N is a positive even number. Each detail enhancement module includes a first convolutional module and a detail learning attention module connected in sequence. The detail learning attention module includes a channel detail attention module and a spatial detail attention module connected in sequence.

[0157] Enhancement module 2 is configured to acquire low-light images collected by smart home sensing devices and input them into a trained low-light image enhancement model. The low-light image first passes through a feature extraction module to obtain initial image features. The initial image features are then input into a feature enhancement module, which sequentially passes through N detail enhancement modules to obtain the Nth detail enhancement feature. The Nth detail enhancement feature is then passed through a feature mapping module and residually connected to the low-light image to obtain the corresponding enhanced image.

[0158] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. For example... Figure 5 As shown, the electronic device of this embodiment includes a processor 501 and a memory 502; wherein the memory 502 is used to store computer execution instructions; and the processor 501 is used to execute the computer execution instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant descriptions in the foregoing method embodiments.

[0159] Alternatively, the memory 502 can be either standalone or integrated with the processor 501.

[0160] When the memory 502 is set up independently, the electronic device also includes a bus 503 for connecting the memory 502 and the processor 501.

[0161] This invention also provides a computer storage medium storing computer execution instructions, which, when executed by processor 501, implement the above method.

[0162] This invention also provides a computer program product, including a computer program that, when executed by a processor 501, implements the above-described method.

[0163] In the embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0164] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0165] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit formed by the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0166] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor 501 to execute some steps of the methods of the various embodiments of this application.

[0167] It should be understood that the processor 501 described above can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor, or the processor 501 can be any conventional processor 501. The steps of the method disclosed in this invention can be directly manifested as execution by the hardware processor 501, or execution by a combination of hardware and software modules within the processor 501.

[0168] The memory 502 may include high-speed RAM memory, and may also include non-volatile memory NVM, such as at least one disk storage device, and may also be a USB flash drive, portable hard drive, read-only memory, disk or optical disc, etc.

[0169] Bus 503 can be an Industry Standard Architecture (ISA), a Peripheral Computational Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Bus 503 can be divided into address bus, data bus, control bus, etc. For ease of illustration, the bus 503 in the accompanying drawings of this application is not limited to only one bus 503 or one type of bus 503.

[0170] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0171] An exemplary storage medium is coupled to processor 501, enabling processor 501 to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of processor 501. Processor 501 and storage medium can reside in application-specific integrated circuits (ASICs). Alternatively, processor 501 and storage medium can exist as discrete components in an electronic device or host device.

[0172] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A detail-learning low-light image enhancement method for smart home perception, characterized in that, Includes the following steps: A low-light image enhancement model based on learning of details is constructed and trained to obtain a trained low-light image enhancement model. The low-light image enhancement model includes a feature extraction module, a feature enhancement module, and a feature mapping module. The feature enhancement module includes N detail enhancement modules and adopts a structure of progressive convolutional feature extraction and feature skip connections, where N is a positive even number. Each detail enhancement module includes a first convolutional module and a detail learning attention module connected in sequence. The detail learning attention module includes a channel detail attention module and a spatial detail attention module connected in sequence. The input features of the detail learning attention module first pass through the channel detail attention module to obtain channel enhancement features, and then pass through the spatial detail attention module to obtain detail enhancement features. The spatial detail attention module includes an edge detection module, a texture detection module, a stitching layer, and a second convolutional module. The second convolutional module includes a second convolutional layer and a second Sigmoid activation function layer connected in sequence. The gmoid activation function layer uses the sigmoid activation function; the edge detection module includes a horizontal edge detection operator, a vertical edge detection operator, a third convolutional layer, and a fourth convolutional layer. Both the third and fourth convolutional layers use a 3×3 kernel for convolution. The channel enhancement features are obtained by passing the horizontal and vertical edge detection operators to obtain horizontal and vertical edge response maps. These maps are then passed through the third and fourth convolutional layers to obtain horizontal and vertical edge features. The edge features are calculated based on these features, as shown in the following formula: ; in, Indicates edge features, This indicates a convolution operation with a kernel size of 3×3; This represents the horizontal edge detection operator. This represents the vertical edge detection operator. It is a constant. Indicates channel enhancement features; The texture detection module includes a texture detection operator and a fifth convolutional layer. Both the second and fifth convolutional layers employ a 7×7 kernel size convolution operation. The channel enhancement features are input into the texture detection module, first passing through the texture detection operator to obtain a texture response map. The texture response map is then input into the fifth convolutional layer to extract texture features, as shown in the following formula: ; in, Represents texture features, This represents a convolution operation with a kernel size of 7×7. This represents a texture detection operator; The channel enhancement features, edge features, and texture features are then input into the second convolutional module after passing through the concatenation layer to obtain spatial attention weights, as shown in the following formula: ; in, This indicates a splicing operation. This represents the Sigmoid activation function. Indicates spatial attention weights; The spatial attention weight is extended to the same spatial dimension as the channel enhancement feature through a broadcast operation, and then multiplied element-wise with the channel enhancement feature to obtain the detail enhancement feature, as shown in the following formula: ; in, This indicates enhanced detail features. This indicates element-wise multiplication. Indicates a broadcast operation; The low-light image collected by the smart home sensing device is acquired and input into the trained low-light image enhancement model. The low-light image first passes through the feature extraction module to obtain initial image features. The initial image features are input into the feature enhancement module and pass through N detail enhancement modules in sequence to obtain the Nth detail enhancement feature. The Nth detail enhancement feature is then passed through the feature mapping module and residually connected with the low-light image to obtain the corresponding enhanced image.

2. The detail-learning low-light image enhancement method for smart home perception according to claim 1, characterized in that, The feature extraction module includes a first convolution module, which includes a first convolutional layer and a first ReLU activation function layer connected in sequence. The first convolutional layer uses a convolution operation with a kernel size of 3×3, and the first ReLU activation function layer uses the ReLU activation function.

3. The detail-learning low-light image enhancement method for smart home perception according to claim 2, characterized in that, The initial image features are first input into the first detail enhancement module of the feature enhancement module, and then sequentially pass through the first convolution module and the detail learning attention module in the first detail enhancement module to obtain the first detail enhancement feature, as shown in the following formula: ; in, Represents the initial image features. This indicates the first detail enhancement feature. Represents the spatial detail attention module, This indicates the channel detail attention module; The first detail enhancement feature is input into the second detail enhancement module within the feature enhancement module. It then passes sequentially through the first convolutional module and the detail learning attention module within the second detail enhancement module to obtain the second detail enhancement feature, as shown in the following equation: ; in, This indicates the second detail enhancement feature; This process continues until the N / 2-1th detail enhancement module in the feature enhancement module outputs the N / 2-1th detail enhancement feature; The N / 2-1th detail enhancement feature is input into the N / 2th detail enhancement module of the feature enhancement module, and then passes through the first convolution module and the detail learning attention module in the N / 2th detail enhancement module to obtain the N / 2th detail enhancement feature, as shown in the following formula: ; in, This represents the N / 2th detail enhancement feature; The N / 2-1th and N / 2th detail enhancement features are skip-connected and then input into the N / 2+1th detail enhancement module in the feature enhancement module. The feature enhancement module then passes through the first convolutional module and the detail learning attention module in the N / 2+1th detail enhancement module to obtain the N / 2+1th detail enhancement feature, as shown in the following formula: ; in, This indicates a splicing operation. This represents the N / 2+1th detail enhancement feature; After skip connection between the N / 2-2nd and N / 2+1th detail enhancement features, the input is fed into the N / 2+2nd detail enhancement module in the feature enhancement module. The feature then passes through the first convolutional module and the detail learning attention module in the N / 2+2nd detail enhancement module to obtain the N / 2+2nd detail enhancement feature, as shown in the following equation: ; in, This represents the N / 2+2th detail enhancement feature; This process continues until the (N-1)th detail enhancement module in the feature enhancement module outputs the (N-1)th detail enhancement feature; The initial image features and the (N-1)th detail enhancement features are skip-connected and then input into the Nth detail enhancement module within the feature enhancement module. The Nth detail enhancement features then pass through the first convolutional module and the detail learning attention module within the Nth detail enhancement module, resulting in the Nth detail enhancement feature, as shown in the following equation: ; in, This represents the Nth detailed enhancement feature.

4. The detail-learning low-light image enhancement method for smart home perception according to claim 2, characterized in that, The channel detail attention module includes a global average pooling layer, a global max pooling layer, and a fully connected network. The fully connected network comprises a first fully connected layer, a second ReLU activation function layer, a second fully connected layer, and a first Sigmoid activation function layer connected in sequence. The second ReLU activation function layer uses the ReLU activation function, and the first Sigmoid activation function layer uses the Sigmoid activation function. The input features of the channel detail attention module are respectively input to the global average pooling layer and the global max pooling layer to perform global average pooling and global max pooling operations, obtaining average pooling features and max pooling features, as shown in the following formula: ; ; in, This represents the input features of the channel detail attention module. This represents the average pooling characteristic. This indicates an average pooling operation; This represents the max pooling feature. This represents the max pooling operation; The average pooling feature and the max pooling feature are respectively input into the fully connected network to obtain a first intermediate feature and a second intermediate feature. The first intermediate feature and the second intermediate feature are added together to obtain the channel detail attention weight, as shown in the following formula: ; in, Indicates the attention weights for channel details. This represents the Sigmoid activation function. Represents the ReLU activation function. and Let represent the weight matrices of the first and second fully connected layers, respectively; r is the channel reduction rate; and C represents the number of channels in the input features of the channel detail attention module. Represents the set of real numbers; The channel detail attention weights are expanded to the same spatial dimension as the input features of the channel detail attention module through a broadcast operation, and then multiplied element-wise with the input features of the channel detail attention module to obtain the channel enhancement features, as shown in the following formula: ; in, Indicates channel enhancement features, This indicates element-wise multiplication. This indicates a broadcast operation.

5. The detail-learning low-light image enhancement method for smart home perception according to claim 1, characterized in that, The feature mapping module includes a channel fusion convolutional layer, a spatial reconstruction convolutional layer, and an output mapping convolutional layer connected in sequence. The channel fusion convolutional layer and the output mapping convolutional layer both use a convolution operation with a kernel size of 1×1, and the spatial reconstruction convolutional layer uses a convolution operation with a kernel size of 3×3.

6. A detail-learning low-light image enhancement device for smart home perception, characterized in that, include: The model building module is configured to construct and train a low-light image enhancement model based on learning of details, resulting in a trained low-light image enhancement model. This model includes a feature extraction module, a feature enhancement module, and a feature mapping module. The feature enhancement module comprises N detail enhancement modules and employs a structure of progressive convolutional feature extraction and feature skip connections, where N is a positive even number. Each detail enhancement module includes a first convolutional module and a detail learning attention module connected in sequence. The detail learning attention module includes a channel detail attention module and a spatial detail attention module connected in sequence. The input features of the detail learning attention module first pass through the channel detail attention module to obtain channel enhancement features, and then pass through the spatial detail attention module to obtain detail enhancement features. The spatial detail attention module includes an edge detection module, a texture detection module, a stitching layer, and a second convolutional module. The second convolutional module includes a second convolutional layer and a second Sigmoid activation function layer connected in sequence. The gmoid activation function layer uses the sigmoid activation function; the edge detection module includes a horizontal edge detection operator, a vertical edge detection operator, a third convolutional layer, and a fourth convolutional layer. Both the third and fourth convolutional layers use a 3×3 kernel for convolution. The channel enhancement features are obtained by passing the horizontal and vertical edge detection operators to obtain horizontal and vertical edge response maps. These maps are then passed through the third and fourth convolutional layers to obtain horizontal and vertical edge features. The edge features are calculated based on these features, as shown in the following formula: ; in, Indicates edge features, This indicates a convolution operation with a kernel size of 3×3; This represents the horizontal edge detection operator. This represents the vertical edge detection operator. It is a constant. Indicates channel enhancement features; The texture detection module includes a texture detection operator and a fifth convolutional layer. Both the second and fifth convolutional layers employ a 7×7 kernel size convolution operation. The channel enhancement features are input into the texture detection module, first passing through the texture detection operator to obtain a texture response map. The texture response map is then input into the fifth convolutional layer to extract texture features, as shown in the following formula: ; in, Represents texture features, This represents a convolution operation with a kernel size of 7×7. This represents a texture detection operator; The channel enhancement features, edge features, and texture features are then input into the second convolutional module after passing through the concatenation layer to obtain spatial attention weights, as shown in the following formula: ; in, This indicates a splicing operation. This represents the Sigmoid activation function. Represents spatial attention weights. Indicates channel enhancement features; The spatial attention weight is extended to the same spatial dimension as the channel enhancement feature through a broadcast operation, and then multiplied element-wise with the channel enhancement feature to obtain the detail enhancement feature, as shown in the following formula: ; in, This indicates enhanced detail features. This indicates element-wise multiplication. Indicates a broadcast operation; The enhancement module is configured to acquire low-light images collected by smart home sensing devices and input them into the trained low-light image enhancement model. The low-light image first passes through the feature extraction module to obtain initial image features. The initial image features are then input into the feature enhancement module and sequentially pass through N detail enhancement modules to obtain the Nth detail enhancement feature. The Nth detail enhancement feature is then passed through the feature mapping module and residually connected to the low-light image to obtain the corresponding enhanced image.

7. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Multi-stage feature fusion detection method for low-illumination underwater target

    CN120931502A

  • Low-light image enhancement method based on multilevel feature fusion

    CN121190325A