Low-illumination target detection method based on multi-dimensional attention mechanism

By introducing the FEM-MDT module and MDAM module in the RT-DETR model, the problems of insufficient light, reduced contrast and noise interference in target detection in low-illumination environments are solved, and higher feature extraction accuracy and detection accuracy are achieved.

CN119832220AActive Publication Date: 2025-04-15ANHUI UNIV OF SCI & TECH GUOZHEN INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510303964.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-04-15
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

In low-illumination environments, object detection faces problems such as insufficient light, reduced contrast, noise interference and loss of detailed information, and the prior art is difficult to effectively solve these problems.

Method used

The low-illumination object detection method based on a multi-dimensional attention mechanism is adopted, and the feature extraction is extracted by introducing FEM-MDT module into the backbone network of the RT-DETR model, and MDAM module is added to the neck structure to improve the accuracy of feature extraction and the model's understanding of features.

Benefits of technology

It significantly improves the accuracy and reliability of feature extraction under low illumination conditions, improves the model's understanding of features, and thus improves the accuracy of low illumination object detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832220A_ABST
    Figure CN119832220A_ABST
Patent Text Reader

Abstract

The invention discloses a low-illumination target detection method based on a multi-dimensional attention mechanism, and the method comprises the steps: firstly collecting a low-illumination image data set, and converting the low-illumination image data set into a YOLO format; then, a low-illumination target detection model is constructed for target detection, and the low-illumination target detection model takes an RT-DETR model as a reference network and comprises a backbone network, a neck structure and a head structure; the backbone network performs feature extraction on an input feature map based on a feature extraction module of a multi-scale cavity converter; a multi-dimensional attention module is added into the neck structure; and finally, performing iterative training on the constructed low-illumination target detection model to obtain a trained low-illumination target detection model, and detecting a to-be-detected target in the low-illumination image by using the trained low-illumination target detection model to obtain a detection result. According to the low-illumination target detection model constructed by the invention, the feature extraction accuracy and reliability under the low-illumination condition are improved, and the understanding ability of the model to the features is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image data processing technology, and specifically to a low-illumination target detection method based on a multi-dimensional attention mechanism. Background Art

[0002] In the field of computer vision, target detection has always occupied a core position, and its wide application has profoundly influenced the development direction of many industries and technologies. Target detection aims to accurately locate and identify specific targets from images or video sequences. This technology plays an indispensable cornerstone role in autonomous driving, intelligent security monitoring, industrial detection, and many intelligent image analysis systems. However, when the scene is converted to a low-light environment, target detection faces extremely severe challenges, and its technical background becomes extremely complex. Low-light images mainly come from situations where lighting conditions are severely insufficient, such as outdoor scenes without auxiliary lighting at night, dim indoor environments, or special work areas with weak light. In this case, the image quality drops sharply, showing many characteristics that are not conducive to target detection.

[0003] First, the contrast of low-light images is significantly reduced. Weak light makes the brightness difference between the target and the background blurred, and the originally clear target edge and texture information are difficult to distinguish under low contrast, which poses a great obstacle to traditional methods that rely on target edge and texture features for detection. For example, in some target positioning algorithms based on edge detection, low contrast leads to inaccurate edge extraction, and thus the position and outline of the target cannot be accurately defined. Secondly, noise becomes a prominent problem in low-light images. Due to insufficient light, the image sensor needs to increase the gain to enhance the signal strength when collecting images, but this also amplifies the noise signal. These noises exist in various forms such as salt and pepper noise and Gaussian noise, which seriously interfere with the real feature information of the target. For traditional feature extraction methods, the presence of noise greatly reduces the stability and reliability of the extracted features, and it is easy to misjudge the noise as the target feature or cover up the real feature of the target, thereby causing false detection or missed detection. Furthermore, a large amount of detail information in low-light images is lost. The lack of light makes it difficult to clearly present the subtle structure and local features of the target. In deep learning models, this means that the effective information available for learning and identifying targets is reduced. If many deep learning models do not perform special processing on low-light images during training, it is difficult for them to learn the essential features of the target from the blurred details, resulting in low accuracy in actual low-light detection tasks.

