A method for detecting electrode plate short circuit based on diffusion model

By introducing a saliency-aware feature enhancement branch and a global feature fine-tuning module in electrode plate short-circuit detection, the problems of infrared image quality and neglect of contextual background information are solved, and higher-precision electrode plate short-circuit detection is achieved.

CN119671955BActive Publication Date: 2025-09-12UNIV OF SCI & TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411705503.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-09-12
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

The existing electrode plate short circuit detection method directly uses infrared images for detection, ignoring the infrared image quality issues and contextual background information, resulting in low detection accuracy.

Method used

An electrode plate short circuit detection method based on a diffusion model is adopted. By introducing a saliency-aware feature enhancement branch and a global feature fine-tuning module, the infrared image features are enhanced using saliency map features, and global information is introduced to reduce the influence of noise and improve detection accuracy.

Benefits of technology

It effectively improves the accuracy of electrode plate short circuit detection, can learn useful contextual information from the background, and extract higher quality target features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671955B_ABST
    Figure CN119671955B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting electrode plate short circuits based on a diffusion model, belonging to the technical field of electrode plate short circuit detection. The method comprises the following steps: obtaining an infrared image and saliency map of an electrode plate to construct a sample dataset; introducing the diffusion model into electrode plate short circuit detection, adding a saliency-aware feature enhancement branch and a global feature fine-tuning module to a diffusion model-based target detection framework to construct a detection model; wherein the saliency-aware feature enhancement branch is used to enhance infrared image features by introducing saliency map features; the global feature fine-tuning module is used to fine-tune image features to obtain contextual background information related to the target; training the detection model; and using the trained model to detect the electrode plate to be detected. The present invention can extract higher-quality, richer, and more comprehensive target features, thereby improving detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrode plate short circuit detection, and in particular to an electrode plate short circuit detection method based on a diffusion model. Background Art

[0002] Object detection is a fundamental task in computer vision. Mainstream detection methods can be categorized into single-stage and two-stage methods. Single-stage methods eliminate the need for additional steps and directly obtain detection results, significantly reducing time consumption and making them widely used in scenarios requiring real-time performance. Two-stage methods first generate candidate bounding boxes using a region proposal network, then refine the candidate boxes using a detection head to obtain predicted classification and regression results. Although more time-consuming, two-stage methods offer higher accuracy. Different detection models are often used in the industrial sector based on different requirements.

[0003] The heat generated by the short circuit of the electrode plate will cause the temperature of the electrode plate to rise, which appears as a local brighter area on the infrared image, such as Figure 1 As shown. According to the severity of the short circuit, the faulty plates are divided into three categories: slight short circuit (Slightshort), general short circuit (Generalshort) and severe short circuit (Severeshort). The more severe the short circuit, the higher the brightness. The electrode plate fault detection method based on deep learning uses the mainstream detection model to analyze the infrared thermal imaging of the electrolytic cell to detect abnormal electrode plates, which greatly improves the detection efficiency and accuracy. Li et al. used an improved Faster R-CNN for faulty plate detection. This work proposed a method to generate new data to increase the amount of data, and introduced an attention mechanism to fuse potential short circuit semantic information with the synthetic data set, so that the network focuses on the short circuit target when extracting features. Zhu et al. proposed an improved NMS algorithm and a new loss function based on the Mask R-CNN model to reduce the missed detection rate of continuous faulty plates.

[0004] Although the existing electrode plate short circuit detection method has effectively improved the detection performance, it mainly focuses on enhancing data and loss functions, and ignores the following problems: 1. Infrared image quality problem. Due to the poor quality of infrared images, there is a lot of noise in the image, which is not conducive to the model to accurately and effectively extract the salient features of the target. Therefore, directly using infrared images will affect the detection results. 2. Ignoring the problem of contextual background information. The anchor box based detection method directly learns from the candidate box proposed by the region proposal network without paying attention to the contextual background information. For infrared imaging of short-circuited plates, environmental background information helps to distinguish different short-circuit faults, because the overall temperature of the electrolytic cell varies greatly but the relative relationship between the short-circuited plate and the environmental background is more stable, such as Figure 1 shown.

[0005] In summary, for the detection of electrode plate short circuits in the metal electrolytic smelting process, the existing detection methods directly use infrared images for detection and only focus on the information within the candidate boxes proposed by the region proposal network. They ignore the quality issues of infrared images and neglect contextual background information, resulting in low detection accuracy. Summary of the Invention

