Situation map identifier identification method based on frequency domain channel attention
Through the combination of attention modeling and marginal perception mechanism in the frequency domain, the problem of low and accurate identification effects is achieved to solve the problem of low -end identification efficiency caused by transmission bandwidth in the rescue scene.
Patent Information
- Application Number
- CN202411407396.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-28
AI Technical Summary
In rescue scenarios, due to the limited transmission bandwidth, image transmission and processing efficiency are inefficient, which affects the accuracy and real-timeness of situational icon identification. The prior art performs attention modeling in the time domain space, does not fully utilize image frequency domain information, and has high computing costs.
Adopt a two -dimensional DCT transformation to convert the input emergency command trend chart data to the frequency domain, focus on modeling in the frequency domain, and establish a edge -based perception mechanism based on medium and high -frequency information. efficiency.
While ensuring the accuracy of identification, reduce network parameters, improve the efficiency of identification of situation icon identification, reduce computing complexity, and improve operational efficiency in the environmental restricted bandwidth environment.
Smart Images

Figure CN119380323A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target recognition, and in particular relates to a situation graph identification method based on frequency domain channel attention. Background Art
[0002] In emergency rescue scenarios, image-based situation map identification is an important technology that can help commanders quickly obtain on-site information and improve rescue efficiency. However, due to the limited transmission bandwidth at the rescue site, the image transmission and processing efficiency is low, which affects the accuracy and real-time performance of situation map identification. To address this problem, some situation map identification methods based on attention mechanisms have been proposed. Such methods usually introduce attention modules in certain layers of convolutional neural networks to enhance the expression ability of key features and improve recognition accuracy by learning channel or spatial attention weights. For example, some methods use SENet attention modules to learn channel attention weights through global pooling and fully connected layers to enhance the feature response of important channels; some methods use self-attention mechanisms to learn the dependencies between feature maps and improve spatial attention. These attention-based methods have improved the recognition performance of situation map identification to a certain extent. In order to reduce model parameters and improve the efficiency of situation map identification, some methods based on network compression have also been proposed in the prior art. For example, pruning, quantization, knowledge distillation and other technologies are used to compress the pre-trained model.
[0003] However, the above attention methods all perform attention modeling in the time domain space, do not make full use of the image frequency domain information, and the computational cost of processing feature maps in the spatial domain is high. In addition, the network compression methods used in the prior art also have shortcomings. Although these methods can reduce the model size, they usually lead to a decrease in recognition accuracy. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a situation map identification method based on frequency domain channel attention to solve the problem of untimely transmission of command information caused by small transmission bandwidth in rescue scenarios in the prior art. The present invention improves the accuracy of situation map identification while reducing network parameters and improving the efficiency of situation map identification.
[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A situation map identification method based on frequency domain channel attention of the present invention comprises the following steps:
[0007] 1) Use two-dimensional DCT transform to convert the input emergency command situation map data into the frequency domain, perform attention modeling in the frequency domain, and represent the input situation map using a combination of information of different frequency components;
[0008] 2) Extract the edge information of the command mark in the situation map in the frequency domain, and establish an edge perception attention mechanism based on the frequency domain by retaining the medium and high frequency information of the frequency domain feature map of the situation map;
[0009] 3) Model the mid- and high-frequency edge-aware attention of the frequency-domain feature map of the input situation map, retain the feature map with large edge information measurement value, and delete the feature map with small edge information measurement value, so that more semantic information and frequency-domain energy concentration are retained in the edge-aware attention network;
[0010] 4) Create an emergency command situation map dataset suitable for emergency scenarios and annotate it using the labelimg annotation tool;
[0011] 5) Preprocess the labeled situation map data and classify them into training sets and test sets;
[0012] 6) The attention module is added to the target recognition model and trained using the emergency command situation map dataset. The parameters are optimized according to the training situation, and the optimal parameters are used for final target recognition.
[0013] Furthermore, in step 1), two-dimensional DCT transform is used to perform attention modeling in the frequency domain, and the input situation map features are It is represented by a combination of information of different frequency components, as follows:
[0014]
[0015] sti∈{0,1,…,H-1},j∈{0,1,…,W-1}
[0016] Where H is the height of the input situation map, W is the width of the input situation map, h and w represent the height and width of the input component respectively, cos(πh / H(i+1 / 2)), cos(πw / W(j+1 / 2)) are the corresponding DCT weights, is the spectrum of DCT, P is the transformation coefficient matrix, is the frequency component.
[0017] Furthermore, in step 2), the edge information of the command mark in the situation map is extracted in the frequency domain, and the middle and high frequency information Top-k of the frequency domain feature map is retained. The expression is as follows:
[0018]
[0019] sti∈{0,1,…,c-1}
[0020] Among them, X is the feature map tensor obtained after convolution of the input emergency command situation map dataset, Where C is the number of channels, X i is the feature map of X divided along the channel dimension c, [u,v] is the corresponding X i The frequency component two-dimensional index selects the Top-k mid- and high-frequency components X i The result obtained by performing two-dimensional DCT transformation is Freq i Edge information extraction is performed as a result of mid- and high-frequency preprocessing of channel edge information.
[0021] Furthermore, the step 3) specifically includes:
[0022] Measuring information Defined as:
[0023]
[0024] Where rank(·) is the rank of the feature map of the input situation map image, is the feature mapping information, Perform singular value decomposition (SVD) as follows:
[0025]
[0026] in, σ i ,u i and v i are the i-th largest singular value, the left singular value vector and the right singular value vector respectively; the feature map of rank r is decomposed into the feature map of rank r ′ The low-rank feature map of and additional information High-rank feature maps contain more feature information of target command identification in the situation map than low-rank feature maps; using rank as the measure of information measurement value, the mid-high frequency edge perception attention model of the frequency domain feature map of the input situation map is constructed, and feature maps with large edge information measurement values are retained, and feature maps with small edge information measurement values are deleted:
[0027]
[0028] att=sigmoid(fc(compress(Freq)))
[0029] Among them, Freq is the obtained medium and high frequency information, and att is the final result obtained by processing; when the minimum feature of the channel is smaller than the average feature, the channel attention is compressed; otherwise, the current situation map data training does not perform compression.
[0030] Furthermore, the step of preparing an emergency command situation map data set suitable for emergency scenarios in step 4) specifically includes:
[0031] Collect data sources and command signs. The data source uses Amap satellite images as the base, and the command signs use emergency symbols for sudden incidents, and combine them to create a situation map.
[0032] Furthermore, the specific steps of step 5) include:
[0033] 51) Set the data set to X, preprocess the data and uniformly crop the size to get the processed X_resized as follows:
[0034] X_resized={x_i|x_i∈X,size(x_i)=s×s}
[0035] Among them, s is a uniform image size, and x_i is a single image;
[0036] 52) Divide the processed X_resized into training set X_train and test set X_test:
[0037] Randomly shuffle X_resized to get the data set X_shuffled;
[0038] Let X_train={x_i|x_i∈X_shuffled,i≤0.8×|X_shuffled|};
[0039] Let X_test={x_i|x_i∈X_shuffled,i>0.8×|X_shuffled|};
[0040] Among them, |X_shuffled| represents the number of elements in X_shuffled, and 0.8 is the proportion of the training set.
[0041] Furthermore, the step of adding the attention module in step 6) is specifically as follows:
[0042] 61) After inserting the attention module into the C3 convolution layer of the YOLOv5 model backbone network, the original backbone network structure is changed from [C3, SPPF] to [C3, att, SPPF]; the C3 module performs feature extraction and fusion in YOLOv5; through a series of convolution operations and residual connections, feature information at different levels is captured and integrated; the attention module is sandwiched behind C3 to utilize the feature extraction and fusion of the C3 module to enhance the feature extraction of the YOLOv5 model and improve the recognition accuracy;
[0043] 62) Adjust the input and output sizes of the attention module to be consistent with the original layer;
[0044] 63) Adjust the hyperparameters of the target recognition model and use the stochastic gradient descent optimizer with the hyperparameters set to momentum 0.9, weight decay 1e-4, and learning rate 0.2. Specifically, when the momentum is 0.9, the direction of the current parameter update is 90% of the current gradient direction plus 10% of the direction of the previous parameter update, so that the model accelerates in areas where the gradient direction changes smoothly and can jump out when encountering local minima or saddle points. Weight decay is used to prevent the model from overfitting. By adjusting the parameter value to a certain extent toward zero each time the parameter is updated, a weight decay value of 1e-4 means that each time the parameter is updated, the parameter value will approach zero at a ratio of 0.0001, limiting the size of the parameters in the model and making the model less prone to overfitting.
[0045] Beneficial effects of the present invention:
[0046] The present invention can compress network parameters and improve operation efficiency while ensuring high recognition accuracy;
[0047] First, the two-dimensional DCT transform can efficiently convert spatial domain information into the frequency domain, greatly reducing the computational complexity.
[0048] Secondly, frequency domain features can better characterize the correlation between different channels, thereby improving the recognition accuracy of situation map labels.
[0049] Finally, the frequency domain compression method can further reduce network parameters, reduce model complexity, and improve operating efficiency in a bandwidth-constrained environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Schematic diagram of the method of the present invention. DETAILED DESCRIPTION
[0051] In order to facilitate the understanding of those skilled in the art, the present invention is further described below in conjunction with embodiments and drawings. The contents mentioned in the implementation modes are not intended to limit the present invention.
[0052] Reference Figure 1 As shown, a situation diagram identification method based on frequency domain channel attention of the present invention comprises the following steps:
[0053] 1) Use two-dimensional DCT transform to convert the input emergency command situation map data into the frequency domain, perform attention modeling in the frequency domain, and represent the input situation map using a combination of information of different frequency components;
[0054] Specifically, in step 1), two-dimensional DCT transform is used to perform attention modeling in the frequency domain, and the input situation map features are It is represented by a combination of information of different frequency components, as follows:
[0055]
[0056]
[0057] sti∈{0,1,…,H-1},j∈{0,1,…,W-1}
[0058] Where H is the height of the input situation map, W is the width of the input situation map, h and w represent the height and width of the input component respectively, cos(πh / H(i+1 / 2)), cos(πw / W(j+1 / 2)) are the corresponding DCT weights, is the spectrum of DCT, P is the transformation coefficient matrix, is the frequency component.
[0059] 2) Extract the edge information of the command mark in the situation map in the frequency domain, and establish an edge perception attention mechanism based on the frequency domain by retaining the medium and high frequency information of the frequency domain feature map of the situation map;
[0060] Specifically, in step 2), the edge information of the command mark in the situation map is extracted in the frequency domain, and the middle and high frequency information Top-k of the frequency domain feature map is retained. The expression is as follows:
[0061]
[0062] sti∈{0,1,…,c-1}
[0063] Among them, X is the feature map tensor obtained after convolution of the input emergency command situation map dataset, Where C is the number of channels, X i is the feature map of X divided along the channel dimension c, [u,v] is the corresponding X i The frequency component two-dimensional index selects the Top-k mid- and high-frequency components X i The result obtained by performing two-dimensional DCT transformation is Freqi Edge information extraction is performed as a result of mid- and high-frequency preprocessing of channel edge information.
[0064] 3) Model the mid- and high-frequency edge-aware attention of the frequency-domain feature map of the input situation map, retain the feature map with large edge information measurement value, and delete the feature map with small edge information measurement value, so that more semantic information and frequency-domain energy concentration are retained in the edge-aware attention network; specifically, including:
[0065] Measuring information Defined as:
[0066]
[0067] Where rank(·) is the rank of the feature map of the input situation map image, is the feature mapping information, Perform singular value decomposition (SVD) as follows:
[0068]
[0069] in, σ i ,u i and v i are the i-th largest singular value, the left singular value vector and the right singular value vector respectively; the feature map of rank r is decomposed into the feature map of rank r ′ The low-rank feature map of and additional information High-rank feature maps contain more feature information of target command identification in the situation map than low-rank feature maps; using rank as the measure of information measurement value, the mid-high frequency edge perception attention model of the frequency domain feature map of the input situation map is constructed, and feature maps with large edge information measurement values are retained, and feature maps with small edge information measurement values are deleted:
[0070]
[0071] att=sigmoid(fc(compress(Freq)))
[0072] Among them, Freq is the obtained medium and high frequency information, and att is the final result obtained by processing; when the minimum feature of the channel is less than the average feature (less than 10% of the average feature), the channel attention is compressed; otherwise, the current situation map data training does not perform compression.
[0073] 4) Create an emergency command situation map dataset suitable for emergency scenarios and annotate it using the labelimg annotation tool;
[0074] Collect data sources and command signs. The data source uses Amap satellite images as the base, and the command signs use emergency symbols for sudden incidents, and combine them to create a situation map.
[0075] 5) Preprocess the labeled situation map data and classify them into training sets and test sets; specifically including:
[0076] 51) Set the data set to X, preprocess the data and uniformly crop the size to get the processed X_resized as follows:
[0077] X_resized={x_i|x_i∈X,size(x_i)=s×s}
[0078] Among them, s is a uniform image size, and x_i is a single image;
[0079] 52) Divide the processed X_resized into training set X_train and test set X_test:
[0080] Randomly shuffle X_resized to get the data set X_shuffled;
[0081] Let X_train={x_i|x_i∈X_shuffled,i≤0.8×|X_shuffled|};
[0082] Let X_test={x_i|x_i∈X_shuffled,i>0.8×|X_shuffled|};
[0083] Among them, |X_shuffled| represents the number of elements in X_shuffled, and 0.8 is the proportion of the training set.
[0084] 6) Add the attention module to the target recognition model and use the emergency command situation map dataset for training. Optimize the parameters according to the training results and use the optimal parameters for the final target recognition.
[0085] Specifically, the step of adding the attention module in step 6) is as follows:
[0086] 61) After inserting the attention module into the C3 convolution layer of the YOLOv5 model backbone network, the original backbone network structure is changed from [C3, SPPF] to [C3, att, SPPF]; the C3 module performs feature extraction and fusion in YOLOv5; through a series of convolution operations and residual connections, feature information at different levels is captured and integrated; the attention module is sandwiched behind C3 to utilize the feature extraction and fusion of the C3 module to enhance the feature extraction of the YOLOv5 model and improve the recognition accuracy;
[0087] 62) Adjust the input and output sizes of the attention module to be consistent with the original layer;
[0088] 63) Adjust the hyperparameters of the target recognition model and use the stochastic gradient descent optimizer with the hyperparameters set to momentum 0.9, weight decay 1e-4, and learning rate 0.2. Specifically, when the momentum is 0.9, the direction of the current parameter update is 90% of the current gradient direction plus 10% of the direction of the previous parameter update, so that the model accelerates in areas where the gradient direction changes smoothly and can jump out when encountering local minima or saddle points. Weight decay is used to prevent the model from overfitting. By adjusting the parameter value to a certain extent toward zero each time the parameter is updated, a weight decay value of 1e-4 means that each time the parameter is updated, the parameter value will approach zero at a ratio of 0.0001, limiting the size of the parameters in the model and making the model less prone to overfitting.
[0089] The present invention has many specific application paths. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principle of the present invention. These improvements should also be regarded as the protection scope of the present invention.
Claims
1. A situation map identification method based on frequency domain channel attention, characterized in that: Here are the steps: 1) Use two-dimensional DCT transform to convert the input emergency command situation map data into the frequency domain, perform attention modeling in the frequency domain, and represent the input situation map using a combination of information of different frequency components; 2) Extract the edge information of the command mark in the situation map in the frequency domain, and establish an edge perception attention mechanism based on the frequency domain by retaining the medium and high frequency information of the frequency domain feature map of the situation map; 3) Model the mid- and high-frequency edge-aware attention of the frequency-domain feature map of the input situation map, retain the feature map with large edge information measurement value, and delete the feature map with small edge information measurement value, so that more semantic information and frequency-domain energy concentration are retained in the edge-aware attention network; 4) Create an emergency command situation map dataset suitable for emergency scenarios and annotate it using the labelimg annotation tool; 5) Preprocess the labeled situation map data and classify them into training sets and test sets; 6) Add the attention module to the target recognition model and use the emergency command situation map dataset for training. Optimize the parameters according to the training situation and use the optimal parameters for the final target recognition.
2. The situation map identification method based on frequency domain channel attention according to claim 1 is characterized in that: In step 1), two-dimensional DCT transform is used to perform attention modeling in the frequency domain, and the input situation map features are transformed into It is represented by a combination of information of different frequency components, as follows: sti∈{0,1,…,H-1},j∈{0,1,…,W-1} Where H is the height of the input situation map, W is the width of the input situation map, h and w represent the height and width of the input component respectively, cos(πh / H(i+1 / 2)), cos(πw / W(j+1 / 2)) are the corresponding DCT weights, is the spectrum of DCT, P is the transformation coefficient matrix, is the frequency component.
3. The situation diagram identification method based on frequency domain channel attention according to claim 1 is characterized in that: In the step 2), edge information of the command mark in the situation map is extracted in the frequency domain, and the middle and high frequency information Top-k of the frequency domain feature map is retained. The expression is as follows: Among them, X is the feature map tensor obtained after convolution of the input emergency command situation map dataset, C is the number of channels, X i is the feature map of X divided along the channel dimension c, [u,v] is the corresponding X i The frequency component two-dimensional index selects the Top-k mid- and high-frequency components X i The result obtained by performing two-dimensional DCT transformation is Freq i Edge information extraction is performed as a result of mid- and high-frequency preprocessing of channel edge information.
4. The situation map identification method based on frequency domain channel attention according to claim 1 is characterized in that: The step 3) specifically includes: Measuring information Defined as: Where rank(·) is the rank of the feature map of the input situation map image, is the feature mapping information, Perform singular value decomposition (SVD) as follows: in, σ i ,u i and v i are the i-th largest singular value, the left singular value vector and the right singular value vector respectively; the feature map with rank r is decomposed into a low-rank feature map with rank r′, expressed as and additional information High-rank feature maps contain more feature information of target command identification in the situation map than low-rank feature maps; using rank as the measure of information measurement value, the mid-high frequency edge perception attention model of the frequency domain feature map of the input situation map is constructed, and feature maps with large edge information measurement values are retained, and feature maps with small edge information measurement values are deleted: att=sigmoid(fc(compress(Freq))) Among them, Freq is the obtained medium and high frequency information, and att is the final result obtained by processing; when the minimum feature of the channel is smaller than the average feature, the channel attention is compressed; otherwise, the current situation map data training does not perform compression.
5. The situation map identification method based on frequency domain channel attention according to claim 1 is characterized in that: The step of preparing an emergency command situation map data set suitable for emergency scenarios in step 4) specifically includes: Collect data sources and command signs. The data source uses Amap satellite images as the base, and the command signs use emergency symbols for sudden incidents, and combine them to create a situation map.
6. The situation map identification method based on frequency domain channel attention according to claim 1 is characterized in that: The specific steps of step 5) include: 51) Set the data set to X, preprocess the data and uniformly crop the size to get the processed X_resized as follows: X_resized={x_i|x_i∈X,size(x_i)=s×s} Among them, s is a uniform image size, and x_i is a single image; 52) Divide the processed X_resized into training set X_train and test set X_test: Randomly shuffle X_resized to get the data set X_shuffled; Let X_train={x_i|x_i∈X_shuffled,i≤0.8×|X_shuffled|}; Let X_test={x_i|x_i∈X_shuffled,i>0.8×|X_shuffled|}; Among them, |X_shuffled| represents the number of elements in X_shuffled, and 0.8 is the proportion of the training set.
7. The situation map identification method based on frequency domain channel attention according to claim 1 is characterized in that: The steps of adding the attention module in step 6) are specifically as follows: 61) After inserting the attention module into the C3 convolution layer of the YOLOv5 model backbone network, the original backbone network structure is changed from [C3, SPPF] to [C3, att, SPPF]; the C3 module performs feature extraction and fusion in YOLOv5; through a series of convolution operations and residual connections, feature information at different levels is captured and integrated; the attention module is sandwiched behind C3 to utilize the feature extraction and fusion of the C3 module to enhance the feature extraction of the YOLOv5 model and improve the recognition accuracy; 62) Adjust the input and output sizes of the attention module to be consistent with the original layer; 63) Adjust the hyperparameters of the target recognition model, use the stochastic gradient descent optimizer, set the hyperparameters to momentum 0.9, weight decay 1e-4, and learning rate 0.2; specifically: when the momentum is 0.9, the direction of the current parameter update is 90% of the current gradient direction plus 10% of the direction of the previous parameter update, so that the model accelerates in areas where the gradient direction changes smoothly, and can jump out when encountering local minima or saddle points; weight decay is used to prevent the model from overfitting; by adjusting the parameter value to a certain extent towards zero each time the parameter is updated, a weight decay value of 1e-4 means that each time the parameter is updated, the parameter value will approach zero at a ratio of 0.0001, limiting the size of the parameters in the model, making the model less prone to overfitting.
Citation Information
Cited By
Semi-supervised medical image segmentation method and device of collaborative training network based on integrated attention correction, and medium
CN121259317A