An adaptive infrared image detection method and system for complex background interference
Through the YOLO-CCA network model and adaptive loss function optimization, the classification and positioning problem in infrared image detection of substation equipment under complex background is solved, and high-precision and efficient detection effects are achieved.
Patent Information
- Application Number
- CN202510787283.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-06-13
AI Technical Summary
In complex background, in infrared image detection of substation devices, classification and positioning prediction are inconsistent, which affects detection accuracy.
The YOLO-CCA network model is adopted, combining the lightweight convolution module, attention mechanism module and multi-level feature fusion structure, and dynamically adjustable exponential mass focus loss function and noise-robust focus loss function are introduced to optimize the loss function to achieve adaptive detection.
It improves the accuracy and efficiency of infrared image detection, enhances the robustness to complex backgrounds, reduces the leakage detection rate, and improves the detection quality of substation equipment.
Smart Images

Figure CN120298679B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of infrared image detection, and in particular relates to an infrared image adaptive detection method and system facing complex background interference. Background Art
[0002] Substations perform crucial functions within the power grid, including voltage conversion, voltage regulation, and current collection and distribution. Their operational status is directly linked to the stability and reliability of the entire grid. Over long-term operation, substation equipment is susceptible to multiple factors, including aging, overload, and environmental conditions, leading to the gradual development of latent faults. These faults are often difficult to detect in their early stages, but gradually intensify over time, exhibiting more obvious symptoms later. Abnormally high equipment temperatures are considered a key early warning sign of latent faults. Sustained high temperatures not only degrade the internal materials of the equipment but also weaken its insulation, seriously threatening its overall safety and potentially even causing serious equipment failures. Therefore, ensuring the safe and stable operation of substation equipment is not only of great technical significance but also has far-reaching social and economic value.
[0003] In power systems, continuous and accurate monitoring of equipment thermal conditions and timely diagnosis have become key technologies for preventing and identifying hidden faults and ensuring the safe and stable operation of power equipment. Infrared imaging technology, due to its non-contact operation, the need for equipment disassembly, uninterrupted operation, and high efficiency and accuracy, has been widely used in the field of power equipment condition monitoring, demonstrating significant potential.
[0004] In the past, substation inspections relied primarily on manual labor using handheld infrared imagers, a time-consuming and inefficient method. This traditional method, particularly when inspecting substation equipment in complex and intertwined environments, suffered from low accuracy and a high rate of missed detections, severely impacting inspection quality and posing potential risks to grid operations.
[0005] With the rapid development of drone technology, the use of drones equipped with infrared imagers for routine inspections has become increasingly common. This approach improves inspection efficiency while significantly enhancing the quality of substation equipment monitoring. However, during their missions, drones capture and transmit large amounts of infrared image data for backend analysis. Given the sheer volume of this data and the varying status of equipment, relying on traditional manual analysis of this data individually has become inefficient and unsustainable.
[0006] Therefore, to more effectively utilize the benefits of infrared imaging technology on drones, the development of real-time infrared image recognition algorithms has become essential. Deep learning-based target detection algorithms have been integrated into drone systems equipped with infrared imagers, becoming a key technical path for achieving real-time identification of thermal defects in substation equipment. This approach not only enhances the intelligence and automation of detection but also provides an efficient, low-cost, and responsive solution for substation equipment status monitoring, further enhancing the safety and reliability of power systems. However, when inspecting infrared images of substation equipment against complex background interference, inconsistencies between classification and location predictions can occur, compromising detection accuracy. Summary of the Invention
[0007] The present invention provides an infrared image adaptive detection method and system facing complex background interference, which are used to solve the technical problem of inconsistency between classification and positioning prediction under complex background.
[0008] In a first aspect, the present invention provides an infrared image adaptive detection method for complex background interference, comprising:
[0009] Construct a YOLO-CCA network model, which includes a backbone network, a neck network, and a head network. The expression of the target loss function in the head network is:
[0010] ,
[0011] Where, is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function;
[0012] Acquire at least one historical infrared image of a power substation device, and annotate the at least one historical infrared image of the power substation device to obtain annotation information corresponding to the at least one historical infrared image of the power substation device;
[0013] Inputting the at least one historical infrared image of the substation equipment and the annotation information into the YOLO-CCA network model for iterative training to obtain an adaptive detection model;
[0014] The acquired real-time infrared image of the power substation equipment is input into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the power substation equipment.
[0015] In a second aspect, the present invention provides an infrared image adaptive detection system for complex background interference, comprising:
[0016] A construction module is configured to construct a YOLO-CCA network model, wherein the YOLO-CCA network model includes a backbone network, a neck network, and a head network, wherein the expression of the objective loss function in the head network is:
[0017] ,
[0018] Where, is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function;
[0019] a marking module configured to obtain at least one historical infrared image of a power substation and mark the at least one historical infrared image of the power substation to obtain marking information corresponding to the at least one historical infrared image of the power substation;
[0020] a training module configured to input the at least one historical infrared image of the substation equipment and the annotation information into the YOLO-CCA network model for iterative training to obtain an adaptive detection model;
[0021] The output module is configured to input the acquired real-time infrared image of the substation equipment into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the substation equipment.
[0022] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the infrared image adaptive detection method for complex background interference according to any embodiment of the present invention.
[0023] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program instructions are executed by a processor, the processor executes the steps of the infrared image adaptive detection method for complex background interference according to any embodiment of the present invention.
[0024] This application proposes an adaptive infrared image detection method and system for complex background interference. By replacing the C2f architecture in YOLOv8 with a lightweight convolutional module, this method significantly reduces the number of parameters and computational overhead while maintaining feature extraction capabilities. Secondly, an attention mechanism is designed to enhance feature responses in key areas, suppress background interference, and improve thermal feature contrast and detection performance. A multi-level feature fusion structure is then added to the neck network to strengthen contextual dependencies between different scales, improving the recognition accuracy of both large and small objects. Finally, a dynamically adjusted exponential quality focal loss (D-QFL) is introduced to adaptively enhance the regression accuracy of high-quality samples. A noise-robust focal loss (NR-Focal) is also proposed to address label interference and background noise through a confidence mechanism. Finally, the system is fused into a QF-Robust Loss. By flexibly setting loss weights, the system achieves coordinated optimization of the localization and classification tasks, comprehensively resolving the issue of inconsistent classification and localization predictions for substation equipment in complex backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] Figure 1 A flowchart of an infrared image adaptive detection method for complex background interference provided by one embodiment of the present invention;
[0027] Figure 2 A schematic diagram of the YOLO-CCA network model structure of a specific embodiment is provided for one embodiment of the present invention;
[0028] Figure 3 A schematic diagram of a C2MFPPC structure of a specific embodiment provided by an embodiment of the present invention;
[0029] Figure 4 A schematic diagram of the MFPPC structure of a specific embodiment provided by one embodiment of the present invention;
[0030] Figure 5 A schematic diagram of a CFC structure of a specific embodiment provided by one embodiment of the present invention;
[0031] Figure 6 A schematic diagram of the FWA structure of a specific embodiment provided by one embodiment of the present invention;
[0032] Figure 7 A schematic diagram of the AMFF attention mechanism structure of a specific embodiment provided by one embodiment of the present invention;
[0033] Figure 8 A structural block diagram of an infrared image adaptive detection system for complex background interference provided by one embodiment of the present invention;
[0034] Figure 9 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0036] See also Figure 1 , which shows a flow chart of an infrared image adaptive detection method for complex background interference in the present application.
[0037] like Figure 1 As shown in FIG, the infrared image adaptive detection method for complex background interference specifically includes the following steps:
[0038] Step S101: construct a YOLO-CCA network model, where the YOLO-CCA network model includes a backbone network, a neck network, and a head network.
[0039] In this step, if Figure 2As shown in the figure, the backbone network input is a 640×640 image of infrared electrical equipment with three channels. In the backbone network, the input image is first reduced to 160×160 with 128 channels through two Conv convolution modules. Next, it undergoes three C2MFPPC modules, one Conv convolution module, six C2MFPPC modules, one Convolution module, three C2MFPPC modules, one Conv convolution module, and three C2MFPPC modules. Finally, the last three C2MFPPC modules are connected to the neck network to prepare for further feature fusion. The Conv convolution module uses a 3×3 kernel size and a stride of 2 to extract low-level feature information around image edges. The output size is controlled by adjusting the kernel size, stride, and padding. C2MFPPC consists of a series of Convolutional Layer (Conv) modules and Multiple Feature Parallel Pooling (MFPPC). The C2MFPPC module is lightweight and reduces the number of parameters in the entire model. The convolutional layers in the MFPPC module extract local features, while the pooling layers compress spatial information and preserve key image features.
[0040] Neck Network: The neck network consists of a CFC attention mechanism module, an SPPF spatial pyramid module, an Upsample upsampling module, a Concat stacking module, a Conv convolution module, and an Adaptive Multi-Scale Feature Fusion Network (AMFF). The CFC module helps the model identify and enhance the most critical features while suppressing unimportant information. SPPF is a technique used to improve the ability of convolutional neural networks to handle inputs of varying sizes. The Upsample module not only increases the size of feature maps but also accurately reconstructs lost details. The Concat module is mainly used to stack the number of feature channels. The AMFF module integrates feature maps from different levels, ensuring that the final feature representation contains both rich detail information and high-level semantic information, thereby improving the model's accuracy in recognizing objects of varying scales.
[0041] Head network: The head network consists of three Detect detection heads. Detect includes a Conv convolution module, two Conv2d convolutions, and a QF-Robust Loss loss function, which is used to output the category of each image and the corresponding detection accuracy.
[0042] C2MFPPC module (such as Figure 3As shown in Figure 1: First, the input features pass through a Conv convolution module. Subsequently, a Split module is connected for channel splitting, resulting in two output features. The two features are then processed through a Conv convolution module and two MFPPC modules, respectively. The resulting features are then stacked channel-wise. Finally, a Conv convolution module is applied to obtain the final output.
[0043] MFPPC modules (such as Figure 4 As shown in the figure ( ): First, the input features undergo a spilt channel splitting operation. Next, the channel-split features are subjected to four max pooling operations. Each max pooling operation is followed by a Conv convolution module, BN regularization, and Mish activation function operations, resulting in four sets of output features with a channel number of C / 4. These four sets of features are then stacked to obtain new features. Finally, a series of Conv convolution modules are performed to obtain the output result.
[0044] CFC modules (such as Figure 5 As shown in Figure 1, the input features are first processed through a Convolutional Module and two Fast Waxing (FWA) Modules, resulting in three features. Then, the three features are stacked using Concat to generate new features. Finally, the new features are processed through a Convolutional Module to generate the output.
[0045] FWA modules (such as Figure 6 As shown in the figure): The input feature undergoes a split channel segmentation operation to obtain two features W1 and W2 with the number of channels C / 2; the feature W1 is sequentially subjected to the Conv convolution module, BN and SiLU activation function operations to obtain the feature W3; the feature W2 is subjected to the same Conv convolution module and BN operation twice to obtain the features W4 and W5, and then the feature W2 is subjected to a BN operation to obtain the feature W6; the features W4, W5 and W6 are residually connected to obtain the feature W7, and then the feature W7 is subjected to the attention weighting and SiLU activation function operation to obtain the feature W8; the features W3 and W8 are channel stacked and subjected to the Conv convolution module operation to obtain the final output result W9.
[0046] Adaptive multi-scale feature fusion network (such as Figure 7As shown in the figure, in the adaptive multi-scale feature fusion network, the input feature Input is subjected to a Conv convolution module operation to obtain feature Z1; feature Z1 is subjected to average pooling operations with convolution kernel sizes of 3, 5, and 7 respectively, and three groups of Conv convolution module operations are performed simultaneously to obtain features Z2, Z3, and Z4; features Z2, Z3, and Z4 are channel-stacked to obtain feature Z5, and a residual network is formed with the feature Z1 obtained by the first convolution to obtain feature Z6; feature Z6 and feature Z1 are channel-stacked to obtain feature Z7; feature Z7 is sequentially subjected to Conv convolution module, BN, and SELU activation function operations to obtain the final output result Z8.
[0047] In order to solve the problem that the positioning branch has difficulty in accurately capturing the target quality in complex backgrounds, an adaptive modulation mechanism based on prediction error, D-QFL, is introduced. It can fully reflect the dynamic characteristics of the prediction error, so that samples with smaller prediction errors (i.e., high quality) are given higher reinforcement, making the network more inclined to learn accurate positioning information, thereby improving the convergence and accuracy of the positioning task.
[0048] By dynamically adjusting the index Adaptively weight the prediction error, strengthen the supervision of high-quality samples (predictions close to the real target), and encourage the model to make more accurate predictions of the target's location and boundaries. This improves the quality of target positioning. For background or low-quality samples (s=0), As the benchmark; for high-quality samples (s>0), The prediction error is used as the basis for modulation to balance the contribution of samples of different categories to achieve the purpose of dynamic sample adjustment. The expression of the dynamic adjustment index quality focus loss function is:
[0049] ,
[0050] ,
[0051] ,
[0052] Where, The logit value output by the YOLO-CCA network model, that is, the original prediction value without activation, is the sigmoid activation function, which is used to map the logit value to the [0,1] interval, where , is the true confidence label, and its value range is [0,1]. is the binary cross entropy loss function, which measures and the true label The gap between is the adaptive modulation index, is the initial modulation index, set to 1~2, It is a hyperparameter for adjusting the dynamic range, and the default value is 1. Indicates that the true label = 0 when the binary cross entropy loss, The true label represented by = 0. When s = 0, it is usually a background or no-target sample, and the model predicts a probability close to 0. Therefore, The error of the model in predicting the background class is calculated. When s=0, it means that the sample belongs to the background class. Used to adjust the loss weight of background samples. It can affect the contribution of background samples in training, allowing the model to learn the characteristics of background samples more flexibly.
[0053] In complex substation image scenes, there are often problems such as occlusion, blur, and noise interference, which lead to reduced classification performance. At the same time, missed detection (i.e. misclassifying positive samples as negative samples) is also an important factor affecting detection performance. To this end, NR-Focal not only introduces label confidence In addition to the regularization modulation term, an additional weighting mechanism is designed for positive samples to amplify the penalty for positive samples with low prediction probability (easy to miss detection), thereby reducing the missed detection rate.
[0054] Additional factors For positive samples, when the prediction probability is low (i.e., the missed detection rate is high), the loss value increases significantly, thereby driving the model to continuously improve the detection probability of positive samples to achieve the purpose of reducing the missed detection rate. By introducing label confidence and regularization term , effectively reducing the interference of noise labels and stabilizing model training to achieve classification robustness. The expression of the noise robust focal loss function is:
[0055] ,
[0056] Where, is the label confidence, , reflecting whether the label is accurate or a pseudo label, is the true category label, , 1 represents the positive class, 0 represents the negative class, is the basic weight parameter for positive samples, the default value is 1, which is used to balance the ratio of positive and negative samples. To reduce the missed detection rate adjustment parameter, the default value is 1. is the predicted probability after sigmoid activation, where , is the part where the predicted probability is consistent with the true label, ,like ,but ,like ,but , Is a constant, the value is , is the weight hyperparameter of the regularization term, and z is the logit value output by the model, that is, the original prediction value without activation.
[0057] It should be noted that the target loss function in the head network achieves a balance between the two major tasks of positioning and classification by integrating D-QFL and NR-Focal. This ensures that the model accurately locates the target while reducing missed detections and noise interference, thereby improving classification accuracy. In complex backgrounds, the positioning quality and classification reliability are considered simultaneously to comprehensively optimize the overall performance of the model, improving the problem of accurate positioning but classification errors and missed positive samples. The expression of the target loss function is:
[0058] ,
[0059] Where, is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function;
[0060] Step S102 : acquiring at least one historical infrared image of a power substation device, and annotating the at least one historical infrared image of the power substation device to obtain annotation information corresponding to the at least one historical infrared image of the power substation device.
[0061] In this step, before model training, a dataset of infrared images of substation electrical equipment must be constructed and processed. This dataset, collected by drones in a real-world operating environment, contains 1,000 infrared images of substation equipment, covering 13 common types of infrared electrical equipment found in substations, including lightning arresters, circuit breakers, busbars, bushings, fixtures, oil conservators, current transformers, disconnectors, disconnectors 1 and 2, radiators, insulators, and transformers. To ensure the model's high detection accuracy and generalization capabilities, particularly its robustness in complex scenarios, the dataset undergoes uniform labeling, enhancement, and segmentation.
[0062] First, use the LabelImg annotation tool to annotate each type of electrical equipment in the image with a rectangular box. We use 13 English labels for electrical equipment (including arrester, breaker, busbar, bushing, clamp, conservator, current-transformer, disconnector, disconnector1, disconnector2, heat-sink, insulator, and transformer) to ensure labeling accuracy. Ensure that label information is consistent. After labeling is complete, generate a YOLO-formatted annotated text file for subsequent model training.
[0063] Secondly, given deep learning's reliance on large-scale data and the limited data availability of substation infrared images due to acquisition constraints, direct use for training can easily lead to overfitting, impacting the model's generalization performance. Therefore, this paper employs a series of data augmentation strategies. Through operations such as random image rotation, horizontal and vertical flipping, brightness adjustment, and cropping and padding, these strategies simulate image differences caused by changes in angle, position, posture, and illumination during actual device capture. This significantly enhances the model's robustness to changes in spatial scale and orientation of the target. Furthermore, to ensure data input consistency, all infrared images are resized to a preset input resolution (e.g., 640×640 pixels) and subjected to a size consistency check.
[0064] Finally, the processed dataset is divided into a training set and a validation set in a ratio of 8:2. The training set is used for model parameter optimization, and the validation set is used for final model effect evaluation.
[0065] Step S103: input the at least one historical infrared image of the substation equipment and the annotation information into the YOLO-CCA network model for iterative training to obtain an adaptive detection model.
[0066] In this step, the model training process can be roughly divided into three stages: image feature extraction, feature fusion, and classification detection. First, in the image feature extraction stage, the backbone network will identify and extract key features from the input image, such as edges, textures, and object shapes. Next, the feature fusion stage integrates feature information at different levels and scales to enhance the model's ability to recognize objects of various sizes. Finally, in the classification detection stage, accurate classification and positioning of the target is achieved by predicting the category and bounding box position corresponding to each candidate box. During training, the number of training rounds is set to 300, the training batch is set to 8, and the learning rate is set to 0.01. After training is completed, the model will generate the corresponding weight file to prepare for subsequent verification work.
[0067] Model validation is a crucial step in the entire object detection process, evaluating the model's performance on new data. This process involves performing forward inference on the trained model to generate predictions with bounding boxes. Based on this, various evaluation metrics are calculated, such as mean average precision (mAP), precision (P), recall (R), and frames per second (FPS), to measure the model's classification and localization performance.
[0068] Step S104: input the acquired real-time infrared image of the substation equipment into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the substation equipment.
[0069] In summary, the proposed YOLO-CCA framework, a method proposed in this application, achieves both improved accuracy and efficiency in infrared image target detection through a series of improvements. First, the framework effectively reduces the number of model parameters and computational complexity by introducing lighter modules into the backbone network. While maintaining feature extraction capabilities, the model size is significantly compressed, which not only improves operational efficiency but also makes it more suitable for deployment on resource-constrained devices, meeting the edge computing needs of actual substation inspection scenarios.
[0070] To overcome the low contrast and strong background interference of infrared images, this paper introduces an attention mechanism module to strengthen the response to key areas while suppressing interference from irrelevant areas, thereby improving the contrast and detection accuracy of thermal features. Furthermore, the framework further incorporates a multi-level feature fusion mechanism into the network structure, enabling the model to better understand contextual information at different scales, significantly improving the recognition of small and large objects and enhancing overall detection robustness.
[0071] In terms of loss function design, a dynamically adjusted exponential quality focal loss (D-QFL) and a noise-robust focal loss (NR-Focal) are proposed and fused into the QF-Robust Loss to achieve joint optimization of classification and localization tasks. D-QFL dynamically adjusts the regression loss based on prediction error, providing stronger learning incentives for high-quality samples and improving the convergence and accuracy of the localization branch. NR-Focal, by introducing label confidence and regularization modulation mechanisms, places greater emphasis on low-confidence positive samples, effectively reducing the missed detection rate and enhancing the model's recognition capabilities in complex backgrounds such as blur and occlusion. Ultimately, this fused loss mechanism establishes a flexible synergistic relationship between classification and localization tasks, resolving inconsistencies in traditional object detection, such as accurate localization but incorrect classification, or high classification confidence but localization drift. This improves the model's prediction consistency, interference rejection, and detection accuracy overall. YOLO-CCA thus demonstrates strong practicality and robustness in complex power scenarios, enabling more reliable high-precision inspection of infrared substation equipment.
[0072] See also Figure 8 , which shows a structural block diagram of an infrared image adaptive detection system for complex background interference in the present application.
[0073] like Figure 8 As shown, the infrared image adaptive detection system 200 includes a construction module 210 , a labeling module 220 , a training module 230 and an output module 240 .
[0074] Among them, the construction module 210 is configured to construct a YOLO-CCA network model, and the YOLO-CCA network model includes a backbone network, a neck network, and a head network; the labeling module 220 is configured to obtain at least one historical infrared image of a substation and label the at least one historical infrared image of the substation to obtain labeling information corresponding to the at least one historical infrared image of the substation; the training module 230 is configured to input the at least one historical infrared image of the substation and the labeling information into the YOLO-CCA network model for iterative training to obtain an adaptive detection model, wherein the expression of the target loss function in the adaptive detection model is: , where is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function; the output module 240 is configured to input the acquired real-time infrared image of the substation equipment into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the substation equipment.
[0075] It should be understood that Figure 8 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects also apply to Figure 8 The modules in it will not be described in detail here.
[0076] In other embodiments, embodiments of the present invention further provide a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor is caused to execute the infrared image adaptive detection method for complex background interference in any of the above method embodiments;
[0077] As an embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0078] Constructing a YOLO-CCA network model, wherein the YOLO-CCA network model includes a backbone network, a neck network, and a head network;
[0079] Acquire at least one historical infrared image of a power substation device, and annotate the at least one historical infrared image of the power substation device to obtain annotation information corresponding to the at least one historical infrared image of the power substation device;
[0080] The at least one historical infrared image of the substation equipment and the annotation information are input into the YOLO-CCA network model for iterative training to obtain an adaptive detection model, wherein the expression of the target loss function in the adaptive detection model is:
[0081] ,
[0082] Where, is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function;
[0083] The acquired real-time infrared image of the power substation equipment is input into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the power substation equipment.
[0084] The computer-readable storage medium may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the infrared image adaptive detection system for complex background interference. Furthermore, the computer-readable storage medium may include high-speed random access memory and may also include storage, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include storage remote from the processor. Such remote storage may be connected to the infrared image adaptive detection system for complex background interference via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0085] Figure 9 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 9 As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 9 The example of a bus connection is shown. Memory 320 is the aforementioned computer-readable storage medium. Processor 310 executes the various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in memory 320, thereby implementing the aforementioned method embodiment for adaptive infrared image detection for complex background interference. Input device 330 can receive input digital or character information and generate key signal input related to user settings and function control of the adaptive infrared image detection system for complex background interference. Output device 340 can include a display device such as a display screen.
[0086] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0087] As an embodiment, the electronic device is applied to an infrared image adaptive detection system for complex background interference, and is used for a client, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0088] Constructing a YOLO-CCA network model, wherein the YOLO-CCA network model includes a backbone network, a neck network, and a head network;
[0089] Acquire at least one historical infrared image of a power substation device, and annotate the at least one historical infrared image of the power substation device to obtain annotation information corresponding to the at least one historical infrared image of the power substation device;
[0090] The at least one historical infrared image of the substation equipment and the annotation information are input into the YOLO-CCA network model for iterative training to obtain an adaptive detection model, wherein the expression of the target loss function in the adaptive detection model is:
[0091] ,
[0092] Where, is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function;
[0093] The acquired real-time infrared image of the power substation equipment is input into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the power substation equipment.
[0094] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods of each embodiment or certain portions of the embodiments.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An infrared image adaptive detection method for complex background interference, characterized in that: include: Construct a YOLO-CCA network model, which includes a backbone network, a neck network, and a head network. The expression of the target loss function in the head network is: , Where, is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function; The expression of the dynamic adjustment index quality focus loss function is: , , , Where, The logit value output by the YOLO-CCA network model, that is, the original prediction value without activation, is the sigmoid activation function, which is used to map the logit value to the [0,1] interval, where , is the true confidence label, and its value range is [0,1]. is the binary cross entropy loss function, which measures and the true label The gap between is the adaptive modulation index, is the initial modulation index, set to 1~2, It is a hyperparameter for adjusting the dynamic range, and the default value is 1. Indicates that the true label = 0 when the binary cross entropy loss, The true label represented by =0 when the modulation index; The expression of the noise robust focal loss function is: , Where, is the label confidence, , reflecting whether the label is accurate or a pseudo label, is the true category label, , 1 represents the positive class, 0 represents the negative class, is the basic weight parameter for positive samples, the default value is 1, which is used to balance the ratio of positive and negative samples. To reduce the missed detection rate adjustment parameter, the default value is 1. is the predicted probability after sigmoid activation, where , is the part where the predicted probability is consistent with the true label, ,like ,but ,like ,but , is a constant, and its value is , is the weight hyperparameter of the regularization term, z is the logit value output by the model, that is, the original prediction value without activation; The backbone network includes: a Conv convolution module and a C2MFPPC module; In the backbone network, the input image undergoes two Conv convolution module operations to reduce the image size to 160×160 with 128 channels; then, it undergoes three C2MFPPC module operations, one Conv convolution module operation, six C2MFPPC module operations, one Conv convolution module operation, three C2MFPPC module operations, one Conv convolution module operation, and three C2MFPPC module operations in sequence; The C2MFPPC module includes a Conv convolution module, a split module, and an MFPPC module. The input feature is operated by a Conv convolution module once, and then a split module is connected for channel segmentation to obtain two output features. The two features are respectively operated by the Conv convolution module and two MFPPC modules, and the features obtained by the two operations are channel stacked. Finally, the final output result is obtained by the Conv convolution module. The neck network includes: CFC attention mechanism module, SPPF spatial pyramid module, Upsample upsampling module, Concat stacking module, Conv convolution module and adaptive multi-scale feature fusion network; The CFC attention mechanism module includes a Conv convolution module, a FWA module, and a Concat channel stacking module. The input features are sequentially processed by the Conv convolution module and two FWA modules to obtain three features. The Concat channel stacking module performs channel stacking on the three features to obtain new features. The new features are processed by the Conv convolution module model to obtain the output result. Acquire at least one historical infrared image of a power substation device, and annotate the at least one historical infrared image of the power substation device to obtain annotation information corresponding to the at least one historical infrared image of the power substation device; Inputting the at least one historical infrared image of the substation equipment and the annotation information into the YOLO-CCA network model for iterative training to obtain an adaptive detection model; The acquired real-time infrared image of the power substation equipment is input into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the power substation equipment.
2. The infrared image adaptive detection method for complex background interference according to claim 1, characterized in that: In the MFPPC module, the input features undergo a spilt channel segmentation operation; The channel segmentation features are sequentially subjected to four maximum pooling operations, each followed by a Conv convolution module, BN regularization, and Mish activation function operations, to obtain four sets of output features with a channel number of C / 4. The four sets of output features are stacked to obtain new features; The new features are sequentially processed through the Conv convolution module to obtain the output results.
3. The infrared image adaptive detection method for complex background interference according to claim 1, characterized in that: In the FWA module, the input features undergo a split channel segmentation operation to obtain two features W1 and W2 with the number of channels being C / 2. The feature W1 is sequentially subjected to the Conv convolution module, BN and SiLU activation function operations to obtain the feature W3; Perform two identical Conv convolutional modules and BN operations on feature W2 to obtain features W4 and W5, and then perform a BN operation on feature W2 to obtain feature W6. Perform residual connection on features W4, W5 and W6 to obtain feature W7, and then perform attention weighting and SiLU activation function operation on feature W7 to obtain feature W8; The features W3 and W8 are stacked and operated on the Conv convolution module to obtain the final output result W9.
4. The infrared image adaptive detection method for complex background interference according to claim 1, characterized in that: In the adaptive multi-scale feature fusion network, the input feature Input is processed through a Conv convolution module to obtain feature Z1; Feature Z1 is subjected to average pooling operations with convolution kernel sizes of 3, 5, and 7, and three sets of Conv convolution module operations are performed simultaneously to obtain features Z2, Z3, and Z4; The features Z2, Z3, and Z4 are stacked to obtain the feature Z5, and a residual network is formed with the feature Z1 obtained by the first convolution to obtain the feature Z6. Channel stacking of feature Z6 and feature Z1 yields feature Z7; The feature Z7 is sequentially subjected to the Conv convolution module, BN and SELU activation function operations to obtain the final output result Z8.
5. The infrared image adaptive detection method for complex background interference according to claim 1, characterized in that: The head network includes a Detect detection head, and the Detect detection head includes a Conv convolution module, a Conv2d convolution module and the target loss function.
6. An infrared image adaptive detection system for complex background interference, characterized in that: include: A construction module is configured to construct a YOLO-CCA network model, wherein the YOLO-CCA network model includes a backbone network, a neck network, and a head network, wherein the expression of the objective loss function in the head network is: , Where, is the target loss function, is the fusion weight coefficient of the dynamic adjustment exponential quality focus loss function, To dynamically adjust the exponential quality focus loss function, is the fusion weight coefficient of the noise robust focal loss function, is a noise robust focal loss function; The expression of the dynamic adjustment index quality focus loss function is: , , , Where, The logit value output by the YOLO-CCA network model, that is, the original prediction value without activation, is the sigmoid activation function, which is used to map the logit value to the [0,1] interval, where , is the true confidence label, and its value range is [0,1]. is the binary cross entropy loss function, which measures and the true label The gap between is the adaptive modulation index, is the initial modulation index, set to 1~2, It is a hyperparameter for adjusting the dynamic range, and the default value is 1. Indicates that the true label = 0 when the binary cross entropy loss, The true label represented by =0 when the modulation index; The expression of the noise robust focal loss function is: , Where, is the label confidence, , reflecting whether the label is accurate or a pseudo label, is the true category label, , 1 represents the positive class, 0 represents the negative class, is the basic weight parameter for positive samples, the default value is 1, which is used to balance the ratio of positive and negative samples. To reduce the missed detection rate adjustment parameter, the default value is 1. is the predicted probability after sigmoid activation, where , is the part where the predicted probability is consistent with the true label, ,like ,but ,like ,but , is a constant, and its value is , is the weight hyperparameter of the regularization term, z is the logit value output by the model, that is, the original prediction value without activation; The backbone network includes: a Conv convolution module and a C2MFPPC module; In the backbone network, the input image undergoes two Conv convolution module operations to reduce the image size to 160×160 with 128 channels; then, it undergoes three C2MFPPC module operations, one Conv convolution module operation, six C2MFPPC module operations, one Conv convolution module operation, three C2MFPPC module operations, one Conv convolution module operation, and three C2MFPPC module operations in sequence; The C2MFPPC module includes a Conv convolution module, a split module, and an MFPPC module. The input feature is operated by a Conv convolution module once, and then a split module is connected for channel segmentation to obtain two output features. The two features are respectively operated by the Conv convolution module and two MFPPC modules, and the features obtained by the two operations are channel stacked. Finally, the final output result is obtained by the Conv convolution module. The neck network includes: CFC attention mechanism module, SPPF spatial pyramid module, Upsample upsampling module, Concat stacking module, Conv convolution module and adaptive multi-scale feature fusion network; The CFC attention mechanism module includes a Conv convolution module, a FWA module, and a Concat channel stacking module. The input features are sequentially processed by the Conv convolution module and two FWA modules to obtain three features. The Concat channel stacking module performs channel stacking on the three features to obtain new features. The new features are processed by the Conv convolution module model to obtain the output result. a marking module configured to obtain at least one historical infrared image of a power substation and mark the at least one historical infrared image of the power substation to obtain marking information corresponding to the at least one historical infrared image of the power substation; a training module configured to input the at least one historical infrared image of the substation equipment and the annotation information into the YOLO-CCA network model for iterative training to obtain an adaptive detection model; The output module is configured to input the acquired real-time infrared image of the substation equipment into the adaptive detection model, and the adaptive detection model outputs a detection result corresponding to the real-time infrared image of the substation equipment.
Citation Information
Patent Citations
Video action detection method based on lightweight spatio-temporal joint network
CN117475350A
Power transmission line infrared target detection method and system based on improved Yolov8
CN118071676A