A high-performance deep learning model and training method for single-channel images

By using low-dimensional and high-dimensional multi-scale receptive field modules in infrared object detection for depth feature extraction and eliminating invalid labels, the parameters redundancy and detection difficulties in infrared object detection are solved, and efficient and accurate single-channel images are achieved Test.

CN116206182BActive Publication Date: 2025-01-10BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310003660.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-03
Publication Date
2025-01-10
Estimated Expiration
2043-01-03

Smart Images

  • Figure CN116206182B_ABST
    Figure CN116206182B_ABST
Patent Text Reader

Abstract

A high-performance deep learning model and training method for single-channel images, the model comprises a low-dimensional multi-scale receptive field module and a plurality of high-dimensional multi-scale receptive field modules; the training method comprises: constructing a basic detection model and an optimized detection model according to the deep learning model structure; acquiring a single-channel image data set, and training the basic detection model through the single-channel image data set; inputting the single-channel image into the trained basic detection model and the optimized detection model respectively, and determining a valid label set according to the prediction result; correcting the valid label set according to the true value label, and screening the corrected label set; training the optimized detection model according to the corrected label set, the true value label and the single-channel image, and obtaining a final target detection model; the present invention accelerates the training speed of the deep learning network by eliminating invalid labels, false alarm labels and weak labels, and can solve the problems of misdetection and false alarm caused by various targets and when the target is similar to the background.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and more specifically to a high-performance deep learning model and training method for single-channel images. Background Art

[0002] Image processing refers to the technology of using computers to process, analyze and understand images to identify or locate different targets in the images. With the development of artificial intelligence software and hardware technology, deep learning algorithms play an important role in the fields of autonomous driving, maritime monitoring, etc.

[0003] The general deep learning target detection network designed for visible light images has achieved extremely high processing performance in an environment with reliable data quality and sufficient computing resources. However, when migrating the general deep learning target detection network to the infrared target detection task in an embedded environment, there are two problems: redundant detection network parameters and difficulty in infrared target detection. The network parameter redundancy is caused by the over-parameterization of the general target detection network. On the one hand, the infrared single-channel image only contains thermal radiation intensity information. Therefore, when performing infrared target detection tasks, there is no need to use excessive parameters to fit the color information that does not exist in the application scenario; on the other hand, the available computing resources in the embedded environment are limited. In order to ensure the real-time requirements of the infrared target detection software system, the computing accuracy and speed should be balanced when designing the infrared target detection algorithm. The difficulty in infrared target detection is caused by weak targets. When the ambient temperature is close to the target temperature, the infrared target imaging contour is blurred. Therefore, it is difficult to accurately distinguish between various targets and between targets and backgrounds, resulting in false detections and false alarms.

[0004] Therefore, how to provide a high-performance deep learning model and training method for single-channel images to solve the above problems is an issue that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, the present invention provides a high-performance deep learning model and training method for single-channel images, which realizes deep feature extraction of single-band images without color information by applying a low-dimensional multi-scale receptive field module and a high-dimensional multi-scale receptive field module. There is no need to copy the input single-channel image three times to adapt to a general deep learning network designed for RBG three-channel images, and the model operation efficiency is improved by reducing the amount of model input data. The deep learning network training speed can be accelerated by eliminating invalid labels, false alarm labels and weak labels, and the problems of misdetection and false alarm caused by various targets and targets and backgrounds can be solved.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A high-performance deep learning model for single-channel images, including a low-dimensional multi-scale receptive field module and multiple high-dimensional multi-scale receptive field modules;

[0008] The low-dimensional multi-scale receptive field module is used to collect single-channel images and extract the target and its neighborhood features under multiple receptive field sizes, and obtain a corresponding low-dimensional feature map;

[0009] The low-dimensional feature map is sequentially passed through a plurality of the high-dimensional multi-scale receptive field modules to extract depth features of multiple sizes to obtain a depth feature map.

[0010] Furthermore, it also includes a feature fusion module, which is used to resample the depth feature map of a preset size and splice it with the depth feature map of the minimum size.

