Electrode plate short circuit detection method based on diffusion model

By introducing diffusion model, significant perceptual feature enhancement branch and global feature fine-tuning module in electrode plate short circuit detection, the problem of low accuracy of existing detection methods is solved, and higher quality feature extraction and detection performance improvement is achieved.

CN119671955AActive Publication Date: 2025-03-21UNIV OF SCI & TECH BEIJING
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing electrode plate short circuit detection method directly uses infrared images and ignores contextual background information, resulting in low detection accuracy.

Method used

Using a detection method based on diffusion model, by adding significant perception feature enhancement branches and global feature fine-tuning modules to the object detection framework, significant graph features and global information are introduced, infrared image features are enhanced, noise impact is reduced, and rich contextual background information is extracted.

Benefits of technology

The accuracy of electrode plate short circuit detection is improved, and high-quality and rich target characteristics can be extracted more effectively, thereby improving detection performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671955A_ABST
    Figure CN119671955A_ABST
Patent Text Reader

Abstract

The invention discloses an electrode plate short-circuit detection method based on a diffusion model, and belongs to the technical field of electrode plate short-circuit detection, and the method comprises the steps: obtaining an infrared image and a saliency map of an electrode plate, and constructing a sample data set; introducing the diffusion model into electrode plate short circuit detection, adding a saliency perception feature enhancement branch and a global feature fine tuning module in a target detection framework based on the diffusion model, and constructing a detection model; wherein the saliency perception feature enhancement branch is used for introducing saliency map features to enhance infrared image features; the global feature fine tuning module is used for performing fine tuning on the image features to obtain context background information related to the target; training the detection model; and detecting a to-be-detected electrode plate by using the trained model. According to the method, the target features with higher quality and richer and more comprehensive characteristics can be extracted, so that the detection precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of 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 basic task in the field of computer vision. Mainstream detection methods can be divided into single-stage detection methods and two-stage detection methods. The single-stage detection method does not require additional steps to directly obtain the detection results, which greatly saves time consumption and is widely used in scenarios that require real-time performance. The two-stage detection method first obtains the candidate box through the region proposal network, and then refines the candidate box through the detection head to obtain the predicted classification and regression results. Although it takes longer, the two-stage detection method has higher accuracy. The industrial field usually uses different detection models according to different needs.

[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 the 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. The problem of infrared image quality. 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 circuit in the process of metal electrolytic smelting, the existing detection method directly uses infrared images for detection and only focuses on the information within the candidate boxes proposed by the region proposal network, ignoring the quality problem of infrared images and ignoring the 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, and the electrode plate short circuit detection method based on a diffusion model includes:

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

[0010] A saliency-aware feature enhancement branch and a global feature fine-tuning module are added to the target detection framework based on the diffusion model to construct a detection model; wherein the saliency-aware feature enhancement branch is used to introduce saliency map features to enhance infrared image features, so that the model focuses on salient targets, thereby extracting information focused on salient targets 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 of the diffusion model to obtain contextual background information related to the target;

[0011] Using the sample data set to train the detection model;

[0012] The trained detection model is used to detect the electrode plate to be detected to realize the 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 a backbone network, and extracts saliency map features through a 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 a global feature fine-tuning module, and 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 regional features and aligned image features is sent to a decoder for predicting classification and frame 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 copy, and the output of the trainable copy is further encoded through a zero convolution layer to obtain the saliency map features; wherein the trainable copy 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 uses 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 the model from being affected in the early stage of training;

[0019] For the input infrared image features, the global feature fine-tuning module first processes them through a 3x3 convolution, and then sends the processed infrared image features to the channel attention module and the downsampling layer in turn 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, 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 at least one instruction is stored in the storage medium, 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 the diffusion model to the detection of electrode plate short circuit, so that the model can learn from the rich background information and gradually learn the target from the background. A saliency-aware feature enhancement branch is designed, and the saliency map features are introduced through ControlNet to enhance the infrared image features, so that the model focuses on the salient targets and reduces the influence of infrared image noise. At the same time, a global feature fine-tuning module is further designed to introduce global information to provide richer target-related contextual background information for regional features. 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 It is a schematic diagram of the execution flow of the electrode plate short circuit detection method based on the diffusion model provided in 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 It is a system block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0033] First of all, 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 "exemplary" 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 the concept in a concrete way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0034] First embodiment

[0035] This embodiment provides an electrode plate short circuit detection method based on a diffusion model, which is used to detect electrode plate short circuits in the process of metal electrolysis smelting. By introducing significant information and global information, the method can enable 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, and construct a sample data set;

[0037] S2, adding a saliency-aware feature enhancement branch and a global feature fine-tuning module to the diffusion model-based target detection framework to build a detection model; the saliency-aware feature enhancement branch is used to introduce saliency map features to enhance infrared image features, so that the model focuses on salient targets, thereby extracting information focused on salient targets 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 target;

