Lightweight road detection model design method for reducing space and channel redundancy
By designing a lightweight road detection model and replacing standard convolution with convolutional neural networks and reconstruction units, the problem of low inference efficiency in the detection model relying on NMS post-processing in the prior art is solved, and efficient detection performance and inference efficiency are achieved.
Patent Information
- Application Number
- CN202510046690.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, detection models rely on NMS post-processing, resulting in low inference efficiency.
Design a lightweight road detection model that reduces spatial and channel redundancy. Through the convolutional neural network as the backbone network, design training strategies to reconstruct the detection head, and use the method of separation reconstruction and fission transformation to build the spatial and channel reconstruction units, replace standard convolutions, and reduce dependence on NMS.
The detection model without NMS post-processing is implemented, which improves inference efficiency, reduces inference overhead, and maintains detection performance, allowing end-to-end deployment.
Smart Images

Figure CN119851089A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of deep learning target detection, and specifically relates to a lightweight road detection model design method that reduces space and channel redundancy. Background Art
[0002] Roads are an important part of the transportation system and an important infrastructure for national economic development, while also bringing important social benefits.
[0003] In recent years, China's road construction has achieved rapid development, and the scale of vehicle mileage has continued to increase. As a result, the rate of pavement damage is accelerating, and the detection of pavement damage has become more and more complicated. Road damage not only affects driving comfort, but also threatens driving safety. One of the most serious problems in emerging countries is how to achieve effective road protection, and institutions still have no effective measures to deal with this problem. Therefore, early detection and repair of pavement damage has significant social and economic benefits. In the past few decades, research on pavement damage detection systems and pavement damage identification algorithms has made great progress. So far, road damage repair has gone through three stages. From the early traditional manual detection, to the later semi-automatic detection, and then to the current automatic detection.
[0004] At present, deep learning has made great progress in target detection. Deep learning models can be trained end-to-end, that is, from raw input to the output of the final target without manually designing and selecting features. This simplifies the development process of target detection systems and provides greater flexibility and adaptability. Deep learning models can effectively handle multi-scale targets. By using structures such as convolutional neural networks, deep learning models can extract features from images of different scales and make adaptive predictions based on the size and location of the target. These advantages make deep learning one of the most advanced and widely used technologies in the field of target detection today.
[0005] However, most of the current detection models need to rely on NMS post-processing. NMS is a technology used to remove bounding boxes with a lot of overlap in object detection results to retain the bounding boxes that are most likely to represent the real target. NMS needs to sort, calculate intersection-over-union, and perform threshold screening on each detection result. These calculations will increase the inference time. Secondly, NMS needs to perform additional complex post-processing steps on the detection results, including non-maximum suppression and threshold filtering, making the entire inference process more cumbersome. Therefore, there is a problem in the prior art that the inference efficiency is low because most of the current detection models rely on NMS post-processing. Summary of the invention
[0006] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a lightweight road detection model design method that reduces space and channel redundancy, thereby solving the problem of low reasoning efficiency in the prior art due to the fact that most current detection models rely on NMS post-processing.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] A lightweight road detection model design method for reducing space and channel redundancy includes the following steps:
[0009] The convolutional neural network is used as the backbone network of the detection model. The convolutional neural network is used to extract feature maps from the input image.
[0010] Design training strategies and reconstruct detection heads;
[0011] Optimizing convolutional neural networks. Methods for optimizing convolutional neural networks include:
[0012] 1) Constructing a spatial reconstruction unit through separation and reconstruction method;
[0013] 2) Construct a channel reconstruction unit through the split transformation strategy;
[0014] The spatial reconstruction and channel reconstruction units are sorted and integrated into convolution blocks, and the standard convolution in the convolutional neural network is replaced by convolution blocks;
[0015] Train and infer the detection model to complete the design of the detection model.
[0016] The convolutional neural network adopts the CSPNet network architecture, and the PAN network architecture is used as the neck network of the detection model. At the same time, large convolution kernels and partitioned self-attention mechanism are also used for learning in the detection model.
[0017] Design a training strategy and reconstruct the detection head, which includes the following steps:
[0018] The model is trained and inferred through a dual label assignment strategy. The dual label assignment strategy specifically includes the following: a one-to-many detection head is used in the training phase, and a one-to-one detection head is switched in the inference phase through gradient truncation;
[0019] A unified matching metric is used to match the prediction perceptions of the two branches of one-to-many and one-to-one. The unified matching metric is as follows:
[0020]
[0021] In the formula, a represents the spatial prior, c represents the classification score of the feature map, and b represent the predicted and actual bounding boxes respectively, and α and β are two hyperparameters that can be learned;
[0022] Analyze the supervision gap between the two branches of one-to-many and one-to-one;
[0023] Reconstructing the detection head according to the supervision gap.
[0024] Analyze the supervision gap between the two branches of one-to-many and one-to-one. The specific steps are as follows:
[0025] During the detection model training process, if the two branches are initialized with the same parameters, the one-to-one detection head and the one-to-many detection head may generate the same classification probability p and overlap IoU;
[0026] The one-to-many and one-to-one matching scores with maximum overlap IoU are expressed as and
[0027] Assume that the one-to-many branch generates positive samples Ω, and the one-to-one branch selection The i-th predicted value of * Represents the maximum overlap IoU, then for j∈Ω and t o2o,i =u * , it can be deduced that the classification targets of one-to-many branch and one-to-one branch are:
[0028]
[0029] According to the classification objectives of the two-to-many branch and the one-to-one branch, the supervision gap between the two branches is obtained as:
[0030] A=t o2o,i -Π(i∈Ω)t o2m,i +∑ k∈Ω\{i} t o2m,k (2)
[0031] By using the separation and reconstruction method, a spatial reconstruction unit is constructed, which specifically includes the following steps:
[0032] Separate the feature map with more information from the feature map with less information to obtain the feature map with more information and less informative feature maps
[0033] Multi-information feature map Cut from the middle and divide into and Less informative feature graph Cut from the middle and divide into and
[0034] The feature map with less information is combined with the feature map with more information through cross reconstruction operation to obtain feature Xw1 and X w2 ;
[0035] The feature X w1 and X w2 Splice to get the spatial fine feature map X w , the operation steps are as follows:
[0036]
[0037] Separate the feature map with more information from the feature map with less information to obtain the feature map with more information and less informative feature maps The specific steps include:
[0038] Each feature map is standardized. For any given feature map X, the standardization method is as follows:
[0039]
[0040] Among them, μ is the mean, σ is the standard deviation, ε is the introduced stability constant, α and β are trainable affine transformation parameters;
[0041] Calculate the normalized weights:
[0042]
[0043] Weighting each feature map after standard processing by normalization weight;
[0044] The standardized and normalized weighted feature map is mapped to the range of (0, 1) through the sigmoid function, and controlled by the preset threshold to obtain the information weight W1 and the non-information weight W2. This step is expressed by the following formula:
[0045] W=G(Sigmoid(W α (X o ))) (6)
[0046] The input feature map is multiplied by W1 and W2 respectively to obtain a multi-information feature map and less informative feature maps
[0047] Through the split transformation strategy, a channel reconstruction unit is constructed, which specifically includes the following steps:
[0048] Let S∈R c×k×k represents a k×k convolution kernel, X represents the input feature map;
[0049] Map the spatial fine feature X wThe channel is divided into two parts: γC and (1-γ)C, where γ is the segmentation ratio (0≤γ≤1);
[0050] Use 1×1 convolution compression to compress the two channels separately, and introduce parameter r to adjust and control the number of channels in the feature map;
[0051] After segmentation and compression, the spatial fine feature map X w Divided into upper feature X s and the following feature X x ;
[0052] Use convolution operations G and D instead of standard convolution to perform the above feature X s Convolve and summarize separately to get the upper feature X s The transformed Y1 is:
[0053]
[0054] Among them, S G and is the weight matrix that can be learned, Y1∈R c×h×w ;
[0055] Use convolution operation D to perform the following feature X x Perform convolution and combine the result of the convolution operation with the following feature X x Splicing, get the following feature X x Transformed Y2:
[0056]
[0057] is the learnable weight matrix, ∪ is the concatenation operation, Y2∈R c×h×w ;
[0058] Through the channel statistics method T s Collect global space information:
[0059]
[0060] According to formula (9), global average pooling is performed, the obtained results t1 and t2 are superimposed, and the channel soft attention mechanism is used to generate feature important vectors β1 and β2:
[0061]
[0062] Weighted merging of Y1 and Y2 is performed by the feature importance vectors β1 and β2:
[0063] Y=β1Y1+β2Y2 (11)
[0064] Among them, Y represents the final output result of the detection model.
[0065] Beneficial effects of the present invention:
[0066] The lightweight road detection model design method for reducing space and channel redundancy proposed in the present invention can improve the inference efficiency of the detection model by redesigning the model detection head so that NMS post-processing is not required, and the inference overhead is reduced while maintaining performance. One-to-many allocation is used during training to generate rich monitoring signals, which helps to optimize and achieve excellent performance, while one-to-one allocation can assign a prediction to each ground truth, avoiding NMS post-processing, so that the model can be deployed end-to-end without incurring any additional inference cost;
[0067] The lightweight convolution calculation is redesigned through unit reconstruction and channel reconstruction, and the separation reconstruction and split transformation fusion methods are used to extract semantically rich feature information and reduce the cost of redundant feature processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0069] Figure 1 It is a design flow chart of the present invention;
[0070] Figure 2 It is a schematic diagram of the convolution block structure of the present invention;
[0071] Figure 3 It is the internal structure diagram of the space reconstruction unit of the present invention;
[0072] Figure 4 is an internal structural diagram of a channel reconstruction unit of the present invention;
[0073] Figure 5 It is a schematic diagram of comparative simulation ablation experimental results of the present invention. DETAILED DESCRIPTION
[0074] 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.
[0075] like Figures 1 to 5 As shown, a lightweight road detection model design method for reducing space and channel redundancy includes the following steps:
[0076] The convolutional neural network is used as the backbone network of the detection model. The convolutional neural network is used to extract feature maps from the input image.
[0077] Design training strategies and reconstruct detection heads;
[0078] Optimizing convolutional neural networks. Methods for optimizing convolutional neural networks include:
[0079] 1) Constructing a spatial reconstruction unit through separation and reconstruction method;
[0080] 2) Construct a channel reconstruction unit through the split transformation strategy;
[0081] The spatial reconstruction and channel reconstruction units are sorted and integrated into convolution blocks, and the standard convolution in the convolutional neural network is replaced by convolution blocks;
[0082] Train and infer the detection model to complete the design of the detection model;
[0083] By redesigning the detection head of the detection model, NMS post-processing is not required, reducing the inference overhead while maintaining performance, which enables the model to be deployed end-to-end without incurring any additional inference cost.
[0084] The convolutional neural network adopts the CSPNet network architecture, and the PAN network architecture is used as the neck network of the detection model. At the same time, the detection model also uses large convolution kernels and partitioned self-attention mechanisms for learning; CSPNet is a neural network architecture for image recognition tasks, which is mainly used to improve the detection model's understanding and representation of features; PAN is a network structure for instance segmentation tasks, focusing on multi-scale information fusion and context perception. Through the coordinated use of CSPNet and PAN, the feature extraction and multi-scale feature fusion of the detection model are optimized; the detection model uses large convolution kernels and partitioned self-attention mechanisms for learning, which enhances the detection model's ability to learn from a wide range of contexts, improves detection accuracy, and avoids a significant increase in technical costs.
[0085] Design a training strategy and reconstruct the detection head, which includes the following steps:
[0086] Since most models in the prior art need to rely on NMS post-processing, resulting in unsatisfactory deployment reasoning efficiency, one-to-one matching is generally used to suppress redundant predictions, but this usually introduces additional reasoning overhead or produces suboptimal performance; in this application, a dual label allocation strategy is used to train and reason the model, achieving high efficiency and competitive performance. The dual label allocation strategy specifically includes the following contents: a one-to-many detection head is used in the training phase, and a one-to-one detection head is switched to by gradient truncation in the reasoning phase;
[0087] In order to achieve one-to-many and one-to-one prediction perception matching of two branches, a unified matching metric is used to match the prediction perception of the two branches of one-to-many and one-to-one. The unified matching metric is as follows:
[0088]
[0089] In the formula, a represents the spatial prior, c represents the classification score of the feature map, and b represent the predicted and actual bounding boxes respectively, and α and β are two hyperparameters that can be learned;
[0090] The one-to-many branch provides richer monitoring signals than the one-to-one branch. Intuitively, if the supervision of the one-to-one head can be coordinated with the supervision of the one-to-many head, the one-to-one head can be optimized towards the one-to-many head;
[0091] Analyze the supervision gap between the two branches of one-to-many and one-to-one; analyzing the supervision gap between the two branches can guide the direction of model training and help optimize the one-to-one detection head to make it more inclined to the one-to-many head design. This optimization may lead to better training results and higher performance
[0092] Reconstructing the detection head according to the supervision gap.
[0093] Analyze the supervision gap between the two branches of one-to-many and one-to-one. The specific steps are as follows:
[0094] Due to the randomness in the training process, during the detection model training process, if the two branches are initialized with the same parameters, the one-to-one detection head and the one-to-many detection head may generate the same classification probability p and overlap IoU;
[0095] The one-to-many and one-to-one matching scores with maximum overlap IoU are expressed as and
[0096] Assume that the one-to-many branch generates positive samples Ω, and the one-to-one branch selection The i-th predicted value of *Represents the maximum overlap IoU, then for j∈Ω and t o2o,i =u * , it can be deduced that the classification targets of one-to-many branch and one-to-one branch are:
[0097]
[0098] According to the classification objectives of the two-to-many branch and the one-to-one branch, the supervision gap between the two branches is obtained as:
[0099] A=t o2o,i -Π(i∈Ω)t o2m,i +∑ k∈Ω\{i} t o2m,k (13)
[0100] By using the separation and reconstruction method, a spatial reconstruction unit is constructed, which specifically includes the following steps:
[0101] Separate the feature map with more information from the feature map with less information to obtain the feature map with more information and less informative feature maps
[0102] In order to reduce spatial redundancy, further reconstruction operation is performed to divide the feature map with more information and the feature map with less information into two parts, and add the features with rich information to the features with less information to generate features with richer information, thereby saving space. The specific process is as follows:
[0103] Multi-information feature map Cut from the middle and divide into and Less informative feature graph Cut from the middle and divide into and
[0104] The feature map with less information is combined with the feature map with more information through cross reconstruction operation to obtain feature X w1 and X w2 ;
[0105] The feature X w1 and X w2 Splice to get the spatial fine feature map X w , the operation steps are as follows:
[0106]
[0107] After applying separation and reconstruction to the input features X, not only the informative features are separated from the less informative features, but also they are reconstructed, which enhances the representative features and suppresses the redundant features in the spatial dimension.
[0108] Separate the feature map with more information from the feature map with less information to obtain the feature map with more information and less informative feature maps The specific steps include:
[0109] Each feature map is standardized. For any given feature map X, X∈R N ×C×H× W , N is the batch axis, C is the channel axis, H and W are the height axis and width axis of the space, and the standardization method is as follows:
[0110]
[0111] Among them, μ is the mean, σ is the standard deviation, ε is the introduced stability constant, α and β are trainable affine transformation parameters;
[0112] α can be used as a way to measure the variance of pixels in each batch and channel space;
[0113] Calculate the normalized weights:
[0114]
[0115] Weighting each feature map after standard processing by normalization weight;
[0116] The standardized and normalized weighted feature map is mapped to the range of (0, 1) through the sigmoid function, and controlled by the preset threshold. The weight above the threshold is set to 1 to obtain the information weight W1, and the weight below the threshold is set to 0 to obtain the non-information weight W2. This step is expressed by the following formula:
[0117] W=G(Sigmoid(W α (X o ))) (17)
[0118] The input features are multiplied by W1 and W2 respectively to obtain a multi-information feature map and less informative feature maps
[0119] After completing the redundant feature processing in the spatial dimension, the spatial fine feature map is still redundant in the channel dimension. The channel reconstruction unit is used to solve this problem using the split transformation strategy; if the standard k×k convolution is used to extract features, it will result in relatively redundant feature maps in the channel dimension;
[0120] Through the split transformation strategy, a channel reconstruction unit is constructed, which specifically includes the following steps:
[0121] Separation step: Let S∈R c×k×krepresents a k×k convolution kernel, X represents the input feature map;
[0122] Map the spatial fine feature X w The channel is divided into two parts: γC and (1-γ)C, where γ is the segmentation ratio (0≤γ≤1);
[0123] Use 1×1 convolution compression to compress the two channels separately, and introduce parameter r to adjust and control the number of channels in the feature map;
[0124] Transformation step: After segmentation and compression, the spatial fine feature map X w Divided into upper feature X s and the following feature X x ;
[0125] Use convolution operations G and D instead of standard convolution to perform the above feature X s Convolve and summarize separately to get the upper feature X s The transformed Y1 is:
[0126]
[0127] Among them, S G and is the weight matrix that can be learned, Y1∈R c×h×w ;
[0128] Use convolution operation D to perform the following feature X x Convolution is performed to generate a feature map with shallow hidden details to complement the upper feature extraction. x The characteristics of the convolution operation do not incur additional costs. Finally, the result generated by the convolution operation is combined with the following feature X x Splicing, get the following feature X x Transformed Y2:
[0129]
[0130] is the learnable weight matrix, ∪ is the concatenation operation, Y2∈R c×h×w ;
[0131] Fusion step: First, perform global average pooling, and use the channel statistics method T s Collect global space information:
[0132]
[0133] According to formula (9), global average pooling is performed, the obtained results t1 and t2 are superimposed, and the channel soft attention mechanism is used to generate feature important vectors β1 and β2:
[0134]
[0135] Weighted merging of Y1 and Y2 is performed by the feature importance vectors β1 and β2:
[0136] Y=β1Y1+β2Y2 (22)
[0137] Among them, Y represents the final output result of the detection model.
[0138] The channel reconstruction unit extracts rich representative features through lightweight convolution operations, while processing redundant features through low-cost operations and feature reuse schemes.
[0139] The channel reconstruction unit can be used alone or together with the space reconstruction unit. By arranging the channel reconstruction unit and the space reconstruction unit in sequence, a new convolution algorithm is established to replace the standard convolution operation; the subsequent function implementation and algorithm deployment of the detection model are all experimentally developed based on Jetson Orin Nano. First, the image file is burned, including installing virtual machine dependencies and burning the image. Then, the SDK Manager is installed to connect to the host, configure the development board and install the environment. Different target detection models are deployed on the development board, and the effectiveness of the improvement is verified through ablation experiments. The simulation ablation experiment results are compared as shown in the figure. Figure 5 shown.
[0140] In this embodiment, advanced structures such as CSPNet are used as the backbone network and PAN as the neck network, and spatial-channel decoupled downsampling and rank-guided module design are introduced. Two hardware devices are used for training and inference, and the GPU uses RTX3080 12G and RTX5000 16G. The dataset used for training includes 5232 road pictures from different regions, which are divided into six types of damage including D00 (longitudinal cracks), D10 (transverse cracks), D20 (alligator-shaped cracks), D30 (white line damage), D40 (potholes), and D50 (manhole covers). During the training process, we uniformly set the experimental parameters to the SGD optimizer, and the learning rate, weight decay, and momentum are set to 0.008, 0.0001, and 0.9, respectively.
[0141] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0142] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A lightweight road detection model design method for reducing space and channel redundancy, characterized in that: The following steps are involved: The convolutional neural network is used as the backbone network of the detection model. The convolutional neural network is used to extract feature maps from the input image. Design training strategies and reconstruct detection heads; Optimizing convolutional neural networks. Methods for optimizing convolutional neural networks include: 1) Constructing a spatial reconstruction unit through separation and reconstruction method; 2) Construct a channel reconstruction unit through the split transformation strategy; The spatial reconstruction and channel reconstruction units are sorted and integrated into convolution blocks, and the standard convolution in the convolutional neural network is replaced by convolution blocks; Train and infer the detection model to complete the design of the detection model.
2. The lightweight road detection model design method for reducing space and channel redundancy according to claim 1 is characterized in that: The convolutional neural network adopts the CSPNet network architecture, and the PAN network architecture is used as the neck network of the detection model. At the same time, large convolution kernels and partitioned self-attention mechanism are also used for learning in the detection model.
3. The lightweight road detection model design method for reducing space and channel redundancy according to claim 2 is characterized in that: Design a training strategy and reconstruct the detection head, which includes the following steps: The model is trained and inferred through a dual label assignment strategy. The dual label assignment strategy specifically includes the following: a one-to-many detection head is used in the training phase, and a one-to-one detection head is switched in the inference phase through gradient truncation; A unified matching metric is used to match the prediction perceptions of the two branches of one-to-many and one-to-one. The unified matching metric is as follows: In the formula, a represents the spatial prior, c represents the classification score of the feature map, and b represent the predicted and actual bounding boxes respectively, and α and β are two hyperparameters that can be learned; Analyze the supervision gap between the two branches of one-to-many and one-to-one; Reconstructing the detection head according to the supervision gap.
4. The lightweight road detection model design method for reducing space and channel redundancy according to claim 3 is characterized in that: Analyze the supervision gap between the two branches of one-to-many and one-to-one. The specific steps are as follows: During the detection model training process, if the two branches are initialized with the same parameters, the one-to-one detection head and the one-to-many detection head may generate the same classification probability p and overlap IoU; The one-to-many and one-to-one matching scores with maximum overlap IoU are expressed as and Assume that the one-to-many branch generates positive samples Ω, and the one-to-one branch selection The i-th predicted value of * Represents the maximum overlap IoU, then for j∈Ω and t o2o,i =u * , it can be deduced that the classification targets of one-to-many branch and one-to-one branch are: According to the classification objectives of the two-to-many branch and the one-to-one branch, the supervision gap between the two branches is obtained as: A=t o2o,i -Π(i∈Ω)t o2m,i +∑ k∈Ω\{i} t o2m,k (2)。 5. The lightweight road detection model design method for reducing space and channel redundancy according to claim 4 is characterized in that: By using the separation and reconstruction method, a spatial reconstruction unit is constructed, which specifically includes the following steps: Separate the feature map with more information from the feature map with less information to obtain the feature map with more information and less informative feature maps Multi-information feature map Cut from the middle and divide into and Less informative feature graph Cut from the middle and divide into and The feature map with less information is combined with the feature map with more information through cross reconstruction operation to obtain feature X w1 and X w2 ; The feature X w1 and X w2 Splice to get the spatial fine feature map X w , the operation steps are as follows:
6. The lightweight road detection model design method for reducing space and channel redundancy according to claim 5 is characterized in that: Separate the feature map with more information from the feature map with less information to obtain the feature map with more information and less informative feature maps The specific steps include: Each feature map is standardized. For any given feature map X, the standardization method is as follows: Among them, μ is the mean of each feature map, σ is the standard deviation of each feature map, ε is the introduced stability constant, α and β are trainable affine transformation parameters; Calculate the normalized weights: Weighting each feature map after standard processing by normalization weight; The standardized and normalized weighted feature map is mapped to the range of (0, 1) through the sigmoid function, and controlled by the preset threshold to obtain the information weight W1 and the non-information weight W2. This step is expressed by the following formula: W=G(Sigmoid(W α (X o ))) (6) The input feature map is multiplied by W1 and W2 respectively to obtain a multi-information feature map and less informative feature maps 7. The lightweight road detection model design method for reducing space and channel redundancy according to claim 6 is characterized in that: Through the split transformation strategy, a channel reconstruction unit is constructed, which specifically includes the following steps: Let S∈R c×k×k represents a k×k convolution kernel, X represents the input feature map; The channel of the spatial fine feature map Xw is divided into two parts: γC and (1-γ)C, where γ is the segmentation ratio (0≤γ≤1); Use 1×1 convolution compression to compress the two channels separately, and introduce parameter r to adjust and control the number of channels in the feature map; After segmentation and compression, the spatial fine feature map Xw is divided into upper feature X s and the following feature X x ; Use convolution operations G and D instead of standard convolution to perform the above feature X s Convolve and summarize separately to get the upper feature X s The transformed Y1 is: Among them, S G and is the weight matrix that can be learned, Y1∈R c ×h×w ; Use convolution operation D to perform the following feature X x Perform convolution and combine the result of the convolution operation with the following feature X x Splicing, get the following feature X x Transformed Y2: is the learnable weight matrix, ∪ is the concatenation operation, Y2∈R c ×h×w ; Through the channel statistics method T s Collect global space information: According to formula (9), global average pooling is performed, the obtained results t1 and t2 are superimposed, and the channel soft attention mechanism is used to generate feature important vectors β1 and β2: Weighted merging of Y1 and Y2 is performed by the feature importance vectors β1 and β2: Y=β1Y1+β2Y2 (11) Among them, Y represents the final output result of the detection model.
Citation Information
Patent Citations
Weld defect detection system and method based on infrared thermal imaging and deep learning
CN118641580A