[0004] From the perspective of technology development, traditional target detection technology is mainly divided into two categories: manual feature-based and deep learning-based methods. Manual feature-based methods, such as HOG and SIFT, extract target features through manually designed feature descriptors, and then use classifiers to identify and locate targets. However, this type of method is highly dependent on professional knowledge and rich experience, and the generalization ability of manually designed features is limited, making it difficult to adapt to complex and changeable low-light scenes. At the same time, the feature extraction process is complex and the computational efficiency is not high. With the rise of deep learning, target detection technology has ushered in a new revolution. The two-stage target detection technology based on deep learning, represented by the Faster R-CNN algorithm, first generates possible candidate regions through the region proposal network, and then extracts and classifies these regions. Although it has certain advantages in detection accuracy, it has problems such as slow detection speed, complex model structure, long training time, and high hardware resource requirements. Single-stage target detection technology, such as the YOLO series, regards target detection as a regression problem and realizes real-time detection, but the early versions have relatively low detection accuracy in complex low-light scenes, and are prone to missed detection and false detection.

[0005] In recent years, attention mechanisms have been introduced into the field of target detection to improve performance. It can guide the model to focus on key areas or features in the image, and improve the perception of the target to a certain extent. However, in terms of low-light small target detection, the existing attention mechanism is still insufficient. Due to the complex background of low-light images and weak target signals, some attention modules are difficult to accurately assign attention weights, are easily disturbed by noise, or fail to highlight the focus on small targets, which ultimately affects the detection accuracy.

[0006] As an emerging target detection technology, RT-DETR (Real-Time Detection Transformer) has the advantages of fast detection speed, high accuracy, and relatively simple model structure for easy deployment and application in conventional scenarios. However, it also faces many difficulties in the field of low-light target detection. In low-light environments with complex backgrounds, such as nighttime city streets, where light reflections and shadows are intertwined, RT-DETR is difficult to accurately define the boundary between the target and the background, resulting in inaccurate positioning, misjudgment or missed targets. For small targets with weak features under low illumination and easily masked by noise, its general detection mechanism is difficult to effectively capture subtle features, resulting in a significant decline in detection accuracy, frequent missed detections and false detections. In addition, it lacks effective denoising or anti-noise strategies specifically for low-light image noise, and is easily interfered by noise during feature extraction, resulting in deviations in the extracted target features, which in turn affects the detection results. When the target changes its posture in a low-light scene, RT-DETR is also difficult to adapt quickly, and cannot accurately extract effective features of targets in different postures, which interferes with detection and classification. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a low-illumination target detection method based on a multi-dimensional attention mechanism. The RT-DETR model is used as the benchmark network. Its backbone network uses the FEM-MDT module to extract features from the input feature map, and the MDAM module is added to the neck structure, thereby improving the accuracy and reliability of feature extraction under low-illumination conditions and improving the model's ability to understand features.

[0008] The technical solution of the present invention is: A low-light target detection method based on a multi-dimensional attention mechanism specifically includes the following steps: (1) Collect low-light image datasets and convert the format of the low-light image datasets into YOLO format; (2) Construct a low-light target detection model. The low-light target detection model uses the RT-DETR model as the benchmark network, including a backbone network, a neck structure, and a head structure. The backbone network extracts features from the input feature map based on the FEM-MDT module. The MDAM module is added to the neck structure to fuse feature maps of different scales output by the backbone network. The head structure is a decoder that decodes the feature map output by the neck structure, decodes the target information, and outputs the final detection result. The FEM-MDT module is a feature extraction module based on a multi-scale dilated transformer, with dilated convolutions of different expansion rates as the core, and extracts features by applying a sliding window on the image through dilated convolutions of different expansion rates; The MDAM module is a multi-dimensional attention module that uses a three-branch structure to capture the cross-dimensional interaction of input data to calculate the attention weight; (3) Iteratively train the constructed low-illumination target detection model to obtain a trained low-illumination target detection model, and use the trained low-illumination target detection model to detect the target to be detected in the low-illumination image to obtain the detection result.

