YOLO-based lightweight double-end adaptive infrared weak detection algorithm method

By designing a lightweight double-head adaptive infrared weak detection algorithm based on YOLO, the error detection, missed detection and real-time problems of infrared weak target detection in the prior art are solved, and efficient and accurate infrared weak target detection is achieved.

CN119832385APending Publication Date: 2025-04-15NANTONG INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411884906.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing infrared weak target detection technology has problems such as high error detection rate, missed detection rate and loss of feature information. In addition, traditional detection algorithms have large calculation volume and high model complexity, making it difficult to meet the real-time requirements.

Method used

A lightweight double-head adaptive infrared weak detection algorithm based on YOLO is designed. Through technical means such as dual-head network structure, feature extraction module optimization, feature fusion, model pruning and adaptive loss function, it reduces information loss, reduces network complexity and improves detection efficiency.

Benefits of technology

High-precision detection of weak infrared targets is achieved, with an average detection accuracy of 96.6% and 98.2%. At the same time, the parameter amount and calculation amount of the model are significantly reduced, and the inference time is accelerated to 2.8ms to meet the real-time detection needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832385A_ABST
    Figure CN119832385A_ABST
Patent Text Reader

Abstract

The invention discloses a YOLO-based lightweight double-head adaptive infrared weak detection algorithm method, which comprises the following steps of S1, designing a double-detection-head lightweight network structure which comprises a feature extraction module and a feature fusion module so as to reduce information loss in a convolution process, reduce network complexity and improve operation efficiency; s2, calculating the similarity between filters, cutting a redundant filter according to a similarity result, and adjusting a pruning rate so as to improve the detection speed while maintaining the core feature information; and S3, introducing a target size adaptive penalty factor and an angle balance factor, and designing a cosPIoU-Varifocal loss function to balance positive and negative sample loss and overlapped region loss. According to the method, a feature extraction module is redesigned, and a double-detection-head E-YOLO network structure is provided, so that information loss in multiple convolution processes is effectively reduced, and the detection capability of infrared weak and small targets is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of infrared weak detection algorithms, and in particular to a method of a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO. Background Art

[0002] Infrared small target detection is an important prerequisite for realizing automated infrared intelligent security, monitoring, and guidance systems. However, existing infrared small target detection technologies face high false detection and missed detection rates, as well as serious loss of feature information during processing. Traditional detection algorithms are difficult to meet real-time requirements due to their large computational complexity and high model complexity, especially when dealing with small targets, and their performance is often unsatisfactory.

[0003] In recent years, deep learning technology has been widely used in the field of target detection, and its development has significantly improved detection capabilities. Detection algorithms with self-attention mechanism as the backbone network (such as Transformer and Swin-Transformer) introduce Transformer encoders and use self-attention mechanism to replace convolution operations for target detection. Although it enhances the model's attention to the target, it has the problems of large amount of calculation and complex network structure, making it difficult to meet real-time requirements.

[0004] To address the above problems, we proposed a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO. Summary of the invention

[0005] The invention discloses a method of a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO, aiming to solve the technical problems in the background technology.

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

[0007] A method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO, comprising the following steps:

[0008] S1. Design a lightweight network structure with dual detection heads, including feature extraction module and feature fusion module, to reduce information loss during convolution, reduce network complexity and improve operation efficiency;

[0009] The step S1 is refined as follows:

[0010] S11. Design and adjust the feature extraction module, introduce the CSPDarkNet structure to reduce information loss in multiple convolution processes, and optimize the infrared weak target features;

[0011] S12, feature information fusion based on feature pyramid network (FPN) to enhance the network's detection ability for multi-scale targets;

[0012] S13, combining two detection head structures, used for the detection of small targets and large targets respectively, to ensure specific attention to infrared weak small targets;

[0013] S14. Reduce unnecessary parameters and redundant connections through model pruning algorithms, thereby reducing network complexity while maintaining performance.

[0014] S2, calculate the similarity between each filter, prune the redundant filters according to the similarity results, and adjust the pruning rate to improve the detection speed while maintaining the core feature information;

[0015] The step S2 is refined as follows:

[0016] S21, performing feature space analysis on the filters in the convolutional layer and calculating similarity indexes between the filters;

[0017] S22, cutting out filters with high similarity and redundancy according to the similarity results, and optimizing the network structure;

[0018] S23. Test and record the model performance before and after pruning, such as detection accuracy and running speed, to ensure the pruning effect;

[0019] S24, adjust the pruning rate according to performance changes to find the best balance between performance and efficiency.

[0020] S3, introduce the target size adaptive penalty factor and angle balance factor, and design the cosPIoU-Varifocal loss function to balance the positive and negative sample losses and the overlapping area losses;

[0021] The step S3 is refined as follows:

[0022] S31. Design the target size adaptive penalty factor P to dynamically adjust the loss caused by positioning and scale changes;

[0023] S32, introducing an angle balance factor to adjust the rotation angle of the object and optimize the loss function;

[0024] S33. Combining the penalty factor and the angle balance factor, the cosPIoU formula is designed and constructed to achieve adaptive adjustment of angle and scale.

[0025] S34. Integrate cosPIoU into the Varifocal loss function to adjust the weights of positive and negative samples and balance the overlapping area loss.

[0026] S4. Use the public infrared small target dataset for data preprocessing and enhancement, and divide the dataset into training set, validation set and test set;

[0027] The step S4 is refined as follows:

[0028] S41. Collect and confirm the use of two public datasets, SIRST and IDSAT, to ensure the quality of the datasets;

[0029] S42. Randomly divide the data set into training set, validation set and test set in a ratio of 3:1:1 to ensure the reliability of the experimental results;

[0030] S43, preprocessing the data, including normalization, denoising and other operations, to ensure the uniformity of the data samples;

[0031] S44. Apply various data enhancement techniques (such as rotation, flipping, scaling, etc.) to expand the training set and enhance the generalization ability of the model.

[0032] S5. Preliminarily train the model on the training set, adjust the model parameters through the validation set, and perform final validation on the test set, recording the detection accuracy;

[0033] The step S5 is refined as follows:

[0034] S51. Perform preliminary training of the model on the training set, using the standard deep learning training process, including forward propagation, back propagation, and gradient descent;

[0035] S52. Evaluate the model using the validation set, record preliminary performance indicators, and adjust model parameters based on feedback;

[0036] S53, perform K-fold cross validation to confirm the robustness and generalization ability of the model and reduce overfitting;

[0037] S54. Perform final verification on the test set, record key performance indicators such as the model’s detection accuracy, and ensure that the model is adequately prepared.

[0038] S6. Record the impact of the pruning rate on the model performance, and use cosPIoU-Varifocal to fine-tune the model after pruning to ensure that the pruned model has improved detection accuracy and efficiency;

[0039] The step S6 is refined as follows:

[0040] S61. Record the P value (Precision) of the model after preliminary training and analyze the impact of the pruning rate on the model performance.

[0041] S62. After pruning, use the cosPIoU-Varifocal loss function to fine-tune the model and optimize the model parameters;

[0042] S63. Compare the performance indicators before and after fine-tuning to ensure that the fine-tuned model has improved in both accuracy and efficiency;

[0043] S64. Ensure that when the pruning rate is high, the performance indicators of the model, such as accuracy, recall rate (Recall) and average precision (mAP), do not decrease significantly, or even improve.

[0044] S7. Apply the verified E-YOLO model to the actual infrared small target detection scenario, collect data feedback, and further adjust and optimize the model based on the feedback to evaluate its detection effect under different backgrounds and complex scenarios:

[0045] The step S7 is refined as follows:

[0046] S71. Apply the verified E-YOLO model to the actual infrared weak target monitoring scenario and conduct actual environment testing;

[0047] S72. Collect data feedback from actual applications, including key indicators such as detection accuracy, false positive rate, missed positive rate, and detection model performance;

[0048] S73. Analyze data feedback and further adjust and optimize the model based on the feedback to cope with challenges in different backgrounds and complex scenarios;

[0049] S74. Compared with traditional detection methods, evaluate the advantages of E-YOLO in real-time, accuracy, and computational efficiency to ensure the robust performance of the model in practical applications.