[0011] Furthermore, the low-dimensional multi-scale receptive field module is constructed according to the following formula:

[0012]

[0013]

[0014] Where I represents the input single-channel image, is a convolution operation with a lower number of output channels than the number of input channels and a filter kernel size of 1, σ(·) is a sigmoid function, is a convolution operation with the same number of output channels as the number of input channels and a filter kernel size of 1. GAVPool() is a global pooling operation. q (I) is a lightweight feature extraction operation module that applies group convolution or standard convolution to perform the qth feature receptive field expansion on the input single-channel image, and the number of low-dimensional feature receptive field expansions q = {0, 1, 2, 3}, It is a concatenation operation performed along the corresponding dimension of the feature channel.

[0015] Furthermore, a high-dimensional multi-scale receptive field module is constructed according to the following formula:

[0016]

[0017]

[0018] Among them, + is the element-by-element addition operation, O p (x) is a lightweight feature extraction operation module that applies group convolution to perform the p-th feature receptive field expansion on the input feature x, and the number of high-dimensional feature receptive field expansions p = {0, 1, 2}.

[0019] A high-performance deep learning model training method for single-channel images includes the following steps:

[0020] Build basic detection models and optimize detection models;

[0021] Acquire a single-channel image dataset, and train the basic detection model using the single-channel image dataset; wherein the single-channel image dataset includes a single-channel image and a corresponding true value label;

[0022] Input the single-channel image into the optimized detection model and the trained basic detection model respectively, and determine a valid label set A according to the prediction results;

[0023] Correct the valid label set A according to the true value label, and select the corrected label set D;

[0024] The optimized detection model is trained according to the correction label set D, the true value label and the single-channel image to obtain a final target detection model.

[0025] Further, determining a valid label set A according to the prediction results includes the following steps:

[0026] Inputting the single-channel image into a trained basic detection model, and calculating the predicted target confidence of the basic detection model;

[0027] Inputting the single-channel image into an optimized detection model, and calculating the predicted target confidence of the optimized detection model;

[0028] Calculating an image response difference according to the predicted target confidence of the basic detection model and the predicted target confidence of the optimized detection model, and obtaining a valid label position according to the image response difference;

[0029] Get the valid tag set A according to the valid tag position index.

[0030] Further, the effective label set A is corrected according to the true value label, and the corrected label set D is screened, the steps comprising:

[0031] Obtaining a true value proximity position according to the true value label and the prediction result of the basic detection model;

[0032] Predict the target confidence according to the basic detection model and obtain the predicted strong response target position;

[0033] According to the true value adjacent position and the predicted strong response target position, a candidate adjacent strong response label set B is obtained;

[0034] According to the effective label set A and the candidate adjacent strong response label set B, a correction label set of a single-channel image is screened.

[0035] Furthermore, the correction label set of the single-channel image is screened according to the effective label set A and the candidate adjacent strong response label set B, the steps comprising:

[0036] According to the effective label set A and the candidate adjacent strong response label set B, the correction label set is screened:

[0037]

[0038] Among them, the pixel point (i, j) is a point that meets the three conditions of being effective, predicting a strong response, and being close to the true value center. The number of pixels is n = |A∩B|, and the four-tuple The target category confidence, target center point position, and height and width of the target circumscribed rectangle predicted by the basic detection model;

[0039] If the number of elements U in the correction label set D is less than the preset label number k, the elements in the candidate adjacent strong response label set B are cyclically added to the correction label set D until U=k.

[0040] Furthermore, before training the optimized detection model, a knowledge distillation method is used to define a loss function of the optimized detection model;

[0041] Specifically: According to the knowledge distillation loss function and the basic detection model training loss function, the loss function of the optimized detection model is defined:

[0042]

[0043] in, is the output of the optimized detection model, L task is the loss function for training the basic detection model, L distill is the knowledge distillation loss function, ε and γ are the weight hyperparameters of the detection task and knowledge distillation.

[0044] Furthermore, the knowledge distillation loss function is:

[0045]