[0009] The processing process of the FEM-MDT module specifically includes the following steps: S11. First, the input feature map is divided into small non-overlapping areas, and then the query is obtained by linear projection. ,key ,value Tensor, and then query ,key ,value The tensors are fed into the sliding window dilation attention with different dilation rates, specifically: query The tensor is fed into a dilation rate of 1 Dilated convolution, key The tensor is fed into a dilation rate of 2 Dilated convolution, value The tensor is fed into a dilation rate of 3 Hollow convolution to obtain feature maps with different receptive fields The processing process is shown in the following formula (1), and the calculation formula of the convolution kernel size of the receptive field is shown in the following formula (2); (1); (2); In formula (1) and formula (2), Expanding attention for sliding windows, , and represent the query matrix, key matrix and value matrix respectively, is the expansion rate, represents the convolution kernel size of the receptive field, Represents the original convolution kernel size, and is calculated by formula (2) to obtain the query The receptive field after the dilated convolution is ,key The receptive field after the dilated convolution is ,value The receptive field after the dilated convolution is ; Then the three feature maps obtained They are input into the channel attention for processing respectively, and the attention map and feature map obtained after processing Perform element-by-element multiplication to obtain the feature map , see the following formula (3) for details, and then the feature map Input into the spatial attention for processing, and then get the attention map and feature map Perform element-by-element multiplication to obtain the feature map , see the following formula (4) for details: (3); (4); In formula (3) and formula (4), is the channel attention, For spatial attention, It is an element-by-element multiplication operation; Then the three feature maps of different scales are concatenated and linearly layered to obtain the feature map , and then Perform global average pooling, Convolution, ReLU activation function, After convolution and Sigmoid function activation operations, The multiplication is performed element by element, and the multiplication output is then added element by element to the feature map initially input after passing through the GELU function and batch normalization for output.

[0010] The backbone network includes an HGStem module, six FEM-MDT modules and three DWConv modules. The processing process of the backbone network is shown in the following formula (5): (5); In formula (5), As the input of the backbone network, that is, the collected low-light image, , , , Four feature maps of different scales extracted by the backbone network.

[0011] The neck structure includes nine Conv 1×1 modules, four Conv 3×3 modules, two MDAM modules, one AIFI module, two ConvTranspose modules, four RepC3 modules and four Concat modules. The processing process of the neck structure is shown in the following formula (6): (6); In formula (6), , , , , , and is the intermediate feature map of the neck structure, , and Three feature maps output for the neck structure; The three characteristic graphs output by the neck structure , and Input into the decoder of the header structure, decode the target information and output the final detection result.

[0012] The processing process of the MDAM module specifically includes the following steps: S21. Tensor Input into the MDAM module, in the first branch, call the Permute function so that the tensor Convert to dimension Tensor , tensor Pass by Pooling, After convolution, batch normalization and Sigmoid activation function operations, attention weights are generated. Attention weights and tensors Perform element-by-element multiplication to obtain a tensor , and then call the Permute function again to make the tensor Convert to dimension Tensor ; In the second branch, the Permute function is called to make the tensor Convert to dimension Tensor , tensor Pass by Pooling, After convolution, batch normalization and Sigmoid activation function operations, attention weights are generated. Attention weights and tensors Perform element-by-element multiplication to obtain a tensor , and then call the Permute function again to make the tensor Convert to dimension Tensor ; In the third branch, the tensor After channel pooling, After convolution, batch normalization and Sigmoid activation function operations, attention weights are generated. Attention weights and tensors Perform element-by-element multiplication to obtain a tensor ; Then the tensor , and Add element by element, and we get ; S22, will Divided into four feature maps of different scales, specifically Right now use Convolution is performed to downsample and obtain the feature map , and then the feature map use Convolution is performed to downsample and obtain the feature map , again for the feature map use Convolution is performed to downsample and obtain the feature map , then four feature maps of different scales , , and After being processed by the channel attention module, the output attention weight coefficients are then compared with the feature maps of the corresponding scales. , , or Perform element-by-element multiplication and then pass Convolution obtains four feature maps of different scales , , and ,right Perform upsampling to obtain , Directly ,right and The downsampling operation is performed to obtain and , then , , and After performing smooth convolution operations respectively, the four outputs of the smooth convolution operation are multiplied element by element to obtain the final output feature map.