[0050] The method of a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO provided by the present invention has the following advantages:

[0051] 1. This paper proposes a dual-detection head E-YOLO network structure by redesigning the feature extraction module, which effectively reduces information loss during multiple convolutions and improves the detection capability of infrared weak targets. The verification results on the SIRST and IDSAT data sets show that the average detection accuracy of the E-YOLO algorithm reaches 96.6% and 98.2% respectively;

[0052] 2. This invention introduces a filter pruning algorithm based on feature space. By calculating the similarity between filters and pruning redundant filters, the model parameters and calculation amount are significantly reduced. After pruning, the calculation amount of the E-YOLO model can be reduced to 0.5GFLOPs, the volume is compressed to 0.2MB, and the inference time is accelerated to 2.8ms, achieving efficient real-time detection without sacrificing accuracy.

[0053] 3. The present invention proposes the cosPIoU-Varifocal loss function, which introduces the target size adaptive penalty factor and the angle balance factor to balance the sample and overlapping area losses while completing the weighted processing of positive samples and reducing the interference of redundant anchor frames. This loss function improves the detection accuracy while enhancing the model's detection robustness for targets in various complex backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a schematic diagram of the overall steps of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention.

[0055] Figure 2 This is a schematic diagram of step S1 of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention.

[0056] Figure 3 This is a schematic diagram of step S2 of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention.

[0057] Figure 4 This is a schematic diagram of step S3 of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention.

[0058] Figure 5 This is a schematic diagram of step S4 of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention.

[0059] Figure 6 This is a schematic diagram of step S5 of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention.

[0060] Figure 7 This is a schematic diagram of step S6 of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention.

[0061] Figure 8 This is a schematic diagram of step S7 of a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO proposed in the present invention. DETAILED DESCRIPTION

[0062] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application usually described and marked in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0063] The invention discloses a method of a lightweight dual-head adaptive infrared weak small detection algorithm based on YOLO.

[0064] Reference Figure 1 , Figure 2 , Figure 3 and Figure 4 As shown, a method for a lightweight dual-head adaptive infrared weak detection algorithm based on YOLO includes the following steps:

[0065] S1. Design a lightweight network structure with dual detection heads, including feature extraction module and feature fusion module, to reduce information loss during convolution, reduce network complexity and improve operation efficiency;

[0066] The step S1 is refined as follows:

[0067] S11. Design and adjust the feature extraction module, introduce the CSPDarkNet structure to reduce information loss in multiple convolution processes, and optimize the infrared weak target features;

[0068] S12, feature information fusion based on feature pyramid network (FPN) to enhance the network's detection ability for multi-scale targets;

[0069] S13, combining two detection head structures, used for the detection of small targets and large targets respectively, to ensure specific attention to infrared weak small targets;

[0070] S14. Reduce unnecessary parameters and redundant connections through model pruning algorithms, thereby reducing network complexity while maintaining performance.

[0071] In this step, the core of the filter pruning algorithm based on feature space is to use the similarity of filters as the basis for pruning. First, by calculating the sum of the Euclidean distances of the filters, the filters with lower sums of Euclidean distances are filters with higher similarity. The filters are more replaceable, so they are deleted. The formula for calculating the Euclidean distance is:

[0072]

[0073] And filter out the filters with high similarity, the formula is:

[0074] x * =argmin f(x)

[0075] Geometric median is a method to reduce the dimensionality of data by calculating the geometric center of data points. This helps to identify and remove redundant or unimportant filters, thereby optimizing model performance;

[0076] Among them, the convolution parameters are: F i ∈R N i+1, N i, K,K

[0077] Therefore:

[0078]

[0079] The filter is pruned according to the filter similarity to obtain an alternative filter, and the formula is:

[0080]

[0081] By calculating the sum of the filter distances, a filter with high similarity is obtained. The formula is:

[0082]

[0083] in:

[0084]

[0085] S2, calculate the similarity between each filter, prune the redundant filters according to the similarity results, and adjust the pruning rate to improve the detection speed while maintaining the core feature information;

[0086] The step S2 is refined as follows:

[0087] S21, performing feature space analysis on the filters in the convolutional layer and calculating similarity indexes between the filters;

[0088] S22, cutting out filters with high similarity and redundancy according to the similarity results, and optimizing the network structure;

[0089] S23. Test and record the model performance before and after pruning, such as detection accuracy and running speed, to ensure the pruning effect;

[0090] S24, adjust the pruning rate according to performance changes to find the best balance between performance and efficiency.

[0091] S3, introduce the target size adaptive penalty factor and angle balance factor, and design the cosPIoU-Varifocal loss function to balance the positive and negative sample losses and the overlapping area losses;

[0092] Filter pruning algorithm based on feature space:

[0093] Preliminary work: prepare the input of the training set, validation set and pre-trained model, and set relevant parameters, including the pruning rate R.

[0094] a: Initialization: Network structure setting and parameter W

[0095] b: forepoch=1; epoch≤max_epoch; epoch++do

[0096] c: Iterative training network and parameter adjustment: W

[0097] d: for i = 1; i ≤ L; i++do

[0098] e: The sum of the filter Euclidean distances

[0099] f:endfor

[0100] g: Based on the value, select N×R replaceable filters.

[0101] h: The gradient of the filter with high similarity is set to zero

[0102] i:endfor

[0103] j: The adjusted gradient is used to train the model W, and the zero-removed model W1

[0104] k: Remove channels with a gradient of 0 from the W1 network to obtain the zero-removed network W2, and finally output the pruned network and parameters after model convergence.

[0105] The step S3 is refined as follows:

[0106] S31. Design the target size adaptive penalty factor P to dynamically adjust the loss caused by positioning and scale changes;

[0107] S32, introducing an angle balance factor to adjust the rotation angle of the object and optimize the loss function;

[0108] S33. Combining the penalty factor and the angle balance factor, the cosPIoU formula is designed and constructed to achieve adaptive adjustment of angle and scale.

[0109] S34. Integrate cosPIoU into the Varifocal loss function to adjust the weights of positive and negative samples and balance the overlapping area loss.

[0110] The Focal loss function in cosPIoU-Varifocal is:

[0111]

[0112] The Focal loss function uses a balanced method to weight samples, ignoring the positive contribution of positive samples. Therefore, the Varifocal loss function is used to improve the contribution by weighting positive samples. The formula is:

[0113]

[0114] Among them, p is the predicted result, between -1 and 1; y is the actual result; α is the adjustment factor; (1-p) β is the positive sample adjustment function, p β is the negative sample adjustment function. q is the judgment basis, the negative sample class q is 0, and the positive sample class q value is the IoU value of the anchor box.

[0115] S4. Use the public infrared small target dataset for data preprocessing and enhancement, and divide the dataset into training set, validation set and test set;

[0116] The step S4 is refined as follows:

[0117] S41. Collect and confirm the use of two public datasets, SIRST and IDSAT, to ensure the quality of the datasets;

[0118] S42. Randomly divide the data set into training set, validation set and test set in a ratio of 3:1:1 to ensure the reliability of the experimental results;

[0119] S43, preprocessing the data, including normalization, denoising and other operations, to ensure the uniformity of the data samples;

[0120] S44. Apply various data enhancement techniques (such as rotation, flipping, scaling, etc.) to expand the training set and enhance the generalization ability of the model.

[0121] The calculation of the current overlapping anchor frames ignores the angle balance, so the cosine similarity calculation between overlapping anchor frames is designed, and the formula is:

[0122]

[0123] Among them, cosθ is the angle between overlapping anchor boxes; λ is the balance factor, which adjusts the impact of the angle on the loss function;

[0124] In order to adjust the positioning and scale changes between the predicted anchor box and the target anchor box, a penalty factor P is designed, and its calculation formula is:

[0125]

[0126] In order to enhance the quality of the anchor box, a penalty function is designed, and its calculation formula is:

[0127]

[0128] PIoU = IoU - g(P)

[0129] Combined with the angle, cosPIoU is designed, and its calculation formula is:

[0130]

[0131] cosPIoU-Varifocal can balance positive and negative samples in the anchor frame regression process and use adjustment factors to highlight their contributions. cosPIoU-Varifocal integrates cosPIoU into Varifocal, and its calculation formula is:

