A product defect detection method, device and equipment based on asynchronous gate fusion and a storage medium
By using an asynchronous parallel architecture and a learnable channel scheduling network, the problem of serial processing bottleneck and static feature mixing in industrial inspection of existing visual state space models is solved, achieving high-precision defect detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
- Filing Date
- 2026-07-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing visual state space models suffer from problems in industrial inspection, such as serial processing bottlenecks and the inability of static channel mixing mechanisms to dynamically resolve complex feature relationships, resulting in insufficient defect detection accuracy.
An asynchronous parallel architecture is adopted, and an asynchronous gating fusion module is designed to decouple spatial context analysis and dynamic feature analysis into parallel branches. A learnable channel scheduling network is introduced to dynamically learn the optimal feature channel analysis strategy and improve detection accuracy through a reciprocal advantage gating fusion mechanism.
It achieves high-precision detection of minute defects in complex backgrounds, significantly improves defect signal-to-noise separation and robustness, and adapts to the dynamic defect modes of industrial inspection.
Smart Images

Figure CN122492708A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a product defect detection method, a product defect detection device, an electronic device, and a computer-readable storage medium based on asynchronous gating fusion. Background Technology
[0002] In automated production processes, online defect detection based on visual state space models is a common quality control method. Existing visual state space model architectures generally employ a serial processing paradigm: the model alternately performs information scanning in the spatial dimension and information mixing in the feature dimension. This step-by-step architecture leads to a fragmentation of the analysis of spatial context and feature correlations, resulting in information flow delays and limiting the model's ability to perform complex spatiotemporal feature coupling within a single computational layer. Furthermore, existing feature mixing modules are static, with fixed weight parameters, which cannot handle dynamic defect patterns in industrial inspection. They lack the ability to strategically and adaptively resolve cross-channel feature dependencies based on input content, thus failing to achieve high-precision industrial inspection. Summary of the Invention
[0003] The purpose of this invention is to provide a product defect detection method, a product defect detection device, an electronic device, and a computer-readable storage medium based on asynchronous gating fusion, applicable to the field of artificial intelligence. This method improves the accuracy of defect detection by establishing an asynchronous parallel architecture of information scanning and feature mixing, and introducing a learnable channel scheduling network in the feature mixing branch to dynamically learn the optimal feature channel analysis strategy.
[0004] To address the aforementioned technical problems, this invention provides a product defect detection method based on asynchronous gating fusion, comprising: The product's image to be inspected is input into the defect detection model, and an image sequence is obtained through serialization processing. The image sequence is then input into multiple stacked asynchronous gated fusion modules. The asynchronous gated fusion module includes parallel information scanning branches and feature mixing branches. The first feature map output by the feature fusion branch and the second feature map output by the information scanning branch are fused to obtain a fused feature map; the feature fusion branch includes a learnable channel scheduling network for determining the optimal channel analysis strategy; The fused feature map output by the asynchronous gating fusion module at the tail is input into the detection head of the defect detection model to obtain the defect detection result.
[0005] Optionally, the feature mixing branch includes: a global average pooling unit, a learnable channel scheduling network, a matrix transpose unit, a first sequence scan calculation unit, and a matrix inverse transpose unit connected in sequence; The channel scheduling network is used to rearrange characteristic channels based on the optimal channel analysis strategy.
[0006] Optionally, the first feature map output by the feature mixing branch and the second feature map output by the information scanning branch are fused to obtain a fused feature map, including: The first feature map output from the feature mixing branch is input into the first gating unit to obtain the first feature gating map; The second feature map output from the information scanning branch is input into the second gating unit to obtain the second feature gating map; The first feature map and the second feature gating map are multiplied element by element to obtain the first multiplication result; The second feature map is multiplied element-wise with the first feature gating map to obtain the second multiplication result; The fused feature map is obtained by adding the first multiplication result and the second multiplication result element by element.
[0007] Optionally, the first gating unit and the second gating unit are constructed based on a fully connected layer and a softmax activation function.
[0008] Optionally, the information scanning branch includes: a forward scanning sub-branch, a reverse scanning sub-branch, and a weighted average unit; The forward scanning sub-branch includes a forward scanning unit and a second sequence scanning calculation unit, and the reverse scanning sub-branch includes a reverse scanning unit and a third sequence scanning calculation unit.
[0009] Optionally, the information scanning branch is constructed based on a selective state-space model.
[0010] Optionally, the detection head is a dense prediction head.
[0011] To address the aforementioned technical problems, this invention provides a product defect detection device based on asynchronous gating fusion, comprising: The first module is used to input the product's image to be inspected into the defect detection model, obtain an image sequence through serialization processing, and input the image sequence into multiple stacked asynchronous gated fusion modules; the asynchronous gated fusion module includes parallel information scanning branches and feature mixing branches; The second module is used to fuse the first feature map output by the feature fusion branch with the second feature map output by the information scanning branch to obtain a fused feature map; the feature fusion branch includes a learnable channel scheduling network for determining the optimal channel analysis strategy; The third module is used to input the fused feature map output by the asynchronous gating fusion module at the tail into the detection head of the defect detection model to obtain the defect detection result.
[0012] To solve the above-mentioned technical problems, the present invention provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to implement the above-described product defect detection method based on asynchronous gating fusion when executing the computer program.
[0013] To address the aforementioned technical problems, the present invention provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they implement the product defect detection method based on asynchronous gating fusion as described above.
[0014] As can be seen, the present invention inputs the product's image to be detected into a defect detection model, obtains an image sequence through serialization processing, and inputs the image sequence into multiple stacked asynchronous gated fusion modules. The asynchronous gated fusion module includes a parallel information scanning branch and a feature mixing branch. The first feature map output by the feature mixing branch and the second feature map output by the information scanning branch are fused to obtain a fused feature map. The feature mixing branch includes a learnable channel scheduling network for determining the optimal channel analysis strategy. The fused feature map output by the asynchronous gated fusion module at the end is input into the detection head of the defect detection model to obtain the defect detection result.
[0015] This invention establishes an asynchronous parallel architecture for information scanning and feature mixing, and introduces a learnable channel scheduling network in the feature mixing branch to dynamically learn the optimal feature channel analysis strategy, thereby improving the accuracy of defect detection. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 A flowchart of a product defect detection method based on asynchronous gating fusion provided in an embodiment of the present invention; Figure 2 This is a structural example diagram of a defect detection model provided in an embodiment of the present invention; Figure 3 This is an example diagram of a sequence scan calculation provided in an embodiment of the present invention; Figure 4 This is a structural example diagram of an asynchronous gating fusion module provided in an embodiment of the present invention; Figure 5 This is a structural block diagram of a product defect detection device based on asynchronous gating fusion provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] In automated production processes, especially in the manufacturing of packaging materials (such as printed cans or films), machine vision-based online defect detection is an indispensable quality control method. This type of task requires dense image prediction at extremely high production line speeds to identify minute anomalies such as color differences, missing prints, or physical damage (such as scratches) with pixel-level accuracy. The main technical challenge lies in the fact that the products themselves have high-contrast and non-repeating complex background patterns, causing minute defect signals to be easily overwhelmed by normal visual elements, resulting in an extremely low signal-to-noise ratio.
[0020] To balance global perception capability and computational efficiency, state-space models have become a key research direction. However, existing visual state-space model architectures generally employ a serial processing paradigm: the model alternately performs information scanning in the spatial dimension and information mixing in the feature dimension. This step-by-step architecture leads to the fragmentation of spatial context and feature correlation analysis, resulting in information flow delays and limiting the model's ability to perform complex spatiotemporal feature coupling within a single computational layer. More importantly, the feature mixing modules in these architectures (usually multilayer perceptrons) are essentially static, with fixed weight parameters. This cannot handle dynamic defect patterns in industrial inspection; for example, a defect may exhibit a specific dynamic correlation across multiple feature channels (e.g., signal weakening in one channel while signal strengthening in another). Existing static mixers lack the ability to strategically and adaptively resolve such cross-channel feature dependencies based on the input content, which constitutes a core technical obstacle to achieving high-precision and robust industrial inspection.
[0021] To address the fundamental problems of serial processing bottlenecks in existing state-space models and the inability of static channel mixing mechanisms to dynamically parse complex feature relationships, this invention aims to: 1. Establish an asynchronous parallel architecture: Design a novel asynchronous gating fusion module to decouple spatial context analysis and dynamic feature analysis into two parallel, independently running branches, breaking serial dependencies and improving the richness and efficiency of information processing.
[0022] 2. Achieve dynamic feature parsing: In the feature analysis branch, a channel scheduling network is introduced, which can dynamically learn an optimal feature channel analysis strategy or order based on the specific content of each input sample, thereby achieving intelligent and targeted feature parsing.
[0023] 3. Innovative Gated Fusion Mechanism: A reciprocal advantage-gated fusion mechanism is designed to replace simple feature addition. This mechanism allows the output signals of two parallel expert branches to modulate and mutually check each other, intelligently balancing spatial evidence and feature evidence, and greatly enhancing the identifiability of defect signals at the pixel level.
[0024] 4. Construct an industrial-grade backbone network: By stacking asynchronous gating fusion modules, an end-to-end visual backbone network optimized for industrial quality inspection (such as the segmentation of aluminum can surfaces) is constructed, which significantly improves the detection accuracy and robustness of minute defects in complex printing backgrounds.
[0025] The following combination Figure 1 , Figure 1 A flowchart of a product defect detection method based on asynchronous gating fusion provided in an embodiment of the present invention is included. The method may include: S101: Input the product's image to be inspected into the defect detection model, obtain an image sequence through serialization processing, and input the image sequence into multiple stacked asynchronous gated fusion modules; the asynchronous gated fusion module includes parallel information scanning branches and feature mixing branches.
[0026] The basic architecture of the defect detection model in this embodiment can be as follows: Figure 2 As shown, during the model training process, sample images can be input into the defect detection model. First, the sample images are serialized to obtain an image sequence. In the serialization process, the sample image is divided into multiple image blocks, the image blocks are converted into sequences, and then they are assembled into a long sequence.
[0027] The image sequence is input into a backbone network composed of M stacked asynchronous gated fusion modules. The feature map output by the backbone network is finally fed into a detection head (which can be a dense prediction head) to output a pixel-level defect detection map.
[0028] The asynchronous gated fusion module includes a parallel information scanning branch and a feature mixing branch. When an asynchronous gated fusion module receives an input sequence from the previous layer, it first performs an asynchronous expert parallel processing. The input sequence is copied and simultaneously input into two parallel branches with different structures and decoupled functions to achieve independent analysis of spatial context and feature association.
[0029] S102: The first feature map output by the feature fusion branch and the second feature map output by the information scanning branch are fused to obtain a fused feature map; the feature fusion branch includes a learnable channel scheduling network, which is used to determine the optimal channel analysis strategy.
[0030] The asynchronous parallel architecture of this embodiment enables spatial context learning and feature relation learning to be performed simultaneously and independently. This fundamentally eliminates the serial dependency and information bottleneck of existing state space models, allowing each layer of the network to generate richer and more decoupled feature tables.
[0031] The purpose of the feature fusion branch in this embodiment is to dynamically and strategically parse the complex relationships between different feature channel dimensions.
[0032] In this embodiment, the feature mixing branch may include a global average pooling unit, a learnable channel scheduling network, a matrix transpose unit, a first sequence scan calculation unit, and a matrix inverse transpose unit connected in sequence; the channel scheduling network is used to rearrange feature channels based on the optimal channel analysis strategy.
[0033] The feature fusion branch first feeds the input sequence into a learnable channel scheduling network. The channel scheduling network quickly analyzes the global statistics of all feature channels after global average pooling and dynamically generates an optimal channel analysis strategy for the current input sequence, such as the permutation index of the best feature analysis order. The channels of the input sequence are rearranged through the permutation index.
[0034] The channel scheduling network in this embodiment can quickly analyze the global statistics of all feature channels through operations such as global pooling, and dynamically generate an optimal feature analysis order permutation index based on the global statistics. This permutation index is then used to rearrange the channels of the input sequence. The parameters in the channel scheduling network are not fixed; during the training of the defect detection model, the parameters can be updated and learned based on the model loss, making it a learnable channel scheduling network.
[0035] The channel scheduling network enables the model to evolve from a static processor into a dynamic analyzer. The model can adaptively learn an optimal defect analysis strategy for each input image, thereby accurately locating tiny defects that conform to specific feature association patterns from complex background patterns.
[0036] For example, when detecting defects caused by specific ink stains, the model might learn to prioritize analyzing the highlight channels before analyzing the base color channels. Subsequently, the input sequence is reordered along the channel dimension according to this dynamic index.
[0037] After the channel dynamic rearrangement is completed, the matrix is transposed by the matrix transpose unit. The transposed and rearranged sequence is then subjected to a unidirectional, path-dependent sequence scan calculation by the first sequence scan calculation unit, such as... Figure 3 As shown, Figure 3 This represents the case of unidirectional computation and no channel rearrangement, where T1~T4 are sequence element indices and C1~C4 are channel indices.
[0038] Since the scanning order is strategically determined based on the content, this scan can effectively capture the unique, cross-channel feature evolution patterns of specific defects (such as the aforementioned ink contamination). After calculation, the sequence is restored to its original shape through a reverse transpose operation, forming a feature output rich in dynamic feature correlation information.
[0039] The core responsibility of the information scanning branch is to capture the global spatial dimensional structure, positional relationships, and long-distance dependencies of an image, and to perform scanning calculations along the spatial dimensions of the sequence.
[0040] The information scanning branch is constructed based on a selective state-space model. Furthermore, the sequence scanning calculation part in the feature mixing branch can also be constructed based on a selective state-space model. The advantage of the selective state-space model is that the model's state update rules are no longer fixed, but can be dynamically learned and adjusted according to the current input content, thus achieving information filtering.
[0041] For example, a bidirectional scanning mechanism can be used for two-dimensional image data. This process enables it to efficiently understand spatial context information (such as a suspected scratch appearing in the middle of the can or the alignment of the printed pattern on the left and right sides), and generate a feature output rich in spatial and structural information.
[0042] The sequential scan calculation of the selective state-space model is based on the state equation and the observation equation, as shown in the following formula: ; ; In the formula, t is the discrete time, A, B, and C are the state transition weight matrix, input weight matrix, and output weight matrix, respectively, and x t h is the input for the current time. t As the current state, h t-1 For the previous time state, y t This is the output for the current time. When the sequence scan calculation is performed from left to right (forward scan), the input for the current time is the pixel value at the current calculation position, and the output for the current time refers to the updated pixel value at the current position.
[0043] In one example, the information scanning branch may include: a forward scanning sub-branch, a reverse scanning sub-branch, and a weighted average unit; the forward scanning sub-branch includes a forward scanning unit and a second sequence scanning calculation unit, and the reverse scanning sub-branch includes a reverse scanning unit and a third sequence scanning calculation unit.
[0044] In this embodiment, the first feature map output by the feature mixing branch and the second feature map output by the information scanning branch can be fused to obtain a fused feature map.
[0045] This embodiment does not limit the specific method of feature fusion. Generally, the first feature map output from the feature mixing branch can be input into the first gating unit to obtain the first feature gating map; the second feature map output from the information scanning branch can be input into the second gating unit to obtain the second feature gating map; the first feature map and the second feature gating map can be multiplied element-wise to obtain the first multiplication result; the second feature map and the first feature gating map can be multiplied element-wise to obtain the second multiplication result; the first multiplication result and the second multiplication result can be added element-wise to obtain the fused feature map.
[0046] In this embodiment, the first gating unit and the second gating unit can be constructed based on a fully connected layer and a softmax activation function. Softmax is an activation function used for multi-class classification problems, which is used to transform the original output of the neural network into a probability distribution.
[0047] The above feature fusion process is a reciprocal advantage gating fusion mechanism proposed in this embodiment. It abandons the simple feature addition and adopts an intelligent cross-modulation arbitration mechanism, which can amplify the real defect signal that matches the spatial and feature evidence chain extremely effectively, while suppressing background pattern noise that is only spatially suspected or only feature suspected. Thus, it achieves an unprecedented defect signal-to-noise separation degree in complex printing backgrounds, which greatly improves the accuracy of dense prediction tasks.
[0048] A first feature-gated map is generated based on the first feature map, where high-value regions represent high-confidence regions after spatial context analysis. Similarly, a second feature-gated map is generated based on the second feature map, where high-value regions represent high-confidence regions after feature analysis.
[0049] The principle of the reciprocal advantage gating fusion mechanism is that the analysis result of one branch must be recognized by the other branch (i.e., a high gating value) to be amplified and retained. In industrial inspection, this means that if the feature analysis of a spatially suspected defect area also shows a strong abnormal correlation, its signal will be greatly amplified; conversely, if the feature analysis shows a normal background pattern, its signal will be effectively suppressed. Finally, the output of the asynchronous gating fusion module is sent to the next stacked asynchronous gating fusion module, repeating the above asynchronous parsing and gating fusion process. In this embodiment, the architecture of a single asynchronous gating fusion module can be as follows: Figure 4 As shown, B, L, and C represent the number of image batches, sequence length, and number of channels in the sequence, respectively.
[0050] S103: Input the fused feature map output by the asynchronous gating fusion module at the tail into the detection head of the defect detection model to obtain the defect detection result.
[0051] In this embodiment, the fused feature map output by the asynchronous gating fusion module at the tail is input into the detection head of the defect detection model to obtain the defect detection result.
[0052] The defect detection model in this embodiment is a pre-trained model. In the training process, the model loss value is calculated based on the defect detection results of the sample images, the model parameters are updated based on the model loss value, and the model is iteratively trained using the sample image dataset until a fully trained defect detection model is obtained.
[0053] The sample dataset includes sample images of products, such as printed cans or films, during the training of the defect detection model.
[0054] After the model is trained and deployed, the product image to be detected can be input into the trained defect detection model to obtain the product defect detection results output by the model.
[0055] Based on the above embodiments, the present invention establishes an asynchronous parallel architecture of information scanning and feature mixing, and introduces a learnable channel scheduling network in the feature mixing branch to dynamically learn the optimal feature channel analysis strategy and improve the accuracy of defect detection.
[0056] The following combination Figure 5 , Figure 5 This is a structural block diagram of a defect detection model training device based on asynchronous gating fusion provided in an embodiment of the present invention. The device may include: The first module 100 is used to input the product's image to be inspected into the defect detection model, obtain an image sequence through serialization processing, and input the image sequence into multiple stacked asynchronous gated fusion modules; the asynchronous gated fusion module includes parallel information scanning branches and feature mixing branches; The second module 200 is used to fuse the first feature map output by the feature fusion branch with the second feature map output by the information scanning branch to obtain a fused feature map; the feature fusion branch includes a learnable channel scheduling network, which is used to determine the optimal channel analysis strategy; The third module 300 is used to input the fused feature map output by the asynchronous gating fusion module at the tail into the detection head of the defect detection model to obtain the defect detection result.
[0057] Based on the above embodiments, the present invention establishes an asynchronous parallel architecture of information scanning and feature mixing, and introduces a learnable channel scheduling network in the feature mixing branch to dynamically learn the optimal feature channel analysis strategy and improve the accuracy of defect detection.
[0058] Based on the above embodiments, the feature mixing branch includes: a global average pooling unit, a learnable channel scheduling network, a matrix transpose unit, a first sequence scan calculation unit, and a matrix inverse transpose unit connected in sequence; The channel scheduling network is used to rearrange characteristic channels based on the optimal channel analysis strategy.
[0059] Based on the above embodiments, the second module 200 may include: The first unit is used to input the first feature map output by the feature mixing branch into the first gating unit to obtain the first feature gating map; The second unit is used to input the second feature map output from the information scanning branch into the second gating unit to obtain the second feature gating map; The third unit is used to multiply the first feature map and the second feature gating map element by element to obtain the first multiplication result; The fourth unit is used to perform element-wise multiplication of the second feature map with the first feature gating map to obtain the second multiplication result; The fifth unit is used to add the first multiplication result and the second multiplication result element by element to obtain the fused feature map.
[0060] Based on the above embodiments, the first gating unit and the second gating unit are constructed based on a fully connected layer and a softmax activation function.
[0061] Based on the above embodiments, the information scanning branch includes: a forward scanning sub-branch, a reverse scanning sub-branch, and a weighted average unit; The forward scanning sub-branch includes a forward scanning unit and a second sequence scanning calculation unit, while the reverse scanning sub-branch includes a reverse scanning unit and a third sequence scanning calculation unit.
[0062] Based on the above embodiments, the information scanning branch is constructed based on a selective state-space model.
[0063] Based on the above embodiments, the detection head is a dense prediction head.
[0064] Based on the above embodiments, the present invention also provides an electronic device, which may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the device may also include various necessary network interfaces, a power supply, and other components.
[0065] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by an execution terminal or processor, can implement the method provided in the embodiments of the present invention; the storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0066] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A product defect detection method based on asynchronous gating fusion, characterized in that, include: The product's image to be inspected is input into the defect detection model, and an image sequence is obtained through serialization processing. The image sequence is then input into multiple stacked asynchronous gated fusion modules. The asynchronous gated fusion module includes parallel information scanning branches and feature mixing branches; The first feature map output by the feature mixing branch and the second feature map output by the information scanning branch are fused to obtain a fused feature map. The feature fusion branch includes a learnable channel scheduling network for determining the optimal channel analysis strategy; The fused feature map output by the asynchronous gating fusion module at the tail is input into the detection head of the defect detection model to obtain the defect detection result.
2. The product defect detection method based on asynchronous gating fusion according to claim 1, characterized in that, The feature mixing branch includes: a global average pooling unit, a learnable channel scheduling network, a matrix transpose unit, a first sequence scan calculation unit, and a matrix inverse transpose unit connected in sequence; The channel scheduling network is used to rearrange characteristic channels based on the optimal channel analysis strategy.
3. The product defect detection method based on asynchronous gating fusion according to claim 1, characterized in that, The first feature map output by the feature mixing branch and the second feature map output by the information scanning branch are fused to obtain a fused feature map, including: The first feature map output from the feature mixing branch is input into the first gating unit to obtain the first feature gating map; The second feature map output from the information scanning branch is input into the second gating unit to obtain the second feature gating map; The first feature map and the second feature gating map are multiplied element by element to obtain the first multiplication result; The second feature map is multiplied element-wise with the first feature gating map to obtain the second multiplication result; The fused feature map is obtained by adding the first multiplication result and the second multiplication result element by element.
4. The product defect detection method based on asynchronous gating fusion according to claim 3, characterized in that, The first gating unit and the second gating unit are constructed based on a fully connected layer and a softmax activation function.
5. The product defect detection method based on asynchronous gating fusion according to claim 1, characterized in that, The information scanning branch includes: a forward scanning sub-branch, a reverse scanning sub-branch, and a weighted average unit; The forward scanning sub-branch includes a forward scanning unit and a second sequence scanning calculation unit, and the reverse scanning sub-branch includes a reverse scanning unit and a third sequence scanning calculation unit.
6. The product defect detection method based on asynchronous gating fusion according to claim 1, characterized in that, The information scanning branch is constructed based on a selective state-space model.
7. The product defect detection method based on asynchronous gating fusion according to claim 1, characterized in that, The detection head is a dense prediction head.
8. A product defect detection device based on asynchronous gating fusion, characterized in that, include: The first module is used to input the product's image to be inspected into the defect detection model, obtain an image sequence through serialization processing, and input the image sequence into multiple stacked asynchronous gated fusion modules; The asynchronous gated fusion module includes parallel information scanning branches and feature mixing branches; The second module is used to perform feature fusion between the first feature map output by the feature mixing branch and the second feature map output by the information scanning branch to obtain a fused feature map. The feature fusion branch includes a learnable channel scheduling network for determining the optimal channel analysis strategy; The third module is used to input the fused feature map output by the asynchronous gating fusion module at the tail into the detection head of the defect detection model to obtain the defect detection result.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the product defect detection method based on asynchronous gating fusion as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the product defect detection method based on asynchronous gating fusion as described in any one of claims 1 to 7.