[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 it was proposed. In the forward diffusion process, the diffusion model iteratively adds noise to the sample data to transform the original data distribution into a Gaussian distribution, which can be expressed in the form of:

[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 that applies 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 a 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 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 convolutional 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 alleviating 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 whole framework is divided into forward diffusion and backward diffusion processes. Given the input true target box, the model adds noise to it in the forward diffusion process to obtain a noise box, and then reconstructs the true target box from the noise box through a learnable network in the backward diffusion process. In 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 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 the input of GFFM to obtain fine-tuned image features and sent to RoI Align to obtain aligned image features. The sum of regional features and aligned image features is sent to 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 part of the back diffusion process in Fig. 2. The saliency-aware feature enhancement branch takes the saliency map as input to extract saliency features for infrared image feature enhancement. Saliency information can make the model pay more attention to salient targets and ignore the noise in infrared images, thereby improving the quality of infrared image features. We use ControlNet to introduce the saliency map as an additional condition into the feature extraction process, thereby avoiding retraining the entire model and reducing training costs. We copy 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, which is marked as s. The acquisition of the saliency map is achieved by modifying the existing technology, and 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 when 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 salient 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 as θ c A trainable copy of and They represent zero convolution layers with parameters θ1 and θ2 respectively. The parameters of zero convolution layers are different for each layer. Next, the saliency-aware image features will be fed into RoIAlign to obtain regional features, where the noise boxes obtained by the forward diffusion process will be used as candidate boxes. According to the size of the candidate boxes, they will be assigned to features of different layers to ensure that target features of all scales can be 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 network, it takes the infrared image features extracted by the backbone as input to provide contextual background information. Since the infrared image features contain global information of the entire image, most of them are redundant information irrelevant to the target, which will have a negative impact on the recognition of the target. GFFM extracts the contextual information related to the target and filters out the redundant information by fine-tuning the infrared image features. It consists of 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 the model from being affected in the early stages of 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 as θ oThe output of is zero convolution, CA is the channel attention mechanism. DS is the downsampling layer, which is 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 result, denoted as L cls The regression loss uses L1 Loss and GIoU Loss to evaluate the prediction box, 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 They 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 rich backgrounds. And 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 saliency maps 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 is evaluated on a copper electrolysis dataset. Experiments show that the method proposed in this embodiment has achieved state-of-the-art performance in various 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, and the instruction is loaded and executed by the processor to implement the method of the first embodiment. 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 The following is a detailed introduction to the various components of the electronic device:

[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 may 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 (field programmable gate arrays, FPGAs), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor may execute 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 the figure 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 types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices 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 compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the 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, and the actual device may include more or fewer components than shown in the figure, or 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 above can refer to the technical effects described in the first embodiment above, so they are not repeated here.

[0082] Third embodiment

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

[0084] In addition, it should be noted that the present invention can be provided as a method, an apparatus or a computer program product. Therefore, the embodiment of the present invention can be in the form of a full or partial hardware embodiment, a full or partial software embodiment or an embodiment combining software and hardware. Moreover, when implemented using software, the embodiment of the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center containing one or more available media sets. 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 hard disk.

[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 processes 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 capable of directing 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, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0087] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements. In addition, the term "and / or" is only an association relationship describing the associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, wherein 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 "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single 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 plural.

[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. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0090] In several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of functional modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one 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, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a 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 is only a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiment of the present invention has been described, for ordinary technicians in this technical field, once the basic creative concept of the present invention is known, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes 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 an infrared image of the electrode plate and a saliency map corresponding to the infrared image to construct a sample data set; A saliency-aware feature enhancement branch and a global feature fine-tuning module are added to the target detection framework based on the diffusion model to construct a detection model; wherein the saliency-aware feature enhancement branch is used to introduce saliency map features to enhance infrared image features, so that the model focuses on salient targets, thereby extracting information focused on salient targets 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 of the diffusion model to obtain contextual background information related to the target; Using the sample data set to train the detection model; The trained detection model is used to detect the electrode plate to be detected to realize the electrode plate short circuit detection.

2. The electrode plate short circuit detection method based on diffusion model as claimed in 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 diffusion model as claimed in claim 2, characterized in that: 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 a backbone network, and extracts saliency map features through a 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 RoIAlign to obtain regional features; the infrared image features are also used as input to a 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 a decoder for predicting classification and frame regression.

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

5. The electrode plate short circuit detection method based on diffusion model as claimed in claim 3, characterized in that: The saliency-aware feature enhancement branch is a ControlNet network.

6. The electrode plate short circuit detection method based on diffusion model as claimed in claim 5, 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 copy, and the output of the trainable copy is further encoded through a zero convolution layer to obtain the saliency map features; wherein the trainable copy is obtained by copying the backbone network, and has the same structure and initialization parameters as the backbone network.

7. The electrode plate short circuit detection method based on diffusion model as claimed in claim 3, characterized in that: 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 the model from being affected in the early stage of training; For the input infrared image features, the global feature fine-tuning module first processes them through a 3x3 convolution, and then sends the processed infrared image features to the channel attention module and the downsampling layer in turn to extract target-related contextual information; finally, a 3x3 zero convolution layer is used to obtain the fine-tuned image features.

8. The electrode plate short circuit detection method based on diffusion model as claimed in claim 1, characterized in that: The training loss function of the detection model consists of classification loss and regression loss; the classification loss uses focal loss to evaluate the classification result, denoted by L cls ; The regression loss uses L1 Loss and GIoU Loss to evaluate the prediction box, denoted as L L1 and L giou ; The training loss function L is expressed as: L=λ cls ·L cls +λ L1 ·L L1 +λ giou ·L giou Among them, λ cls Indicates L cls The weight of L1 Indicates L L1 The weight of giou Indicates L giou 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

  • Remote sensing image saliency target detection method based on conditional diffusion model

    CN118015297A

  • Fan blade defect detection method and system based on improved SSD model

    WO2023173598A1