[0046] Among them, U is the number of elements in the filter correction label set, L cls (·) is the target detection category loss function, L reg (·) is the target detection regression loss function, and δ is the weight hyperparameter of the target detection regression loss function. Beneficial effects of the present invention:

[0047] Through the above technical solutions, it can be known that compared with the prior art, the present invention discloses a target detection model training method for single-channel images, which can be applied to ship target detection in single-channel infrared images; the present invention uses a low-dimensional multi-scale receptive field module and a high-dimensional multi-scale receptive field module to process single-band input images and deep features without color information, and realizes feature extraction of single-channel input images with lower parameters and computational complexity than general deep neural networks. The multi-scale receptive field module adopts a lightweight convolution structure, feature reuse and feature screening design ideas, which ensures that the single-channel image feature extraction process is lightweight and effective from the perspective of deep learning network design; the present invention accelerates the training speed of deep learning networks by eliminating invalid labels, false alarm labels and weak labels, and ensures its prediction accuracy on the basis of further reducing the computational complexity of deep learning algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] 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, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0049] Figure 1 The accompanying drawing is a schematic diagram of a training method for a target detection model for a single-channel image provided by the present invention;

[0050] Figure 2 The accompanying drawing is a schematic diagram of the basic detection model structure in the present invention;

[0051] Figure 3 The accompanying drawing is a flow chart of an infrared image detection method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] 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.

[0053] like Figure 1 , an embodiment of the present invention discloses a high-performance deep learning model for single-channel images, including a low-dimensional multi-scale receptive field module and a plurality of high-dimensional multi-scale receptive field modules;

[0054] The low-dimensional multi-scale receptive field module is used to collect single-channel images and extract the target and its neighborhood features under multiple receptive field sizes, and obtain a corresponding low-dimensional feature map; the receptive field of the feature to be extracted is expanded by the low-dimensional multi-scale receptive field module to increase the target and the surrounding features of the target. Since the module is designed for single-channel images, there is no need to copy the input single-channel image three times to adapt to the general deep learning network designed for RBG three-channel images, and the model operation efficiency is improved by reducing the amount of model input data;

[0055] The low-dimensional feature map is sequentially passed through multiple high-dimensional multi-scale receptive field modules to extract deep features of multiple sizes to obtain a deep feature map.

[0056] In one embodiment, a feature fusion module is further included, and the feature fusion module is used to resample the depth feature map of a preset size and then splice it with the depth feature map of the minimum size. Multiple high-dimensional multi-scale receptive field modules correspond to the extraction of depth features of different sizes. Therefore, after the depth feature image of a certain size passes through the resampling layer, it is spliced ​​with the depth feature map of other sizes, which can introduce the features of the feature enhancement of the certain size or the ideal scale of the large target.

[0057] In one embodiment, the low-dimensional multi-scale receptive field module includes:

[0058]

[0059]

[0060] Where I represents the input single-channel image, is a convolution operation with a lower number of output channels than the number of input channels and a filter kernel size of 1, σ(·) is a sigmoid function, is a convolution operation with the same number of output channels as the number of input channels and a filter kernel size of 1. GAVPool() is a global pooling operation. q (I) is a lightweight feature extraction operation module that applies group convolution or standard convolution to perform the qth feature receptive field expansion on the input single-channel image, and the number of low-dimensional feature receptive field expansions q = {0, 1, 2, 3}, It is a concatenation operation performed along the corresponding dimension of the feature channel.

[0061] In one embodiment, a high-dimensional multi-scale receptive field module is constructed according to the following formula:

[0062]

[0063]

[0064] Among them, + is the element-by-element addition operation, O p(x) is a lightweight feature extraction operation module that applies group convolution to perform the p-th feature receptive field expansion on the input feature x, and the number of high-dimensional feature receptive field expansions p = {0, 1, 2}.

[0065] like Figure 2 The embodiment of the present invention provides a high-performance deep learning model training method for single-channel images, which is applicable to any of the above-mentioned high-performance deep learning models for single-channel images, and includes the following steps:

[0066] S1: Build basic detection models and optimized detection models for single-channel image processing;

[0067] In one embodiment, the specific steps include:

[0068] S11: Refer to the pre-built deep learning model, set the model structure parameters, and generate an optimized detection model:

[0069] S12: adjusting the model structure parameters of the optimized detection model to obtain a basic detection model;

[0070] Among them, the model structures of the optimized detection model and the basic detection model are the same as the deep learning model, with different parameters. The multi-scale receptive field module includes the number of groups g, the number of input channels C in and the number of output channels C out Three module parameters, C of the multi-scale receptive field module in the basic detection model in With C out Less than or equal to C of the multi-scale receptive field module in the optimized detection model in With C out , the g of the multi-scale receptive field module of the basic detection model is less than or equal to the g of the multi-scale receptive field module of the optimized detection model. The multi-scale receptive field includes a low-dimensional multi-scale receptive field module and a high-dimensional multi-scale receptive field module.

[0071] The basic detection model and the optimized detection model use single-channel images as input data during model training and inference, and are deep convolutional neural networks composed of multi-scale receptive field modules; the multi-scale receptive field module is used to extract multi-scale features of single-channel images and is composed of a lightweight convolutional structure.

[0072] In this embodiment, specifically, in S1, the step further includes defining a basic detection model structure and optimizing detection model structure parameters:

[0073] Both the basic detection model and the optimized detection model include L multi-scale receptive field modules, and any l-th multi-scale receptive field module includes the module parameters; the basic detection model structure parameter N unop = <unop_C in , unop_C out, unop_G>; the number of input channels of the multi-scale receptive field module unop_C in ={unop_C in l |l=1,...L}, the number of output channels of the multi-scale receptive field module unop_C out ={unop_C out l |l=1,...L},the number of multi-scale receptive field module groups G={unop_g l |l=1,...L}, then optimize the detection model parameter N op = <op_C in , op_C out , op_G>, calculate the number of groups of each module op_g according to the following formula l 、Number of input channels op_C in l and the number of output channels op_C out l :

[0074]

[0075]

[0076]

[0077] Among them, group adjustment parameter weights Channel adjustment parameter weight ω∈(0,1).

[0078] S2: Obtain a single-channel image dataset and train the basic detection model through the single-channel image dataset; the single-channel dataset includes single-channel images and corresponding true value labels; the true value label gt is composed of the target confidence conf, the center point cen of the target minimum circumscribed rectangular box, and its length h and width w, that is, gt = <conf C×H×W ,cen H×W ,h H×W , w H ×W >, C is the number of target categories, H and W are the width and height of the output feature map.

[0079] S3: Input the single-channel image into the trained basic detection model and the optimized detection model respectively, and determine the effective label set according to the prediction results;

[0080] S4: Correct the valid label set according to the true value label and select the corrected label set;

[0081] S5: Train the optimized detection model according to the correction label set, the true value label and the single-channel image to obtain the final object detection model.

[0082] In another embodiment, a low-dimensional multi-scale receptive field module is constructed according to the following formula:

[0083]

[0084]

[0085] Where I represents the input single-channel infrared image, is a convolution operation with a lower number of output channels than the number of input channels and a filter kernel size of 1, σ(·) is a sigmoid function, The input channels are equal to the number of input channels and the filter kernel size is 1. GAVPool() is a global pooling operation. The global pooling operation reduces the width and height of the input feature to 1 but does not change the number of channels of the input feature.

[0086] The feature processing order of F(·) is to first apply the feature enhancement module Perform channel-level enhancement on the input feature x, and then use the feature dimensionality reduction operation Eliminate weak features. F(.) contains feature screening module It can efficiently extract single-channel image features: Since the feature screening module includes a global pooling operation, the computational complexity of this module is slightly higher than that of the general channel attention mechanism, but the fitting ability is stronger; the dimensionality reduction operation on the enhanced features not only does not affect the model fitting ability, but also reduces the computational complexity of subsequent feature extraction operations. Relu(.) is a linear rectification function, For the splicing operation, G q (I) is a lightweight feature extraction operation module that performs the qth feature receptive field expansion on the input image:

[0087]

[0088] The number of feature receptive field expansions q = {0, 1, 2, 3} and when q>1, G q By reusing the previous layer operation result G q-1 , while increasing the receptive field size without adding additional computational overhead. Different computational parameters are used when expanding the feature receptive field C in is the number of input channels of the convolutional layer, C out is the number of output channels of the convolutional layer, and f is the filter kernel size, where

[0089]

[0090] G 1 , G 2 With G 3The same amount of operation is applied to extract features with receptive field sizes of 3, 5, and 7, respectively. The amount of operation and calculation is about one-third of the corresponding standard convolution operation. BN(·) is a batch normalization operation, and GConv(·) is a group convolution operation with a group number of g. Its operation is one-third of the standard convolution operation. By reusing features and applying lightweight convolution operations, the computational complexity of the low-dimensional multi-scale receptive field module is one eighth of the computational complexity of applying standard convolution to extract features of the same receptive field size. Since the nonlinear operation Relu will cause the output of negative eigenvalues ​​to be 0, thus affecting the processing effect of the input image during the low-dimensional feature extraction process, the low-dimensional multi-scale receptive field module does not use the Relu operation when extracting receptive field features of each size.

[0091] In another embodiment, a high-dimensional multi-scale receptive field module is constructed according to the following formula:

[0092]

[0093]

[0094] Among them, + is the element-by-element addition operation, O p (x) is a lightweight feature extraction operation module that applies group convolution GConv(·) to perform the p-th feature receptive field expansion on the input feature x:

[0095]

[0096] The number of times the high-dimensional feature receptive field is expanded is p = {0, 1, 2}. Similar to the low-dimensional multi-scale receptive field feature extraction module, O p (x) Similarly, the previous layer operation results are reused and the feature screening module is applied to perform efficient feature extraction of single-channel images. In order to increase the model's nonlinear relationship fitting ability, O p (x) Reduce the use of linear convolutional layers and increase nonlinear layers. To accelerate the convergence of the model, a high-dimensional multi-scale receptive field module Apply residual operation + avoid the vanishing gradient of model parameters during training. Therefore, the existing model has lower parameters and faster operation speed than the model that only uses standard convolution operation, and the fitting speed is faster than the model that only uses depthwise separable convolution. The detailed parameters of the basic detection model structure and the optimized model structure are shown in Table 1 and Table 2:

[0097] Table 1: Detailed parameters of the basic detection model structure

[0098]

[0099] Table 2: Detailed parameters of optimized detection model structure

[0100]

[0101] The multi-scale receptive field module in the present invention increases the feature complexity by improving the receptive field through 3x3 convolution. In addition, the multi-scale receptive field module adds a feature screening module to reduce the output feature dimension, and uses residual operation to improve the model convergence speed. The following table shows the performance of the general lightweight model, the basic detection model and the optimized detection model in the same infrared target detection task. Under the premise that the intersection and union ratio of the model prediction box and the real label box is greater than or equal to 0.5, the accuracy of the basic detection model and the optimized detection model constructed based on the multi-scale receptive field module is higher than that of the general lightweight model. When the input image size is (256, 256, 1), the number of multiplications and additions is counted. By comparing the number of multiplications and additions, it can be found that the amount of calculation of the basic detection model and the optimized detection model is much lower than that of the general lightweight model, which means that the reasoning speed and training speed of these two models are faster than the existing general lightweight model. The model size, the number of parameters and the number of multiplications and additions can show that the model parameter amount is proportional to the amount of calculation, and reducing the model parameter amount can effectively reduce the model calculation amount.

[0102]

[0103] In another embodiment, in S2, the basic detection model is trained using a single-channel image dataset, and the steps include:

[0104] S21: Apply image processing techniques such as random region cropping, image whitening and image contrast enhancement to the input single-channel image I 256×256 Perform data augmentation;

[0105] S22: According to the target detection loss function, use the augmented dataset to perform the basic detection model N unop For training, the target detection loss function is:

[0106]

[0107] Among them, N is the number of samples in the augmented dataset, L cls is the Focal loss function, L reg is the smooth L1 loss function, pred unop i is the prediction result of the basic detection model for the i-th sample in the augmented dataset, and gt i is the true label of the i-th sample in the augmented dataset.

[0108] In this embodiment, the RMSprop algorithm is used to train the basic detection model N on a single-channel image dataset. unop, the single-channel dataset is a dataset containing single-channel images and the corresponding true value labels gt; by applying the RMSprop algorithm, the group convolution structure in the multi-scale receptive field module can be effectively trained, and the generalization of the basic detection model can be improved by preventing overfitting of network parameters.

[0109] Input the single-channel image into the trained basic detection model and output the prediction result pred of the basic detection model unop ,

[0110]

[0111] Among them, pred_conf is the predicted target confidence, pred_cen is the center point of the detection box, and pred_h and pred_w are the length and width of each detection box.

[0112] In another embodiment, in S3, determining a valid tag set according to the prediction result includes:

[0113] S31: Calculate the prediction target confidence based on the prediction result; input the single-channel image into the basic detection and optimized detection models respectively, and output the prediction results of the basic detection model pred respectively unop And optimize the detection model prediction result pred op The prediction result includes the prediction target confidence, that is, the prediction target confidence of the basic detection model can be obtained. and optimize the prediction target confidence of the detection model

[0114] S32: Calculate the image response difference according to the predicted target confidence of the basic detection model and the predicted target confidence of the optimized detection model, and obtain the correction label position according to the image response difference; wherein the image response difference calculation formula is as follows:

[0115]

[0116] Correct label position

[0117] Among them, topk(v, k) is a function that returns the first k elements in the input array v. In this case, k is the number of calibrated labels contained in each single-channel image and k=min(20, 5C), C is the number of target categories. When diff≈0, the basic detection model and the optimized detection model have similar cognition of certain areas in the image. If the basic detection model output corresponding to such areas is used as a training label, it will cause the optimized detection model to repeat the existing knowledge and reduce the training effect of the model to be optimized. Since this type of label cannot effectively increase the generalization of the model, the prediction confidence of the basic detection model is Optimizing the prediction confidence of the detection model Similar labels are called invalid labels.

[0118] S33: Obtain a valid label set A according to the corrected label position index;

[0119]

[0120] In another embodiment, in S4, the valid label set is corrected according to the true value label, and the corrected label set is screened, and the steps include:

[0121] S41: Obtain the near position of the true value according to the true value label and the prediction result of the basic detection model;

[0122] Specifically: According to the confidence of the center point of each target of the true value label Get the position near the true value;

[0123] Among them, the maximum distance β between any pixel point (i, j) in the image and the center point (u, v) of each type of target is 2, and the coordinates of the center point must satisfy The number of target categories c = {1, ...C}.

[0124] S42: predicting the target confidence according to the basic detection model, and obtaining the predicted strong response target position; Among them, the lower limit of response intensity When the confidence level of the target predicted by the basic detection model is too low, the corresponding area is the background area or the target area. If the corresponding area is the background area, guiding the optimized detection model to learn the background area will reduce its accuracy; if the corresponding area is the target area, it cannot effectively guide the optimized detection model to learn during the training process because its confidence level is too low. Therefore, the output of the basic detection model corresponding to the position where the confidence level of the predicted target is too low is called a weak label.

[0125] S43: According to the true value near position near loc and predicted strong response target position res loc , obtain the candidate adjacent strong response label set B;

[0126]

[0127] If the basic detection model predicts that the predicted target position is a non-true value adjacent position, it is the target edge area or false alarm area. For single-channel images lacking color information, the target edge area often has blur or imaging noise. Guiding the optimization detection model to learn about this type of area will lead to an enhanced response in the background area containing similar noise or blur, resulting in the appearance of false alarms. Therefore, the strong response target position res loc Not near the true value label loc The output of the model to be optimized is called the false alarm label.