[0006] The present invention provides an electrode plate short circuit detection method based on a diffusion model to solve the technical problem of low detection accuracy of the existing electrode plate short circuit detection method.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In one aspect, the present invention provides an electrode plate short circuit detection method based on a diffusion model, the electrode plate short circuit detection method based on a diffusion model comprising:

[0009] Obtain the infrared image of the electrode plate and the saliency map corresponding to the infrared image to construct a sample data set;

[0010] A detection model is constructed by adding a saliency-aware feature enhancement branch and a global feature fine-tuning module to a diffusion model-based object detection framework. The saliency-aware feature enhancement branch is used to introduce saliency map features to enhance infrared image features, allowing the model to focus on salient objects, thereby extracting information focused on salient objects and reducing the impact of infrared image noise. The global feature fine-tuning module is used to introduce global information and fine-tune the image features extracted by the diffusion model backbone network to obtain contextual background information related to the object.

[0011] Training the detection model using the sample data set;

[0012] The trained detection model is used to detect the electrode plate to be tested to achieve electrode plate short circuit detection.

[0013] Furthermore, the preset diffusion model is a DiffusionDet model.

[0014] Furthermore, the entire framework of the detection model is divided into forward diffusion and backward diffusion processes; for the true target frame of a given input image, the detection model adds noise to it in the forward diffusion process to obtain a noise frame, and then reconstructs the true target frame from the noise frame through a learnable network in the backward diffusion process; in the backward diffusion process, given an infrared image and its corresponding saliency map, the model extracts infrared image features through the backbone network, and extracts saliency map features through the saliency-aware feature enhancement branch; the infrared image features and the saliency map features are added to obtain saliency-aware image features; the saliency-aware image features are then sent to RoI Align to obtain regional features; the infrared image features are also used as input to the global feature fine-tuning module, and the fine-tuned image features are obtained through the global feature fine-tuning module and sent to RoIAlign to obtain aligned image features; the sum of the regional features and the aligned image features is sent to the decoder for predicting classification and box regression.

[0015] Furthermore, the saliency map is calculated by frequency tuning method on the corresponding infrared image.

[0016] Furthermore, the saliency-aware feature enhancement branch is a ControlNet network.

[0017] Furthermore, the saliency-aware feature enhancement branch takes the saliency map as input to extract saliency map features. The input saliency map is encoded through a zero-convolution layer and then added to the infrared image as the input of the trainable replica. The output of the trainable replica is further encoded through a zero-convolution layer to obtain the saliency map features. The trainable replica is obtained by copying the backbone network and has the same structure and initialization parameters as the backbone network.

[0018] Furthermore, the global feature fine-tuning module takes the infrared image features extracted by the backbone network as input to provide contextual background information; the global feature fine-tuning module includes: a 3x3 convolution for feature smoothing, a channel attention module and a downsampling layer for extracting effective information, filtering information and unifying feature shapes, and a 3x3 zero convolution layer for preventing model influence in the early stages of training;

[0019] For the input infrared image features, the global feature fine-tuning module first processes them through a 3x3 convolution, then sends the processed infrared image features to the channel attention module and the downsampling layer in sequence to extract target-related contextual information; finally, a 3x3 zero-convolution layer is used to obtain the fine-tuned image features.

[0020] Furthermore, the training loss function of the detection model consists of classification loss and regression loss; wherein, the classification loss uses focal loss to evaluate the classification result, denoted as L cls; The regression loss uses L1 Loss and GIoU Loss to evaluate the prediction box, which are respectively denoted as L L1 and L giou ; The training loss function L is expressed as:

[0021] L=λ cls ·L cls +λ L1 ·L L1 +λ giou ·L giou

[0022] Among them, λ cls Indicates L cls The weight of λ L1 Indicates L L1 The weight of λ giou Indicates L giou The weight of .

[0023] On the other hand, the present invention further provides an electronic device, comprising a processor and a memory; wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the above method.

[0024] In yet another aspect, the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the above method.

[0025] The beneficial effects brought about by the technical solution provided by the present invention include at least:

[0026] The present invention applies a diffusion model to electrode plate short circuit detection, enabling the model to learn from rich background information and gradually learn the target from the background. A saliency-aware feature enhancement branch is designed, which introduces saliency map features through ControlNet to enhance infrared image features, allowing the model to focus on salient targets and reduce the impact of infrared image noise. A global feature fine-tuning module is further designed to introduce global information, providing regional features with richer target-related contextual background information. This enables the model to extract higher-quality, richer, and more comprehensive target features, thereby effectively improving the detection accuracy of electrode plate short circuits. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1Schematic diagram of infrared electrode plate imaging at different temperatures; (a) is the infrared imaging of the short-circuited electrode plate at a higher temperature; (b) is the infrared imaging of the short-circuited electrode plate at a lower temperature;