[0132]

[0133] S5. Preliminarily train the model on the training set, adjust the model parameters through the validation set, and perform final validation on the test set, recording the detection accuracy;

[0134] The step S5 is refined as follows:

[0135] S51. Perform preliminary training of the model on the training set, using the standard deep learning training process, including forward propagation, back propagation, and gradient descent;

[0136] S52. Evaluate the model using the validation set, record preliminary performance indicators, and adjust model parameters based on feedback;

[0137] S53, perform K-fold cross validation to confirm the robustness and generalization ability of the model and reduce overfitting;

[0138] S54. Perform final verification on the test set, record key performance indicators such as the model’s detection accuracy, and ensure that the model is adequately prepared.

[0139] S6. Record the impact of the pruning rate on the model performance, and use cosPIoU-Varifocal to fine-tune the model after pruning to ensure that the pruned model has improved detection accuracy and efficiency;

[0140] The step S6 is refined as follows:

[0141] S61. Record the P value (Precision) of the model after preliminary training and analyze the impact of the pruning rate on the model performance.

[0142] S62. After pruning, use the cosPIoU-Varifocal loss function to fine-tune the model and optimize the model parameters;

[0143] S63. Compare the performance indicators before and after fine-tuning to ensure that the fine-tuned model has improved in both accuracy and efficiency;

[0144] S64. Ensure that when the pruning rate is high, the performance indicators of the model, such as accuracy, recall rate (Recall) and average precision (mAP), do not decrease significantly, or even improve.

[0145] S7. Apply the verified E-YOLO model to the actual infrared small target detection scenario, collect data feedback, and further adjust and optimize the model based on the feedback to evaluate its detection effect under different backgrounds and complex scenarios:

[0146] The step S7 is refined as follows:

[0147] S71. Apply the verified E-YOLO model to the actual infrared weak target monitoring scenario and conduct actual environment testing;

[0148] S72. Collect data feedback from actual applications, including key indicators such as detection accuracy, false positive rate, missed positive rate, and detection model performance;

[0149] S73. Analyze data feedback and further adjust and optimize the model based on the feedback to cope with challenges in different backgrounds and complex scenarios;

[0150] S74. Compared with traditional detection methods, evaluate the advantages of E-YOLO in real-time, accuracy, and computational efficiency to ensure the robust performance of the model in practical applications.

[0151] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. The replacement may be a replacement of a part of the structure, device, method step, or a complete technical solution. Any equivalent replacement or change according to the technical solution and the inventive concept of the present invention shall be covered within the protection scope of the present invention.

Claims

1. A method of lightweight dual-head adaptive infrared weak detection algorithm based on YOLO, characterized in that: The following steps are involved: S1. Design a lightweight network structure with dual detection heads, including feature extraction module and feature fusion module, to reduce information loss during convolution, reduce network complexity and improve operation efficiency; S2, calculate the similarity between each filter, prune the redundant filters according to the similarity results, and adjust the pruning rate to improve the detection speed while maintaining the core feature information; S3, introduce the target size adaptive penalty factor and angle balance factor, and design the cosPIoU-Varifocal loss function to balance the positive and negative sample losses and the overlapping area losses; S4. Use the public infrared small target dataset for data preprocessing and enhancement, and divide the dataset into training set, validation set and test set; S5. Preliminarily train the model on the training set, adjust the model parameters through the validation set, and perform final validation on the test set, recording the detection accuracy; S6. Record the impact of the pruning rate on the model performance, and use cosPIoU-Varifocal to fine-tune the model after pruning to ensure that the pruned model has improved detection accuracy and efficiency; S7. Apply the verified E-YOLO model to actual infrared dim target detection scenarios, collect data feedback, and further adjust and optimize the model based on the feedback to evaluate its detection effect under different backgrounds and complex scenarios.