[0013] The The pooling process is shown in the following formula (7): (7); In formula (7), represent Pooled input, represent The output result after pooling dimension reduction, represents maximum pooling, represents average pooling, and Subscript in Represents the 0th dimension for the maximum pooling and average pooling operations, i.e., the batch size.

[0014] The processing process of the channel attention module is specifically as follows: the input feature map is processed by global average pooling and global maximum pooling respectively, and then the feature map processed by global average pooling and the feature map processed by global maximum pooling are added element by element, and then activated by Sigmoid activation function to obtain the attention weight coefficient.

[0015] Advantages of the present invention: (1) The backbone network of the low-light target detection model of the present invention uses a FEM-MDT module (a feature extraction module based on a multi-scale hole transformer) to extract features from the input feature map. The FEM-MDT module can obtain feature information at different scales and pay attention to the target itself and the broader contextual information around the target. The sliding window in the FEM-MDT module can traverse the entire image in a systematic manner. By starting from the upper left corner of the image and moving the window with a fixed step size, it ensures that every part of the image is detected, thereby significantly improving the accuracy and reliability of feature extraction under low-light conditions and strengthening the feature extraction capability of the visual system; (2) The present invention adds an MDAM module to the neck structure and uses a three-branch structure to capture the cross-dimensional interaction of the input data, thereby calculating the attention weight, so that the low-light target detection model can build the interdependence between channels and spatial positions, thereby improving the low-light target detection model's ability to understand features. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of the present invention.

[0017] Figure 2 It is a network structure diagram of the low-illumination target detection model of the present invention.

[0018] Figure 3 It is a network structure diagram of the FEM-MDT module of the present invention.

[0019] Figure 4 It is a network structure diagram of the three-branch structure of the MDAM module of the present invention.