[0029] Figure 2 1 is a schematic diagram of an execution flow of a method for detecting an electrode plate short circuit based on a diffusion model according to an embodiment of the present invention;

[0030] Figure 3 is a framework diagram of a detection model provided by an embodiment of the present invention;

[0031] Figure 4 This is a system block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0033] First, it should be noted that in the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplarily" is intended to present concepts in a concrete manner. In addition, in the embodiments of the present invention, the meaning of "and / or" can be both or either of the two.

[0034] First embodiment

[0035] This embodiment provides a method for detecting electrode plate short circuits based on a diffusion model, which is used to detect electrode plate short circuits in the process of metal electrolytic smelting. By introducing significant information and global information, the method enables the model to focus on both significant targets and target-related contextual background information, thereby enabling the model to extract higher quality, richer and more comprehensive target features. The method can be implemented by an electronic device, which can be a terminal or a server. The execution process of the method is as follows: Figure 2 As shown, the following steps are included:

[0036] S1, obtain the infrared image of the electrode plate and the saliency map corresponding to the infrared image to construct a sample data set;

[0037] S2: A detection model is constructed by adding a saliency-aware feature enhancement branch and a global feature fine-tuning module to the diffusion model-based object detection framework. The saliency-aware feature enhancement branch is used to introduce saliency map features to enhance infrared image features, allowing the model to focus on salient objects, thereby extracting information focused on salient objects and reducing the impact of infrared image noise. The global feature fine-tuning module is used to introduce global information and fine-tune the image features extracted by the backbone network to obtain contextual background information related to the object.

[0038] S3, training the detection model using the sample data set;

[0039] S4, using the trained detection model to detect the electrode plate to be detected, to achieve electrode plate short circuit detection.

[0040] Next, combine Figure 3 , the detection model of this embodiment is described in detail.

[0041] 1. Preliminary knowledge:

[0042] 1. The diffusion model has received widespread attention since its introduction. The diffusion model iteratively adds noise to the sample data during the forward diffusion process to transform the original data distribution into a Gaussian distribution. The formula is:

[0043]

[0044] Among them, x0 is the data sample, x t is a noise sample, t∈{0,1,…,T}, β s is the noise variance table. During the training process, the training network f θ (x t ,t) from x t Predict x0. The training objective is to minimize L2 Loss:

[0045]

[0046] In the inference phase, the model iterates the back-diffusion step from the noise sample x T The data sample x0 is iteratively reconstructed in . DiffusionDet is the first model to apply the diffusion model to target detection, where the samples destroyed in the forward diffusion process and the samples reconstructed in the backward diffusion process are bounding boxes.

[0047] 2. ControlNet is an adapter method that aims to introduce additional conditions to large pre-trained text-to-image diffusion models for controllable image generation. ControlNet injects additional conditions into the blocks of the neural network. The term network block is a group of neural layers. Given an input feature map x, it will pass through a trained network block. is transformed into a new feature y:

[0048]

[0049] To add ControlNet to a pre-trained network block, the parameters θ of the original block are fixed and a trainable copy of the original block is generated with the additional condition c as input. The trainable copy and the original block are connected with a zero convolutional layer, denoted as Zero convolution is a convolution that initializes the weights and biases to zero, which can prevent noise interference in the early stages of training iterations. The complete ControlNet is represented as:

[0050]

[0051] Among them, y c is the output of ControlNet, θ z1 and θ z2 are the parameters of the two zero convolution layers, θ c represents the parameters of the trainable counterpart with additional condition c.

[0052] 2. Overall Framework

[0053] The model uses a saliency-aware feature enhancement branch to introduce a saliency map, thereby extracting information focused on salient targets and reducing the impact of infrared image noise; the global feature fine-tuning module (GFFM) is used to fine-tune the image features extracted by the backbone network to obtain contextual background information related to the target.