2. The method of the YOLO-based lightweight dual-head adaptive infrared weak detection algorithm according to claim 1 is characterized in that: The step S1 is refined as follows: S11. Design and adjust the feature extraction module, introduce the CSPDarkNet structure to reduce information loss in multiple convolution processes, and optimize the infrared weak target features; S12, feature information fusion based on feature pyramid network (FPN) to enhance the network's detection ability for multi-scale targets; S13, combining two detection head structures, used for the detection of small targets and large targets respectively, to ensure specific attention to infrared weak small targets; S14. Reduce unnecessary parameters and redundant connections through model pruning algorithms, thereby reducing network complexity while maintaining performance.

3. The method of the YOLO-based lightweight dual-head adaptive infrared weak detection algorithm according to claim 1 is characterized in that: The step S2 is refined as follows: S21, performing feature space analysis on the filters in the convolutional layer and calculating similarity indexes between the filters; S22, cutting out filters with high similarity and redundancy according to the similarity results, and optimizing the network structure; S23. Test and record the model performance before and after pruning, such as detection accuracy and running speed, to ensure the pruning effect; S24, adjust the pruning rate according to performance changes to find the best balance between performance and efficiency.

4. The method of the YOLO-based lightweight dual-head adaptive infrared weak detection algorithm according to claim 1 is characterized in that: The step S3 is refined as follows: S31. Design the target size adaptive penalty factor P to dynamically adjust the loss caused by positioning and scale changes; S32, introducing an angle balance factor to adjust the rotation angle of the object and optimize the loss function; S33. Combining the penalty factor and the angle balance factor, the cosPIoU formula is designed and constructed to achieve adaptive adjustment of angle and scale. S34. Integrate cosPIoU into the Varifocal loss function to adjust the weights of positive and negative samples and balance the overlapping area loss.

5. The method of the YOLO-based lightweight dual-head adaptive infrared weak detection algorithm according to claim 1 is characterized in that: The step S4 is refined as follows: S41. Collect and confirm the use of two public datasets, SIRST and IDSAT, to ensure the quality of the datasets; S42. Randomly divide the data set into training set, validation set and test set in a ratio of 3:1:1 to ensure the reliability of the experimental results; S43, preprocessing the data, including normalization, denoising and other operations, to ensure the uniformity of the data samples; S44. Apply various data enhancement techniques (such as rotation, flipping, scaling, etc.) to expand the training set and enhance the generalization ability of the model.

6. The method of the YOLO-based lightweight dual-head adaptive infrared weak detection algorithm according to claim 1 is characterized in that: The step S5 is refined as follows: S51. Perform preliminary training of the model on the training set, using the standard deep learning training process, including forward propagation, back propagation, and gradient descent; S52. Evaluate the model using the validation set, record preliminary performance indicators, and adjust model parameters based on feedback; S53, perform K-fold cross validation to confirm the robustness and generalization ability of the model and reduce overfitting; S54. Perform final verification on the test set, record key performance indicators such as the model’s detection accuracy, and ensure that the model is adequately prepared.

7. The method of the YOLO-based lightweight dual-head adaptive infrared weak detection algorithm according to claim 1 is characterized in that: The step S6 is refined as follows: S61. Record the P value (Precision) of the model after preliminary training and analyze the impact of the pruning rate on the model performance. S62. After pruning, use the cosPIoU-Varifocal loss function to fine-tune the model and optimize the model parameters; S63. Compare the performance indicators before and after fine-tuning to ensure that the fine-tuned model has improved in both accuracy and efficiency; S64. Ensure that when the pruning rate is high, the performance indicators of the model, such as accuracy, recall rate (Recall) and average precision (mAP), do not decrease significantly, or even improve.

8. The method of the YOLO-based lightweight dual-head adaptive infrared weak detection algorithm according to claim 1 is characterized in that: The step S7 is refined as follows: S71. Apply the verified E-YOLO model to the actual infrared weak target monitoring scenario and conduct actual environment testing; S72. Collect data feedback from actual applications, including key indicators such as detection accuracy, false positive rate, missed positive rate, and detection model performance; S73. Analyze data feedback and further adjust and optimize the model based on the feedback to cope with challenges in different backgrounds and complex scenarios; S74. Compared with traditional detection methods, evaluate the advantages of E-YOLO in real-time, accuracy, and computational efficiency to ensure the robust performance of the model in practical applications.