[0020] Figure 5 It is a network structure diagram of the fusion of feature maps of different scales in the MDAM module of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] See Figure 1 , a low-light target detection method based on a multi-dimensional attention mechanism, specifically including the following steps: (1) Collect a low-light image dataset and convert the format of the low-light image dataset into the YOLO format. Divide the low-light image dataset into a training set, a validation set, and a test set in a ratio of 7:2:1. The training set is used for model training to update the model weights. The validation set is used for model evaluation after each round of training. The test set is used to evaluate the final detection performance of the model after the training is completed. (2) Build a low-light target detection model and perform target retrieval; See Figure 2 ,The low-light target detection model uses the RT-DETR model as the benchmark network, including the backbone network, neck structure and head structure; The backbone network includes HGStem modules, six FEM-MDT modules and three DWConv modules ( Figure 2 The processing process of the backbone network is shown in the following formula (5): (5); In formula (5), As the input of the backbone network, that is, the collected low-light image, , , , Four feature maps of different scales extracted by the backbone network; The neck structure includes nine Conv 1×1 (1×1 convolution) modules, four Conv 3×3 (3×3 convolution) modules, two MDAM modules, one AIFI module, two ConvTranspose modules, four RepC3 modules and four Concat (concatenation) modules ( Figure 2 The processing process of the neck structure is shown in the following formula (6): (6); In formula (6), , , , , , and is the intermediate feature map of the neck structure, , and Three feature maps output for the neck structure; Three feature maps of neck structure output , and Input into the decoder of the header structure, decode the target information and output the final detection result; See Figure 3The FEM-MDT module is a feature extraction module based on a multi-scale dilated transformer. It uses dilated convolutions with different dilation rates as the core and applies sliding windows on the image to extract features. The processing of the FEM-MDT module specifically includes the following steps: S11. First, the input feature map is divided into small non-overlapping areas, and then the query is obtained by linear projection. ,key ,value Tensor, and then query ,key ,value The tensors are fed into the sliding window dilation attention with different dilation rates, specifically: query The tensor is fed into a dilation rate of 1 Dilated convolution, key The tensor is fed into a dilation rate of 2 Dilated convolution, value The tensor is fed into a dilation rate of 3 Hollow convolution to obtain feature maps with different receptive fields The processing process is shown in the following formula (1), and the calculation formula of the convolution kernel size of the receptive field is shown in the following formula (2); (1); (2); In formula (1) and formula (2), Expanding attention for sliding windows, , and represent the query matrix, key matrix and value matrix respectively, is the expansion rate, represents the convolution kernel size of the receptive field, Represents the original convolution kernel size, and is calculated by formula (2) to obtain the query The receptive field after the dilated convolution is ,key The receptive field after the dilated convolution is ,value The receptive field after the dilated convolution is ; Then the three feature maps obtained They are input into the channel attention for processing respectively, and the attention map and feature map obtained after processing Perform element-by-element multiplication to obtain the feature map , see the following formula (3) for details, and then the feature map Input into the spatial attention for processing, and then get the attention map and feature map Perform element-by-element multiplication to obtain the feature map , see the following formula (4) for details: (3); (4); In formula (3) and formula (4), is the channel attention, For spatial attention, It is an element-by-element multiplication operation; Then the three feature maps of different scales are concatenated and linearized to obtain the feature map , and then Perform global average pooling (Global AvgPool) in sequence, Convolution (Conv 1×1), ReLU activation function, Convolution (Conv 1×1) and Sigmoid function activation operation and then Perform element-by-element multiplication, and then pass the GELU function and batch normalization (BN) before adding the element-by-element of the feature map initially input for output; The MDAM module is a multi-dimensional attention module. It uses a three-branch structure to capture the cross-dimensional interaction of input data, thereby calculating the attention weight, so that the model can build the interdependence between channels and spatial positions and improve the model's ability to understand features. The processing process of the MDAM module specifically includes the following steps: S21, see Figure 4 , the tensor Input into the MDAM module, in the first branch, call the Permute function so that the tensor Convert to dimension Tensor , tensor Pass by Pooling (Z-Pool), Convolution (Conv 7×7), batch normalization (BN) and Sigmoid activation function operations generate attention weights, which are related to tensors. Perform element-by-element multiplication to obtain a tensor , and then call the Permute function again to make the tensor Convert to dimension Tensor ; In the second branch, the Permute function is called to make the tensor Convert to dimension Tensor , tensor Pass by Pooling (Z-Pool), Convolution (Conv 7×7), batch normalization (BN) and Sigmoid activation function operations generate attention weights, which are related to tensors. Perform element-by-element multiplication to obtain a tensor , and then call the Permute function again to make the tensor Convert to dimension Tensor ; In the third branch, the tensor After channel pooling, Convolution (Conv 7×7), batch normalization (BN) and Sigmoid activation function operations generate attention weights, which are related to tensors. Perform element-by-element multiplication to obtain a tensor ; Then the tensor , and Add element by element, and we get ; S22, see Figure 5 ,Will Divided into four feature maps of different scales, specifically Right now use Convolution is performed to downsample and obtain the feature map , and then the feature map use Convolution is performed to downsample and obtain the feature map , again for the feature map use Convolution is performed to downsample and obtain the feature map , then four feature maps of different scales , , and After being processed by the channel attention (CA) module, the output attention weight coefficients are then compared with the feature maps of the corresponding scales. , , or Perform element-by-element multiplication and then pass Convolution (Conv 1×1) obtains four feature maps of different scales , , and ,right Perform an upsample operation to obtain , The direct identity map is ,right and DownSample operation is performed on both and , then , , and After performing smooth convolution (SmoothConv) operations respectively, the four outputs of the smooth convolution operation are multiplied element by element to obtain the final output feature map; The above The pooling process is shown in the following formula (7): (7); In formula (7), represent Pooled input, represent The output result after pooling dimension reduction, represents maximum pooling, represents average pooling, and Subscript in Represents the 0th dimension for the maximum pooling and average pooling operations, i.e., the batch size; The processing process of the channel attention (CA) module is as follows: the input feature map is processed by global average pooling and global maximum pooling respectively, and then the feature map processed by global average pooling and the feature map processed by global maximum pooling are added element by element, and then activated by Sigmoid activation function to obtain the attention weight coefficient; (3) Iteratively train the constructed low-illumination target detection model and use the SGD optimizer to optimize the model. The batch normalization size is 16 and the number of iterations is 120 to obtain a trained low-illumination target detection model. Use the trained low-illumination target detection model to detect the target to be detected in the low-illumination image and obtain the detection result.

[0023] The low-light target detection model is iteratively trained using the ExDark dataset, and the model is optimized using the SGD (Stochastic Gradient Descent) optimizer. The batch normalization size is 16, and the total number of training cycles is 120 times to obtain the trained low-light target detection model.

[0024] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and the computer program can be executed by the data processing unit to run the invention content of a low-light target detection method based on a multi-dimensional attention mechanism provided by the present invention and some or all of the steps in each embodiment. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0025] Table 1 below is a comparative experiment using the ExDark dataset. The experimental results in Table 1 show that the model (Ours) proposed in this embodiment leads other existing models (TOOD, ATSS, R-CNN, FasterR-CNN, YOLOv8n, YOLOv10n and RT-DETR) with a precision of 0.854, indicating that it performs best in correctly identifying positive samples. In contrast, the YOLOv8n model has the lowest precision (0.756). The mAP@0.5 of the model (Ours) proposed in this embodiment is 0.817, which is also better than other existing models.

[0026] Table 1

[0027] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A low-light target detection method based on a multi-dimensional attention mechanism, characterized in that: The specific steps include: (1) Collect low-light image datasets and convert the format of the low-light image datasets into YOLO format; (2) Construct a low-light target detection model. The low-light target detection model uses the RT-DETR model as the benchmark network, including a backbone network, a neck structure, and a head structure. The backbone network extracts features from the input feature map based on the FEM-MDT module. The MDAM module is added to the neck structure to fuse feature maps of different scales output by the backbone network. The head structure is a decoder that decodes the feature map output by the neck structure, decodes the target information, and outputs the final detection result. The FEM-MDT module is a feature extraction module based on a multi-scale dilated transformer, with dilated convolutions of different expansion rates as the core, and extracts features by applying a sliding window on the image through dilated convolutions of different expansion rates; The MDAM module is a multi-dimensional attention module that uses a three-branch structure to capture the cross-dimensional interaction of input data to calculate the attention weight; (3) Iteratively train the constructed low-illumination target detection model to obtain a trained low-illumination target detection model, and use the trained low-illumination target detection model to detect the target to be detected in the low-illumination image to obtain the detection result.

2. The low-light target detection method based on a multi-dimensional attention mechanism according to claim 1, characterized in that: The processing process of the FEM-MDT module specifically includes the following steps: S11. First, divide the input feature map into small non-overlapping areas, and then obtain the query ,key ,value Tensor, and then query ,key ,value The tensors are fed into the sliding window dilation attention with different dilation rates, specifically: query The tensor is fed into a dilation rate of 1 Dilated convolution, key The tensor is fed into a dilation rate of 2 Dilated convolution, value The tensor is fed into a dilation rate of 3 Hollow convolution to obtain feature maps with different receptive fields The processing process is shown in the following formula (1), and the calculation formula of the convolution kernel size of the receptive field is shown in the following formula (2); (1); (2); In formula (1) and formula (2), Expanding attention for sliding windows, , and represent the query matrix, key matrix and value matrix respectively, is the expansion rate, represents the convolution kernel size of the receptive field, Represents the original convolution kernel size, and is calculated by formula (2) to obtain the query The receptive field after the dilated convolution is ,key The receptive field after the dilated convolution is ,value The receptive field after the dilated convolution is ; Then the three feature maps obtained They are input into the channel attention for processing respectively, and the attention map and feature map obtained after processing Perform element-by-element multiplication to obtain the feature map , see the following formula (3) for details, and then the feature map Input into the spatial attention for processing, and then get the attention map and feature map Perform element-by-element multiplication to obtain the feature map , see the following formula (4) for details: (3); (4); In formula (3) and formula (4), is the channel attention, For spatial attention, It is an element-by-element multiplication operation; Then the three feature maps of different scales are concatenated and linearly layered to obtain the feature map , and then Perform global average pooling, Convolution, ReLU activation function, After convolution and Sigmoid function activation operations, The multiplication is performed element by element, and the multiplication output is then added element by element to the feature map initially input after passing through the GELU function and batch normalization for output.

3. The low-light target detection method based on a multi-dimensional attention mechanism according to claim 1, characterized in that: The backbone network includes an HGStem module, six FEM-MDT modules and three DWConv modules. The processing process of the backbone network is shown in the following formula (5): (5); In formula (5), As the input of the backbone network, that is, the collected low-light image, , , , Four feature maps of different scales extracted by the backbone network.

4. The low-light target detection method based on a multi-dimensional attention mechanism according to claim 3, characterized in that: The neck structure includes nine Conv 1×1 modules, four Conv 3×3 modules, two MDAM modules, one AIFI module, two ConvTranspose modules, four RepC3 modules and four Concat modules. The processing process of the neck structure is shown in the following formula (6): (6); In formula (6), , , , , , and is the intermediate feature map of the neck structure, , and Three feature maps output for the neck structure; The three characteristic graphs output by the neck structure , and Input into the decoder of the header structure, decode the target information and output the final detection result.

5. The low-light target detection method based on a multi-dimensional attention mechanism according to claim 4, characterized in that: The processing process of the MDAM module specifically includes the following steps: S21. Tensor Input into the MDAM module, in the first branch, call the Permute function so that the tensor Convert to dimension Tensor , tensor Pass by Pooling, After convolution, batch normalization and Sigmoid activation function operations, attention weights are generated. Attention weights and tensors Perform element-by-element multiplication to obtain a tensor , and then call the Permute function again to make the tensor Convert to dimension Tensor ; In the second branch, the Permute function is called to make the tensor Convert to dimension Tensor , tensor Pass by Pooling, After convolution, batch normalization and Sigmoid activation function operations, attention weights are generated. Attention weights and tensors Perform element-by-element multiplication to obtain a tensor , and then call the Permute function again to make the tensor Convert to dimension Tensor ; In the third branch, the tensor After channel pooling, After convolution, batch normalization and Sigmoid activation function operations, attention weights are generated. Attention weights and tensors Perform element-by-element multiplication to obtain a tensor ; Then the tensor , and Add element by element, and we get ; S22, will Divided into four feature maps of different scales, specifically Right now use Convolution is performed to downsample and obtain the feature map , and then the feature map use Convolution is performed to downsample and obtain the feature map , again for the feature map use Convolution is performed to downsample and obtain the feature map , then four feature maps of different scales , , and After being processed by the channel attention module, the output attention weight coefficients are then compared with the feature maps of the corresponding scales. , , or Perform element-by-element multiplication and then pass Convolution obtains four feature maps of different scales , , and ,right Perform upsampling to obtain , Directly ,right and The downsampling operation is performed to obtain and , then , , and After performing smooth convolution operations respectively, the four outputs of the smooth convolution operation are multiplied element by element to obtain the final output feature map.

6. The low-light target detection method based on a multi-dimensional attention mechanism according to claim 5, characterized in that: The The pooling process is shown in the following formula (7): (7); In formula (7), represent Pooled input, represent The output result after pooling dimension reduction, represents maximum pooling, represents average pooling, and Subscript in Represents the 0th dimension for the maximum pooling and average pooling operations, i.e., the batch size.

7. The low-light target detection method based on a multi-dimensional attention mechanism according to claim 5, characterized in that: The processing process of the channel attention module is specifically as follows: the input feature map is processed by global average pooling and global maximum pooling respectively, and then the feature map processed by global average pooling and the feature map processed by global maximum pooling are added element by element, and then activated by Sigmoid activation function to obtain the attention weight coefficient.

Citation Information

Patent Citations

  • Pollen image classification method based on convolutional neural network and multi-scale cavity attention fusion

    CN117496260A

  • PCB defect detection method for improving YOLOv5s

    CN118334398A

  • ConvNeXt transfer learning gear fault diagnosis method based on multi-scale cavity attention mechanism

    CN118410411A

  • Lightweight printed circuit board detection method

    CN118887161A

  • Light-weight crayfish quality rapid detection method based on pattern recognition

    CN119152256A

Cited By

  • Target detection method, target detection network training method and related device

    CN121236357A