[0054] The entire framework is divided into forward diffusion and backward diffusion processes. Given the input ground-truth target box, the model adds noise to it during the forward diffusion process to obtain a noise box. Then, during the backward diffusion process, the ground-truth target box is reconstructed from the noise box through a learnable network. During the backward diffusion process, given an infrared image x and the corresponding saliency map s, the model extracts infrared image features and saliency map features through the backbone and saliency-aware feature enhancement branches, respectively. The two are added together to obtain saliency-aware image features. The saliency-aware image features are then fed into RoI Align to obtain regional features. The infrared image features are also used as input to the GFFM to obtain fine-tuned image features and fed into RoI Align to obtain aligned image features. The sum of the regional features and aligned image features is fed into the decoder for predicting classification and box regression.

[0055] 1. Saliency-aware feature enhancement branch

[0056] The saliency-aware feature enhancement branch corresponds to Figure 3 The upper right portion of the back-diffusion process in [1]. The saliency-aware feature enhancement branch takes the saliency map as input to extract salient features for infrared image feature enhancement. This saliency information allows the model to focus more on salient targets and ignore noise in the infrared image, thereby improving the quality of infrared image features. We employ ControlNet to introduce the saliency map as an additional condition in the feature extraction process, avoiding retraining the entire model and reducing training costs. We create a trainable copy of the backbone for saliency map feature extraction. This trainable copy has the same structure and initialization parameters as the backbone.

[0057] Specifically, the saliency map of the input image is calculated by a frequency tuning method, denoted as s. The acquisition of the saliency map is achieved by modifying the existing technology. The reference is R. Achanta, S. Hemami, F. Estrada, and S. Susstrunk, "Frequency-tuned salient region detection," in 2009 IEEE conference on computer vision and pattern recognition. IEEE, 2009, pp. 1597–1604. The modification made is to change the Euclidean distance used in calculating the saliency value of each pixel in the image to the squared Euclidean distance; where S(x, y) = || I μ -I whc (x,y)|| is the calculation formula of the significant value under Euclidean distance.

[0058] The obtained saliency map is encoded through a zero convolution layer and then added to the infrared image as the input of the trainable copy for saliency map feature extraction. Through the above steps, we obtain a 5-layer feature pyramid f sal , each level is recorded as p2, p3, p4, p5, p6. Among them, p2-p5 are respectively combined with the infrared image feature f after the zero convolution layer. img The corresponding levels are added to obtain the saliency-perceived image feature f s-img The zero convolutions connecting the features of each level are independent of each other. The infrared image feature extraction process can be defined as:

[0059]

[0060] Where x is the input infrared image, is the backbone parameterized by θ, f imgis the infrared image feature extracted by the backbone. The saliency map feature extraction part can be expressed as:

[0061]

[0062] Among them, s is the saliency map corresponding to the input infrared image x, is the i-th layer of saliency-aware image features, Denote the parameter θ c A trainable copy of and The zero-convolution layers are parameterized by θ1 and θ2, respectively. The parameters of the zero-convolution layers vary for each layer. Next, the saliency-aware image features are fed into RoIAlign to generate regional features, where the noise boxes generated by the forward diffusion process serve as candidate boxes. Based on their size, the candidate boxes are assigned to different feature layers to ensure that target features at all scales are fully learned.

[0063] 2. Global Feature Fine-tuning Module (GFFM)

[0064] Global feature fine-tuning module corresponds to Figure 3 At the bottom of the back-diffusion process in the neural network, it takes the infrared image features extracted by the backbone as input to provide contextual information. Since infrared image features contain global information of the entire image, much of it is redundant and unrelated to the target, which can adversely affect target recognition. GFFM fine-tunes the infrared image features to extract contextual information related to the target and filter out redundant information. It consists of a 3x3 convolution for feature smoothing, a channel attention module and downsampling layer for extracting valid information, filtering information, and unifying feature shapes, and a 3x3 zero-convolution layer to prevent model distortion during early training.

[0065] Specifically, given the infrared image feature f img , we fine-tune the features through a 3x3 convolution. Then we send it to the channel attention and downsampling layers to extract the context information related to the target. Finally, we get the fine-tuned image features f through a 3x3 zero convolution. i ' mg , the detailed formula of GFFM is expressed as:

[0066]

[0067] Among them, the infrared image feature f img is the input of GFFM, f i ' mg is the output of GFFM, Denote the parameter θ oThe output of the convolution operation is zero, CA is the channel attention mechanism, and DS is the downsampling layer implemented by convolution. In order to unify the shape of the features of each layer, each layer has different parameter settings.

[0068] 3. Loss Function

[0069] The training loss function consists of classification loss and regression loss. The classification loss uses focal loss to evaluate the classification results, denoted as L cls The regression loss uses L1 Loss and GIoU Loss to evaluate the prediction box, which are respectively denoted as L L1 and L giou The three losses together constitute the total loss of training, and the total loss function can be expressed as:

[0070] L=λ cls ·L cls +λ L1 ·L L1 +λ giou ·L giou

[0071] Among them, λ cls ,λ L1 ,λ giou Represent the weights of the three losses, which are used to balance the impact of each loss.

[0072] In summary, this embodiment provides an electrode plate short circuit detection method based on a diffusion model, which introduces a diffusion model into electrode plate short circuit detection, so that the model can learn useful contextual information from a rich background. In order to reduce the impact of noise in infrared images, this embodiment designs a saliency-aware feature enhancement branch, and uses ControlNet to introduce a saliency map to enhance infrared image features. In addition, this embodiment proposes a fine-tuning module GFFM to fine-tune image features to introduce contextual information around the target, thereby enhancing regional features. The method of this embodiment was evaluated on a copper electrolysis dataset. Experiments show that the method proposed in this embodiment achieves state-of-the-art performance in all types of fault categories and comprehensive indicators.

[0073] Second embodiment

[0074] This embodiment provides an electronic device, such as Figure 4 As shown, the electronic device includes: a processor and a memory; wherein the processor and the memory can be connected via a communication bus; the memory stores at least one instruction, which is loaded and executed by the processor to implement the method of the first embodiment described above. In addition, the electronic device may also include a transceiver; the processor and the transceiver can be connected via a communication bus, and the transceiver is used to communicate with other devices.

[0075] Next, combine Figure 4 A detailed introduction to the various components of the electronic device is given below:

[0076] Among them, the processor is the control center of the electronic device, and the electronic device may include multiple processors, each of which may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here can be a processor or a general term for multiple processing elements. For example, the processor is one or more central processing units (CPUs), or other general-purpose processors, application specific integrated circuits (ASICs), or one or more integrated circuits configured to implement an embodiment of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor can perform various functions of the electronic device by running or executing software programs stored in the memory and calling data stored in the memory.

[0077] In a specific implementation, as an embodiment, the processor may include one or more CPUs, such as Figure 4 The CPU0 and CPU1 shown in FIG are, of course, only exemplary.

[0078] The memory is used to store the software program for executing the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can refer to the above method embodiment and will not be repeated here.

[0079] Optionally, the memory may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be integrated with the processor or exist independently and accessed through the interface circuit ( Figure 4 (not shown) is coupled to the processor, which is not specifically limited in this embodiment of the present invention.

[0080] The transceiver may include a receiver and a transmitter ( Figure 4 The receiver is used to implement the receiving function, and the transmitter is used to implement the sending function. The transceiver can be integrated with the processor or exist independently and communicate with the electronic device through the interface circuit ( Figure 4 (not shown) is coupled to the processor, which is not specifically limited in this embodiment of the present invention.

[0081] In addition, it should be noted that Figure 4 The structure of the electronic device shown in the figure does not constitute a limitation on the device. The actual device may include more or fewer components than shown, or may combine certain components, or arrange the components differently. In addition, the technical effects achieved by the electronic device when executing the method of the first embodiment can refer to the technical effects described in the first embodiment above, and therefore will not be repeated here.

[0082] Third embodiment

[0083] This embodiment provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the method of the first embodiment described above. The computer-readable storage medium may be a ROM, random access memory, CD-ROM, magnetic tape, floppy disk, or optical data storage device. The instructions stored therein can be loaded by a processor in a terminal to execute the method described above.

[0084] Furthermore, it should be noted that the present invention may be provided as a method, apparatus, or computer program product. Therefore, embodiments of the present invention may take the form of a fully or partially hardware embodiment, a fully or partially software embodiment, or an embodiment combining software and hardware aspects. Furthermore, when implemented using software, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The computer program product comprises one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are fully or partially generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired connection (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium. The semiconductor medium may be a solid state drive.

[0085] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0086] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0087] It should also be noted that, in this document, relational terms such as first and second are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations. The terms "include," "comprises," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrase "comprising a..." does not preclude the presence of other identical elements in the process, method, article, or terminal device comprising the element. In addition, the term "and / or" is merely a description of an associative relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: the presence of A alone, the presence of A and B simultaneously, or the presence of B alone, where A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding. "At least one" means one or more, and "more" means two or more. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0088] In addition, it can be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0089] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0090] In the several embodiments provided herein, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of functional modules / units is merely a logical functional division. In actual implementation, other division methods may be used, such as multiple units or components being combined or integrated into another device, or some features being ignored or not implemented. Furthermore, the coupling or direct coupling or communication connection shown or discussed between each other may be through some interface, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs. In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0091] If the method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0092] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention. It should be noted that, although preferred embodiments of the present invention have been described, those skilled in the art, once understanding the basic inventive concepts of the present invention, may make various improvements and modifications without departing from the principles of the present invention. Such improvements and modifications should also be considered within the scope of protection of the present invention. Therefore, the appended claims are intended to be interpreted as covering the preferred embodiments and all variations and modifications that fall within the scope of the embodiments of the present invention.