[0128] S44: Filter the correction label of the single-channel image according to the effective label set and the adjacent strong response label set.

[0129] In another embodiment, in S44, the correction labels of the single-channel image are screened according to the valid label set and the adjacent strong response label set, and the steps include:

[0130] S441: Filter the correction label set according to the candidate correction label set A and the candidate adjacent correction label set B:

[0131]

[0132] Among them, n = |A∩B|.

[0133] S442: If the number of elements U in the correction label set D is less than k, then the elements in the adjacent strong response label set B are cyclically added to the correction label set D until U=k.

[0134] In another embodiment, before training the optimized detection model, a knowledge distillation method is used to define a loss function of the optimized detection model;

[0135] Specifically: the loss function of the optimized detection model is defined using the knowledge distillation loss function and the target detection loss function:

[0136]

[0137] in, is the output of the optimized detection model, L task is the target detection loss function when training the basic detection model, L distill is the knowledge distillation loss function, ε and γ are the weight hyperparameters of the detection task and knowledge distillation.

[0138] In another embodiment, the knowledge distillation loss function is:

[0139]

[0140] Among them, U is the number of elements in the filter correction label set, L cls (·) is the target detection category loss function, L reg (·) is the target detection regression loss function, and δ is the weight hyperparameter of the target detection regression loss function.

[0141] In another embodiment, the step S5 includes: inputting the screened correction label D, the single-channel image and the true value label gt into the optimized detection model, performing e′ rounds of training on the optimized model through the Adam algorithm, and obtaining the final optimized detection model parameters, specifically:

[0142] S51: Use image processing techniques such as random region cropping, image whitening and image contrast enhancement to perform data augmentation.

[0143] S52, the single channel image I 256×256 Input into the model to be optimized N unop And the optimized detection model Nop, get the basic detection model output pred unop and optimize the detection model output

[0144] S53, according to the loss function redefined after knowledge distillation, use the Adam algorithm to perform e′ rounds of training on the optimization model. In this embodiment, e′=150. Thus, by using the knowledge distillation method, the weight parameters of the final optimization detection model are obtained, thereby improving the training speed and detection accuracy.

[0145] like Figure 3 In another embodiment, the step also includes detecting the single-channel image data to be detected through the final optimized detection model to obtain an image detection result; wherein the single-channel image data to be detected is an infrared image, and the infrared image is input for feature extraction, and the target category and target position are predicted respectively, and non-maximum suppression is used to perform local search according to the target category and target position, and the target image is output.

[0146] The present invention can process single-channel full-color images, single-channel SAR images, single-channel long-wave infrared images, single-channel medium-wave infrared images and single-channel simulated infrared images. Among them, the simulated infrared image can be generated by simulating the visible light band, or by simulating the infrared image and the visible light image. The present invention can be specifically integrated in an electronic device, and the electronic device can be a terminal, a server and other devices. Among them, the terminal can be an infrared camera, a car camera, a satellite camera, a surveillance camera, a mobile phone, a tablet computer, a laptop computer, or a personal computer and other devices; the server can be a single server or a server cluster composed of multiple servers. It can be understood that this embodiment can be executed on the terminal, on the server, or jointly executed by the terminal and the server. The above examples should not be understood as limitations on the present application.

[0147] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0148] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A high-performance deep learning model for single-channel images, characterized in that: Including a low-dimensional multi-scale receptive field module and multiple high-dimensional multi-scale receptive field modules; The low-dimensional multi-scale receptive field module is used to obtain a single-channel image and extract the target and its neighborhood features under multiple receptive field sizes, and obtain a corresponding low-dimensional feature map; Among them, the low-dimensional multi-scale receptive field module is specifically expressed as: Where I represents the input single-channel image, is a convolution operation with a lower number of output channels than the number of input channels and a filter kernel size of 1, σ(·) is a sigmoid function, is a convolution operation with the same number of output channels as the number of input channels and a filter kernel size of 1, GAVPool() is a global pooling operation, G q (I) is a lightweight feature extraction operation module that applies group convolution or standard convolution to perform the qth feature receptive field expansion on the input single-channel image, and the number of low-dimensional feature receptive field expansions q = {0, 1, 2, 3}, It is a splicing operation performed along the corresponding dimension of the feature channel; The low-dimensional feature map is sequentially subjected to multiple-size depth feature extraction by multiple high-dimensional multi-scale receptive field modules to obtain a depth feature map; Among them, the high-dimensional multi-scale receptive field module is specifically expressed as: Among them, + is the element-by-element addition operation, O p (x) is a lightweight feature extraction operation module that applies group convolution to perform the p-th feature receptive field expansion on the input feature x, and the number of high-dimensional feature receptive field expansions p = {0, 1, 2}.

2. A high-performance deep learning model for single-channel images according to claim 1, characterized in that: It also includes a feature fusion module, which is used to resample the depth feature map of a preset size and then splice it with the depth feature map of the minimum size.

3. A high-performance deep learning model training method for single-channel images, characterized in that: The following steps are involved: Constructing a basic detection model and an optimized detection model; the basic detection model and the optimized detection model have the same model structure, and are both high-performance deep learning models for single-channel images according to any one of claims 1 or 2; Acquire a single-channel image dataset, and train the basic detection model using the single-channel image dataset; wherein the single-channel image dataset includes a single-channel image and a corresponding true value label; The single-channel image is input into the optimized detection model and the trained basic detection model respectively, and a valid label set A is determined according to the prediction results; the steps include: Input the single-channel image to the trained basic detection model, and calculate the predicted target confidence of the basic detection model; input the single-channel image to the optimized detection model, and calculate the predicted target confidence of the optimized detection model; calculate the image response difference according to the predicted target confidence of the basic detection model and the predicted target confidence of the optimized detection model, and obtain the valid label position according to the image response difference; obtain the valid label set A according to the valid label position index; The image response difference calculation formula is as follows: Where diff is the image response difference, To optimize the prediction target confidence of the detection model, The confidence level of the predicted target of the basic detection model; Correcting the valid label set A according to the true value label and selecting the corrected label set D; the steps include: According to the true value label and the prediction result of the basic detection model, the true value adjacent position is obtained; according to the target confidence predicted by the basic detection model, the predicted strong response target position is obtained; according to the true value adjacent position and the predicted strong response target position, a candidate adjacent strong response label set B is obtained; according to the effective label set A and the candidate adjacent strong response label set B, a correction label set D of a single-channel image is screened; Among them, the pixel point (i, j) is a point that meets the three conditions of being effective, predicting a strong response, and being close to the true value center. The number of pixels is n = |A∩B|, and the four-tuple The target category confidence, target center point position, and height and width of the target circumscribed rectangle predicted by the basic detection model; If the number of elements U in the correction label set D is less than the preset number of labels k, the elements in the candidate adjacent strong response label set B are cyclically added to the correction label set D until U=k; The optimized detection model is trained according to the correction label set D, the true value label and the single-channel image to obtain a final target detection model.

4. The high-performance deep learning model training method for single-channel images according to claim 3, characterized in that: Before training the optimized detection model, a knowledge distillation method is used to define a loss function of the optimized detection model; Specifically: According to the knowledge distillation loss function and the basic detection model training loss function, the optimized detection model loss function is defined: in, is the output of the optimized detection model, L task is the loss function for training the basic detection model, L distill is the knowledge distillation loss function, ε and γ are the weight hyperparameters of the detection task and knowledge distillation; gt is the true label.

5. The high-performance deep learning model training method for single-channel images according to claim 4, characterized in that: The knowledge distillation loss function is: Among them, U is the number of elements in the filter correction label set, L cls (·) is the target detection category loss function, L reg (·) is the target detection regression loss function, and δ is the weight hyperparameter of the target detection regression loss function.

Citation Information

Patent Citations

  • Infrared image pedestrian target detection method based on improved YOLOv5

    CN113688723A

  • Model training method and device, electronic equipment and storage medium

    CN114330510A