Claims

1. A method for detecting short circuit of an electrode plate based on a diffusion model, characterized in that: include: Obtain the infrared image of the electrode plate and the saliency map corresponding to the infrared image to construct a sample data set; A detection model is constructed by adding a saliency-aware feature enhancement branch and a global feature fine-tuning module to a diffusion model-based object detection framework. The saliency-aware feature enhancement branch is used to introduce saliency map features to enhance infrared image features, allowing the model to focus on salient objects, thereby extracting information focused on salient objects and reducing the impact of infrared image noise. The global feature fine-tuning module is used to introduce global information and fine-tune the image features extracted by the diffusion model backbone network to obtain contextual background information related to the object. Training the detection model using the sample data set; Use the trained detection model to detect the electrode plate to be tested to achieve electrode plate short circuit detection; The entire framework of the detection model is divided into forward diffusion and backward diffusion processes; for the true target frame of a given input image, the detection model adds noise to it in the forward diffusion process to obtain a noise frame, and then reconstructs the true target frame from the noise frame through a learnable network in the backward diffusion process; in the backward diffusion process, given an infrared image and its corresponding saliency map, the model extracts infrared image features through the backbone network, and extracts saliency map features through the saliency-aware feature enhancement branch; the infrared image features and the saliency map features are added to obtain saliency-aware image features; then the saliency-aware image features are sent to RoI Align to obtain regional features; the infrared image features are also used as input to the global feature fine-tuning module, and the fine-tuned image features are obtained through the global feature fine-tuning module and sent to RoI Align to obtain aligned image features; the sum of the regional features and the aligned image features is sent to the decoder for predicting classification and frame regression; The global feature fine-tuning module takes the infrared image features extracted by the backbone network as input to provide contextual background information. The global feature fine-tuning module includes: a 3x3 convolution for feature smoothing, a channel attention module and a downsampling layer for extracting effective information, filtering information, and unifying feature shapes, and a 3x3 zero convolution layer to prevent model impact in the early stages of training. For the input infrared image features, the global feature fine-tuning module first processes them through a 3x3 convolution, then sends the processed infrared image features to the channel attention module and the downsampling layer in sequence to extract target-related contextual information; finally, a 3x3 zero-convolution layer is used to obtain the fine-tuned image features.

2. The electrode plate short circuit detection method based on the diffusion model according to claim 1, characterized in that: The target detection framework based on the diffusion model is the DiffusionDet model.

3. The electrode plate short circuit detection method based on the diffusion model according to claim 1, characterized in that: The saliency map is obtained by calculating the corresponding infrared image through a frequency tuning method.

4. The electrode plate short circuit detection method based on the diffusion model according to claim 1, characterized in that: The saliency-aware feature enhancement branch is a ControlNet network.

5. The electrode plate short circuit detection method based on the diffusion model according to claim 4, characterized in that: The saliency-aware feature enhancement branch takes the saliency map as input to extract saliency map features. The input saliency map is encoded through a zero-convolution layer and then added to the infrared image as the input of the trainable replica. The output of the trainable replica is further encoded through a zero-convolution layer to obtain the saliency map features. The trainable replica is obtained by copying the backbone network and has the same structure and initialization parameters as the backbone network.

6. The electrode plate short circuit detection method based on the diffusion model according to claim 1, characterized in that: The training loss function of the detection model consists of classification loss and regression loss; among them, the classification loss uses focal loss to evaluate the classification result, which is denoted as ; The regression loss uses L1 Loss and GIoU Loss to evaluate the prediction box, which are respectively denoted as and ; Training loss function L Expressed as: ; in, express The weight of express The weight of express The weight of .

Citation Information

Patent Citations

  • Infrared video salient target detection method based on deep learning and differential clustering

    CN116385752A

  • Infrared small target detection method and device based on data enhancement

    CN117409192A