Belt tearing detection method and system based on dual vision state space model

Through the belt tear detection method of the dual visual state space model, the image downsampling and background interference problems are solved, the detection accuracy and calculation efficiency are improved, and the early small object detection of belt tear is achieved.

CN119006434AActive Publication Date: 2024-11-22UNIV OF SCI & TECH BEIJING

Patent Information

Application Number
CN202411201826.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-22
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

The existing belt tear small target defect detection methods have problems such as information loss, complex background interference and high computing resource consumption, which are difficult to achieve efficient and accurate early small target detection.

Method used

Using the belt tear detection method based on the dual visual state space model, through image serialization, dual visual state space feature extraction, multi-scale feature fusion and dual-branch object detection output modules, downsampling is omitted, global and local features are extracted, and detection is improved. Accuracy and reduce computational complexity.

Benefits of technology

It improves the detection accuracy of early small target defects in complex backgrounds, reduces computing resource occupation, and achieves more accurate and efficient detection of early small target defects in belt tear, which is suitable for industrial manufacturing and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006434A_ABST
    Figure CN119006434A_ABST
Patent Text Reader

Abstract

The invention discloses a belt tearing detection method and system based on a dual visual state space model, and the method comprises the steps: inputting a to-be-detected belt surface image into a trained belt tearing image defect detection backbone network, the backbone network is composed of an image serialization module, a dual visual state space belt tearing image feature extraction network, a multi-scale feature fusion module and a dual-branch target detection output module. The image serialization module serializes the image and outputs an image sequence and an image micro sequence; extracting global semantic category information and local detail information of a belt tearing small target defect by using a double visual state space belt tearing image feature extraction network; the multi-scale feature fusion module is used for carrying out multi-scale feature fusion to obtain image fusion features of three sizes; and the double-branch target detection output module uses two branches to perform target identification and classification tasks respectively, and outputs a final target detection result. The belt tearing detection device can accurately detect belt tearing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of belt tear detection, and in particular to a belt tear detection method and system based on a dual visual state space model. Background Art

[0002] In the scenario of industrial automation, the stable operation of the belt transport system is a key factor in ensuring the continuity of the production process. However, the tearing of the belt due to factors such as material aging, overload, and foreign matter may not only interrupt the production process, but also cause irreversible damage to the equipment and may even trigger safety accidents. These tears tend to become more serious with use. Therefore, timely and effective detection and maintenance of early minor defects can effectively reduce the occurrence of the above-mentioned equipment damage and safety accidents. Therefore, the development of an efficient and accurate belt tear small target defect detection technology to accurately identify and detect early defects on the belt surface is of vital importance to ensure production safety and stable equipment operation.

[0003] Traditional methods for detecting small target defects such as belt tearing mainly rely on manual inspection and physical sensors. Although manual inspection is intuitive, its efficiency and accuracy are limited for small target defects due to factors such as human concentration and vision, and there are safety hazards. Although physical sensors can monitor belts in real time in principle, they have strict requirements on the installation location and environment, requiring high maintenance costs. In addition, if the sensor signal processing is not accurate enough, environmental disturbances will seriously affect the early detection of small target defects.

[0004] In recent years, with the rapid development of deep learning technology, belt tear small target defect detection methods based on image processing technology have gradually been widely studied and applied. Deep learning models can automatically extract rich semantic features from images through training and learning, and use these features to achieve a variety of downstream tasks, such as target detection, semantic segmentation, etc. However, the current mainstream deep learning algorithms still have limitations in high-resolution belt tear early small target defect detection:

[0005] First, in terms of small target feature extraction, existing methods often downsample belt tear images, resulting in serious loss of image information, especially local small target information is seriously lost during the downsampling process;

[0006] Then, affected by the running scene of the belt, the collected belt tear images often have a complex image background, which contains a large number of background objects such as scratches, textures, water stains, spots, etc. that are similar to the early small target defects. These background interferences make the small target detection have a high missed detection rate.

[0007] Finally, to use the early small target detection technology for belt tearing for real-time online detection, computing resource consumption and model reasoning efficiency are also important considerations. When modeling long sequences, the existing Transformer model is limited by the computing principles of the core self-attention mechanism. There are two major problems during model reasoning: large computing resource consumption and high computational complexity, which makes it difficult to implement. Summary of the invention

[0008] The present invention provides a belt tear detection method and system based on a dual visual state space model to solve the problems existing in the above-mentioned prior art. The technical solution is as follows:

[0009] On the one hand, a belt tear detection method based on a dual visual state space model is provided, comprising:

[0010] S1, obtaining the surface image of the belt to be detected;

[0011] S2, inputting the belt surface image to be detected into the trained belt tear image defect detection backbone network, detecting and outputting the target detection result, wherein the belt tear image defect detection backbone network is composed of an image serialization module, a dual visual state space belt tear image feature extraction network, a multi-scale feature fusion module and a dual-branch target detection output module;

[0012] The image serialization module serializes the belt surface image to be detected and outputs an image sequence and an image microsequence;

[0013] The dual visual state space belt tear image feature extraction network uses a dual visual state space feature extraction module to extract global semantic category information and local detail information of the belt tear small target defect;

[0014] The multi-scale feature fusion module uses a feature pyramid structure based on a visual state space feature extraction module to perform multi-scale feature fusion to obtain image fusion features of three sizes;

[0015] The dual-branch target detection output module uses two branches and utilizes the image fusion features of the three sizes to perform target recognition and classification tasks respectively, and outputs the final target detection result.

[0016] Optionally, the image serialization module first slices the belt surface image to be detected into blocks to obtain a plurality of image blocks;

[0017] Then, each image block is locally cut into blocks to obtain multiple local image blocks;

[0018] Then, the sliced ​​image blocks and the local image blocks are converted into two image sequence pairs, namely, an image sequence and an image microsequence, by using a convolution down sampling operation. Both the image sequence and the image microsequence are discrete two-dimensional image sequences.

[0019] Optionally, the dual vision state space belt tear image feature extraction network uses the dual vision state space feature extraction module to extract global semantic category information and local detail information of belt tear small target defects in four stages, and the four stages use N1, N2, N3, and N4 dual vision state space feature extraction modules cascaded respectively, and downsampling is performed using convolution with a step size of 2 in different stages to reduce the image feature size, and obtain image fusion features F1, F2, F3, and F4 of four sizes respectively, and the sizes are in the relationship of two times downsampling, among which F1 is not used to generate target detection results subsequently because it contains more noise information; downsampling effectively filters out invalid information in the feature map of the previous stage through continuous parameter iteration in the training stage, reduces the amount of calculation, and does not lose effective image features;

[0020] The local detail information extracted by the dual vision state space feature extraction module does not directly participate in the output of the target detection result. Instead, the local detail information is integrated into the image fusion feature through feature fusion in the dual vision state space feature extraction module, thereby indirectly playing a role in accurately detecting the output result.

[0021] Optionally, the first dual visual state space feature extraction module in the dual visual state space feature extraction module takes the image sequence and the image micro-sequence as input, first uses a local visual state space branch composed of visual state space feature extraction modules to extract local image features within the image micro-sequence, and performs feature fusion with the input image sequence by addition, and then sends the fused sequence features to another global visual state space branch composed of visual state space feature extraction modules to extract long-distance global semantic category information between image sequences, and at the same time models the relationship between the global features of the image sequence and the local features of the image micro-sequence to obtain image fusion features, and sends the image local features extracted by the local visual state space branch and the image fusion features extracted by the global visual state space branch to the second cascaded dual visual state space feature extraction module to continue extracting deeper image features.

[0022] Optionally, the visual state space feature extraction module is responsible for modeling discrete two-dimensional image sequences and obtaining the relationship between sequences. When the discrete two-dimensional image sequences are used as input, in addition to the front and back sequences, there are positional relationships in four directions, namely, up, down, left, and right, between the image sequences. According to the cross-scanning method in four different directions, all image matrices composed of several image sequences are rearranged to form four long image sequences composed of image sequences. Each long image sequence is then sent to the visual state space feature extraction module to extract the corresponding semantic information in the sequence to obtain four feature sequences. The four feature sequences are added and averaged to obtain a new image matrix, and then the new image matrix is ​​flattened into a one-dimensional vector to obtain a serialized image vector.

[0023] Among them, the visual state space feature extraction module extracts image features from each long image sequence through layer normalization, linear layer, activation function, depthwise separable convolution, discrete state space model, and layer normalization operations in sequence, and then multiplies the image features with the weight matrix obtained by the other branch of the long image sequence through the linear layer and the activation function, and then passes the multiplication result through a linear layer to obtain an image feature sequence, introduces a residual connection, and adds the image feature sequence to the long image sequence to obtain the feature sequence.

[0024] Optionally, the discrete state space model takes pixel intensity, edge, texture, color histogram, object position, shape or motion as states, which are quantized into discrete values ​​to form a state space, and intermediate implicit states are introduced to extract features in the image. Through discretized state transfer and observation processes, the complex dynamic and semantic relationships in the image sequence are accurately modeled.

[0025] Optionally, the multi-scale feature fusion module fuses the features of the current layer and the previous layer layer by layer through two paths, top-down and bottom-up, to generate a new feature map, and uses a feature pyramid structure based on the visual state space feature extraction module to fuse the extracted feature map to generate a new feature map;

[0026] Among them, top-down means that the image fusion feature F4 with the smallest size is upsampled to expand the resolution, and then spliced ​​with F3 like F3, and the spliced ​​features are sent to the visual state space feature extraction module to fuse the features of two different scales, and the fused features are upsampled and spliced ​​with F2 of a larger size, and the spliced ​​features are sent to the visual state space feature extraction module to fuse the features of two different scales, and obtain the multi-scale fusion feature P2;

[0027] For bottom-up fusion, P2 is downsampled to the same size as F3, and then concatenated with the corresponding features in top-down fusion, and sent to the visual state space feature extraction module to fuse the features of two different scales to obtain the multi-scale fusion feature P3;

[0028] P3 is downsampled to the same size as F4, and then concatenated with the corresponding features in the top-down fusion, and sent to the visual state space feature extraction module to fuse the features of two different scales to obtain the multi-scale fusion feature P4.

[0029] Optionally, the dual-branch target detection output module adjusts the feature map dimension by upsampling the multi-scale fusion features P2, P3, and P4 to the original image size and concatenating them followed by a 1×1 convolution;

[0030] Then, the classification task branch consists of 2 3×3 convolutions and 1 1×1 convolution. Assuming the image size is H×W, C is the number of target detection categories, and outputs the classification result of H×W×C;

[0031] The target recognition branch consists of two 3×3 convolutions and two 1×1 convolutions. The two 1×1 convolutions are used to output H×W×4 position detection results and H×W×1 intersection-over-union scores respectively.

[0032] And the final output format is (c o ,x o ,y o ,h o ,w o ), where subscript o represents output, c represents defect category number, (x, y) represents the center point coordinates of the target detection box, and (h, w) represents the height and width of the target detection box.

[0033] Optionally, the method splits the belt tearing small target detection task into two tasks: a classification task and a rectangular box regression task. The loss function consists of a classification task loss function and a rectangular box regression task loss function. The classification task loss function is a binary cross entropy loss function. The rectangular box regression task loss function consists of a distribution focus loss function and a complete intersection-over-union loss function. These three loss functions are weighted in proportion to form the loss function, which is used to supervise the learning process of the model.

[0034] The binary cross entropy loss function is used to judge the quality of the classification model prediction results by calculating the difference between the category prediction probability and the category label. The specific formula is as follows:

[0035]

[0036] Among them, y icrepresents the cth label of the i-th sample output by the model, p ic Represents the probability that the output belongs to the label, and N represents the number of groups of objects predicted by the model;

[0037] The distribution focus loss function can be used to allow the network to quickly focus on the value near the label, making the probability density at the label as large as possible. The calculation is based on the KL divergence, which is used to compare the difference between the predicted distribution and the true distribution. For each predicted bounding box, the true category and the predicted category are encoded as distribution vectors respectively. The KL divergence between the two distribution vectors is calculated to judge the quality of the model output. Assume that the distribution probability of the predicted bounding box position is p0, p1, ..., p n , then for each true bounding box position y, find the two predicted bounding box positions y closest to y i and i+1 , and then calculate the probability p corresponding to these two positions i and p i+1 The loss of all these positions is accumulated to get the final DFL loss. The specific formula is as follows:

[0038] DFL_Loss(p i ,p i+1 )=-((y i+1 -y)log(p i )+(yy i )log(p i+1 ))

[0039] Among them, p i and p i+1 is the distribution probability of the two predicted bounding box positions output by the model, y is the position of the true bounding box, and y i and i+1 represents the predicted bounding box position closest to y;

[0040] The intersection-over-union (IoU) ratio is a way to describe the overlap between the predicted bounding box and the true bounding box of target detection. The IoU ratio between the predicted bounding box and the true bounding box is used to measure the degree of regression of the box. The complete IoU loss function is based on this principle and adds two metrics: the consistency of the center point distance and the aspect ratio. The relative position information and shape difference between the predicted bounding box and the detected bounding box are used to judge the fitting of the model output rectangular box. The specific formula is as follows:

[0041]

[0042] Among them, ρ 2 (b,b gt) represents the Euclidean distance between the center points of the predicted bounding box and the true bounding box, d represents the diagonal length of the minimum closed area that can contain both the predicted bounding box and the true bounding box, w and h represent the width and height of the predicted bounding box, respectively. gt and h gt Represent the width and height of the real bounding box respectively;

[0043] Finally, the total loss function is the weighted sum of the above three loss functions. The specific formula is as follows:

[0044] Loss = w bce BCE_Loss+w dfl DFL_Loss+w ciou CIoU_Loss

[0045] Among them, w bce 、w dfl 、w ciou Represent the corresponding weights respectively.

[0046] On the other hand, a belt tear detection system based on a dual visual state space model is provided, the system comprising:

[0047] An acquisition module, used for acquiring the surface image of the belt to be detected;

[0048] A detection module is used to input the belt surface image to be detected into a trained belt tear image defect detection backbone network, and detect and output a target detection result. The belt tear image defect detection backbone network consists of an image serialization module, a dual visual state space belt tear image feature extraction network, a multi-scale feature fusion module, and a dual-branch target detection output module;

[0049] The image serialization module serializes the belt surface image to be detected and outputs an image sequence and an image microsequence;

[0050] The dual visual state space belt tear image feature extraction network uses a dual visual state space feature extraction module to extract global semantic category information and local detail information of the belt tear small target defect;

[0051] The multi-scale feature fusion module uses a feature pyramid structure based on a visual state space feature extraction module to perform multi-scale feature fusion to obtain image fusion features of three sizes;

[0052] The dual-branch target detection output module uses two branches and utilizes the image fusion features of the three sizes to perform target recognition and classification tasks respectively, and outputs the final target detection result.

[0053] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the above-mentioned belt tear detection method based on the dual visual state space model.

[0054] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned belt tear detection method based on the dual visual state space model.

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

[0056] The present invention improves the deep learning framework of the visual state space model and proposes a belt tear small target defect detection technology based on a dual visual state space model. The technology omits the image downsampling process and avoids the information loss of high-resolution belt tear image processing. The feature extraction means of global, local feature fusion and multi-scale feature fusion are used to improve the detection accuracy of the model for early small target defects in complex belt backgrounds, and the state space modeling method with linear complexity is used to ensure high reasoning efficiency. That is, the present invention comprehensively considers the deficiencies of the existing technology in small target feature extraction, anti-interference and on-site deployment, and provides a more accurate and efficient belt tear early small target defect detection method and system, which is suitable for industrial manufacturing, mining transportation, power generation, port logistics and other fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] 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.

[0058] Figure 1 It is a flow chart of a belt tear detection method based on a dual visual state space model provided by an embodiment of the present invention;

[0059] Figure 2 is a general flow chart of a belt tear detection method provided by an embodiment of the present invention;

[0060] Figure 3 is a flowchart of data set preparation provided by an embodiment of the present invention;

[0061] Figure 4 It is an image serialization module and a dual visual state space belt tear image feature extraction network structure diagram provided by an embodiment of the present invention;

[0062] Figure 5 is a structural diagram of a dual visual state space feature extraction module provided by an embodiment of the present invention;

[0063] Figure 6 It is a schematic diagram of visual state space branch scanning provided by an embodiment of the present invention, local branch (upper - image micro sequence / local feature sequence), global branch (lower - image sequence / fused feature sequence);

[0064] Figure 7 is a structural diagram of a visual state space feature extraction module provided by an embodiment of the present invention;

[0065] Figure 8 It is a multi-scale feature fusion structure diagram of a feature pyramid structure based on a visual state space feature extraction module provided by an embodiment of the present invention;

[0066] Fig. 9 is a structural diagram of a dual-branch target detection output module provided by an embodiment of the present invention;

[0067] Fig.10 It is a block diagram of a belt tear detection system based on a dual visual state space model provided by an embodiment of the present invention;

[0068] Fig.11 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0070] The embodiment of the present invention provides a belt tear detection method based on a dual visual state space model, which can be implemented by an electronic device, which can be a terminal or a server. Figure 1 The flowchart of a belt tear detection method based on a dual visual state space model is shown. The processing flow of the method may include the following steps:

[0071] S1, obtaining the surface image of the belt to be detected;

[0072] S2, inputting the belt surface image to be detected into the trained belt tear image defect detection backbone network, detecting and outputting the target detection result, wherein the belt tear image defect detection backbone network is composed of an image serialization module, a dual visual state space belt tear image feature extraction network, a multi-scale feature fusion module and a dual-branch target detection output module;

[0073] The image serialization module serializes the belt surface image to be detected and outputs an image sequence and an image microsequence;

[0074] The dual visual state space belt tear image feature extraction network uses a dual visual state space feature extraction module to extract global semantic category information and local detail information of the belt tear small target defect;

[0075] The multi-scale feature fusion module uses a feature pyramid structure based on a visual state space feature extraction module to perform multi-scale feature fusion to obtain image fusion features of three sizes;

[0076] The dual-branch target detection output module uses two branches and utilizes the image fusion features of the three sizes to perform target recognition and classification tasks respectively, and outputs the final target detection result.

[0077] The embodiment of the present invention provides a belt tear detection method based on a dual visual state space model. First, in view of the problem of missing small target defect features caused by image downsampling in the prior art, the technical solution of the embodiment of the present invention removes the downsampling operation to retain the original features of the image, and designs a local state space feature extraction branch, so that the model can more effectively extract local detail features that are crucial to small target defect detection; secondly, in view of the background target interference problem under complex backgrounds, the technical solution of the embodiment of the present invention uses a global visual state space branch to model the global information between long image sequences, fuse the above local features, establish the relationship between global and local features, and combine the feature pyramid structure based on the visual state space feature extraction module to perform multi-scale feature fusion to enhance the image content understanding ability of the model; finally, in view of the problem of difficult deployment due to computational complexity and computational efficiency in the prior art, the technical solution of the embodiment of the present invention utilizes the linear computational complexity and parallel computing capability of the state space model to enable the model to meet the requirements of real-time and resource occupancy in practical applications, such as Figure 2 As shown, the following is the complete technical solution:

[0078] S1, obtaining the surface image of the belt to be detected;

[0079] In the belt working scene, the embodiment of the present invention uses a 2048-resolution linear array camera (the image acquisition resolution is 2048×1) to capture the image of the running belt, and takes 2000 consecutive frames to form a 2048×2000 high-resolution belt tear image to be detected.

[0080] S2, inputting the belt surface image to be detected into the trained belt tear image defect detection backbone network, detecting and outputting the target detection result, wherein the belt tear image defect detection backbone network is composed of an image serialization module, a dual visual state space belt tear image feature extraction network, a multi-scale feature fusion module and a dual-branch target detection output module;

[0081] The image serialization module serializes the belt surface image to be detected and outputs an image sequence and an image microsequence;

[0082] The dual visual state space belt tear image feature extraction network uses a dual visual state space feature extraction module to extract global semantic category information and local detail information of the belt tear small target defect;

[0083] The multi-scale feature fusion module uses a feature pyramid structure based on a visual state space feature extraction module to perform multi-scale feature fusion to obtain image fusion features of three sizes;

[0084] The dual-branch target detection output module uses two branches and utilizes the image fusion features of the three sizes to perform target recognition and classification tasks respectively, and outputs the final target detection result.

[0085] The training of the belt tear image defect detection backbone network in the embodiment of the present invention is performed using the image data in the training set, such as Figure 3 As shown, including:

[0086] 1) Belt tearing image data collection.

[0087] In the belt working scene, a 2048-resolution linear array camera (with an image acquisition resolution of 2048×1) is used to capture images of the running belt. 2000 consecutive frames are taken to form a 2048×2000 high-resolution belt tear image. In this way, multiple 2048×2000 high-resolution belt tear images are formed. The defective and non-defective images are screened and a data set is constructed according to a certain ratio.

[0088] 2) Labeling of belt tearing image data.

[0089] The defects in the collected images are divided into C different defect categories according to different shape, texture features and severity. The belt images are annotated using the label img tool. The annotation format uses the YOLO target detection annotation format (c t ,x t ,y t ,h t ,w t ), where subscript t represents the true value of the label, c represents the defect category number in the range of [0,C), (x,y) represents the center coordinates of the target detection box, (h,w) represents the height and width of the target detection box, x±w / 2 should be in the range of 0 to 2048, y±h / 2 should be in the range of 0 to 2000, and the output is stored in txt format.

[0090] 3) Belt tear detection dataset division.

[0091] The image-label pairs with and without defects are divided into training set and validation set in a ratio of 4:1 respectively, and the defective and non-defective parts are merged together to form the training set and validation set of the final belt tear detection dataset. The training set is used for model training, and the validation set is used to evaluate the performance of the model training process. Finally, the optimal weight on the validation set is selected for model reasoning and application.

[0092] 4) Image preprocessing of belt tear detection dataset.

[0093] All image-label pairs are augmented by random horizontal mirror flipping, random scale scaling, random size cropping, contrast enhancement, etc. to expand the training data set to obtain input images and labels; and additional data augmentation is performed for some defects with small sample sizes to balance the quantity.

[0094] In order to subsequently extract global features and local features (the visual state space feature extraction module can only process serialized data), the embodiment of the present invention needs to perform a block serialization operation on the image, and use the convolution down-sampling operation to convert the block-cut image blocks and local image blocks into image sequences and image micro-sequences respectively, and send the generated image sequence pairs into the dual visual state space belt tearing image feature extraction network.

[0095] Alternatively, if Figure 4 As shown, the image serialization module first cuts the belt surface image to be detected into blocks to obtain multiple image blocks;

[0096] Then, each image block is locally cut into blocks to obtain multiple local image blocks;

[0097] Then, the sliced ​​image blocks and the local image blocks are converted into two image sequence pairs, namely, an image sequence and an image microsequence, by using a convolution down sampling operation. Both the image sequence and the image microsequence are discrete two-dimensional image sequences.

[0098] Alternatively, if Figure 4As shown, the dual vision state space belt tear image feature extraction network uses the dual vision state space feature extraction module to extract the global semantic category information and local detail information of the belt tear small target defect in four stages. The four stages use N1, N2, N3, and N4 dual vision state space feature extraction modules in cascade, and down-sampling is performed in different stages using convolution with a step size of 2 to reduce the image feature size, and obtain image fusion features F1, F2, F3, and F4 of four sizes (and also obtain image local features L1, L2, L3, and L4 of four sizes), and the sizes are in the relationship of two times down-sampling, among which F1 is not used to generate target detection results later because it contains more noise information; down-sampling effectively filters out invalid information in the feature map of the previous stage through continuous parameter iteration in the training stage, reduces the amount of calculation, and does not lose effective image features;

[0099] The local detail information extracted by the dual vision state space feature extraction module does not directly participate in the output of the target detection result. Instead, the local detail information is integrated into the image fusion feature through feature fusion in the dual vision state space feature extraction module, thereby indirectly playing a role in accurately detecting the output result.

[0100] The state space model is a mathematical model that describes the behavior of a dynamic system. It uses a set of first-order differential equations (continuous time system) or difference equations (discrete time system) to represent the evolution of the internal state of the system, and uses another set of equations to describe the relationship between the system state and the output. The state space model has also been widely used in the field of vision due to its high model efficiency, less GPU memory usage and better long-range dependency modeling capabilities. In the field of image processing, image sequences (feature sequences) are regarded as different states, and the model extracts image feature information by learning the conversion relationship between such states. However, directly using the state space model for early small target defect detection of belt tearing will lead to inaccurate positioning or even missed detection due to its less exploration of local features (which are very important for early small target defect detection). In an embodiment of the present invention, in order to utilize the advantages of the state space model in the field of belt tearing small target defect detection, a dual visual state space feature extraction module is proposed to replace the visual state space module in the current visual state space model, so that it can obtain the global features between image sequences while utilizing the long-range modeling capabilities of the state space model, and can also obtain the local detail features between pixels in the image sequence.

[0101] Optionally, the first dual visual state space feature extraction module in the dual visual state space feature extraction module is as follows: Figure 5As shown, the image sequence and the image micro-sequence are taken as input, and first a local visual state space branch composed of a visual state space feature extraction module is used to extract the local image features within the image micro-sequence, and the features are fused with the input image sequence by addition, and then the fused sequence features are sent to another global visual state space branch composed of a visual state space feature extraction module to extract the long-distance global semantic category information between the image sequences, and at the same time, the relationship between the global features of the image sequence and the local features of the image micro-sequence is modeled to obtain the image fusion features, and the image local features extracted by the local visual state space branch and the image fusion features extracted by the global visual state space branch are sent to the second cascaded dual visual state space feature extraction module to continue to extract deeper image features.

[0102] Optionally, the visual state space feature extraction module is responsible for modeling discrete two-dimensional image sequences and obtaining the relationship between sequences. When the discrete two-dimensional image sequences are used as input, in addition to the front and back sequences, there are positional relationships in four directions: up, down, left, and right. For example, Figure 6 As shown, the embodiment of the present invention rearranges all image matrices composed of a number of image sequences according to a cross-scanning method in four different directions (state space modeling was originally used in natural language image processing, and there is only temporal information between the front and rear sequences, so semantics can be modeled only by scanning from front to back once in sequence), forming four long image sequences composed of image sequences, and then each long image sequence is respectively sent to the visual state space feature extraction module to extract the corresponding semantic information in the sequence to obtain four feature sequences, and the four feature sequences are added and averaged to obtain a new image matrix, and then the new image matrix is ​​flattened into a one-dimensional vector to obtain a serialized image vector;

[0103] By adopting this complementary traversal path, the model is able to integrate information from all other pixels in different directions for each pixel in the image.

[0104] Among them, Figure 7 As shown, the visual state space feature extraction module extracts image features from each long image sequence in turn through layer standardization, linear layer, activation function, depthwise separable convolution, discrete state space model, and layer standardization operations, and then multiplies the image features with the weight matrix obtained through the linear layer and activation function of another branch of the long image sequence, and then passes the multiplication result through a linear layer to obtain an image feature sequence, introduces a residual connection (in order to increase the stability of model training), and adds the image feature sequence to the long image sequence to obtain the feature sequence.

[0105] State space models are usually applied to continuous systems. However, in the belt tearing small target detection task, the data obtained through the above steps are discrete serialized images or features. Therefore, the embodiment of the present invention uses a discrete state space model to model the image sequence.

[0106] Optionally, the discrete state space model takes pixel intensity, edge, texture, color histogram, object position, shape or motion as states, which are quantized into discrete values ​​to form a state space, and intermediate implicit states are introduced to extract features in the image. Through discretized state transfer and observation processes, the complex dynamic and semantic relationships in the image sequence are accurately modeled.

[0107] Compared with the existing modeling method based on the self-attention mechanism, discrete state space modeling also has the advantage of linear complexity. Combined with parallel computing design, it can achieve higher accuracy while having faster reasoning speed.

[0108] Alternatively, if Figure 8 As shown, the multi-scale feature fusion module fuses the features of the current layer and the previous layer layer by layer through two paths, top-down and bottom-up, to generate a new feature map, and uses a feature pyramid structure based on the visual state space feature extraction module (different from the design of the traditional pyramid feature fusion module using convolution) to fuse the extracted feature maps to generate a new feature map;

[0109] Among them, top-down means that the image fusion feature F4 with the smallest size is upsampled to expand the resolution, and then spliced ​​with F3 like F3, and the spliced ​​features are sent to the visual state space feature extraction module to fuse the features of two different scales, and the fused features are upsampled and spliced ​​with F2 of a larger size, and the spliced ​​features are sent to the visual state space feature extraction module to fuse the features of two different scales, and obtain the multi-scale fusion feature P2;

[0110] For bottom-up fusion, P2 is downsampled to the same size as F3, and then concatenated with the corresponding features in top-down fusion, and sent to the visual state space feature extraction module to fuse the features of two different scales to obtain the multi-scale fusion feature P3;

[0111] P3 is downsampled to the same size as F4, and then concatenated with the corresponding features in the top-down fusion, and sent to the visual state space feature extraction module to fuse the features of two different scales to obtain the multi-scale fusion feature P4.

[0112] Alternatively, if Fig. 9 As shown, the dual-branch target detection output module adjusts the feature map dimension by upsampling the multi-scale fusion features P2, P3, and P4 to the original image size and concatenating them followed by a 1×1 convolution;

[0113] Then, the classification task branch consists of 2 3×3 convolutions and 1 1×1 convolution. Assuming the image size is H×W, C is the number of target detection categories, and outputs the classification result of H×W×C;

[0114] The target recognition branch consists of two 3×3 convolutions and two 1×1 convolutions. The two 1×1 convolutions are used to output H×W×4 position detection results and H×W×1 intersection-over-union scores respectively.

[0115] And the final output format is (c o ,x o ,y o ,h o ,w o ), where subscript o represents output, c represents defect category number, (x, y) represents the center point coordinates of the target detection box, and (h, w) represents the height and width of the target detection box.

[0116] This design allows each part of the model to focus on its specific task, which can improve classification accuracy and detection precision.

[0117] Optionally, the method splits the belt tearing small target detection task into two tasks: a classification task and a rectangular box regression task. The loss function consists of a classification task loss function and a rectangular box regression task loss function. The classification task loss function is a binary cross entropy loss function. The rectangular box regression task loss function consists of a distribution focus loss function and a complete intersection-over-union loss function. These three loss functions are weighted in proportion to form the loss function, which is used to supervise the learning process of the model.

[0118] Among them, the binary cross entropy loss function is to judge the quality of the classification model prediction result by calculating the difference between the category prediction probability and the category label (for the case where the label is 1, if the predicted value is close to 1, then the value of the loss function should be close to 0; conversely, if the predicted value is close to 0 at this time, then the value of the loss function is very large). The specific formula is as follows:

[0119]

[0120] Among them, y ic represents the cth label of the i-th sample output by the model, p ic Represents the probability that the output belongs to the label, and N represents the number of groups of objects predicted by the model;

[0121] The distribution focus loss function can be used to allow the network to quickly focus on the value near the label, making the probability density at the label as large as possible. The calculation is based on the KL divergence, which is used to compare the difference between the predicted distribution and the true distribution. For each predicted bounding box, the true category and the predicted category are encoded as distribution vectors respectively. The KL divergence between the two distribution vectors is calculated to judge the quality of the model output. Assume that the distribution probability of the predicted bounding box position is p0, p1, ..., p n , then for each true bounding box position y, find the two predicted bounding box positions y closest to y i and i+1 , and then calculate the probability p corresponding to these two positions i and p i+1 The loss of all these positions is accumulated to get the final DFL loss. The specific formula is as follows:

[0122] DFL_Loss(p i ,p i+1 )=-((y i+1 -y)log(p i )+(yy i )log(p i+1 ))

[0123] Among them, p i and p i+1 is the distribution probability of the two predicted bounding box positions output by the model, y is the position of the true bounding box, and y i and i+1 represents the predicted bounding box position closest to y;

[0124] The intersection-over-union (IoU) ratio is a way to describe the overlap between the predicted bounding box and the true bounding box of target detection. The IoU ratio between the predicted bounding box and the true bounding box is used to measure the degree of regression of the box. The complete IoU loss function is based on this principle and adds two metrics: the consistency of the center point distance and the aspect ratio. The relative position information and shape difference between the predicted bounding box and the detected bounding box are used to judge the fitting of the model output rectangular box. The specific formula is as follows:

[0125]

[0126] Among them, ρ 2 (b,b gt ) represents the Euclidean distance between the center points of the predicted bounding box and the true bounding box, d represents the diagonal length of the minimum closed area that can contain both the predicted bounding box and the true bounding box, w and h represent the width and height of the predicted bounding box, respectively. gt and h gt Represent the width and height of the real bounding box respectively;

[0127] Finally, the total loss function is the weighted sum of the above three loss functions. The specific formula is as follows:

[0128] Loss = w bce BCE_Loss+w dfl DFL_Loss+w ciou CIoU_Loss

[0129] Among them, w bce 、w dfl 、w ciou Respectively represent the corresponding weights (range 0 to 1).

[0130] like Fig.10 As shown, an embodiment of the present invention further provides a belt tear detection system based on a dual visual state space model, the system comprising:

[0131] An acquisition module 1010 is used to acquire a surface image of a belt to be detected;

[0132] A detection module 1020 is used to input the belt surface image to be detected into a trained belt tear image defect detection backbone network, and detect and output a target detection result. The belt tear image defect detection backbone network is composed of an image serialization module 10201, a dual visual state space belt tear image feature extraction network 10202, a multi-scale feature fusion module 10203 and a dual-branch target detection output module 10204;

[0133] The image serialization module 10201 serializes the belt surface image to be detected and outputs an image sequence and an image microsequence;

[0134] The dual vision state space belt tear image feature extraction network 10202 uses a dual vision state space feature extraction module to extract global semantic category information and local detail information of the belt tear small target defect;

[0135] The multi-scale feature fusion module 10203 uses a feature pyramid structure based on a visual state space feature extraction module to perform multi-scale feature fusion to obtain image fusion features of three sizes;

[0136] The dual-branch target detection output module 10204 uses two branches and utilizes the image fusion features of the three sizes to perform target recognition and classification tasks respectively, and outputs the final target detection result.

[0137] An embodiment of the present invention provides a belt tear detection system based on a dual visual state space model, and its functional structure corresponds to a belt tear detection method based on a dual visual state space model provided by an embodiment of the present invention, which will not be described in detail here.

[0138] Fig.11 It is a structural schematic diagram of an electronic device 1100 provided in an embodiment of the present invention. The electronic device 1100 may have relatively large differences due to different configurations or performances, and may include one or more processors (centra lprocessing in its, CPU) 1101 and one or more memories 1102, wherein at least one instruction is stored in the memory 302, and the at least one instruction is loaded and executed by the processor 1101 to implement the steps of the above-mentioned belt tear detection method based on the dual visual state space model.

[0139] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, which can be executed by a processor in a terminal to complete the belt tear detection method based on the dual visual state space model. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0140] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0141] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A belt tear detection method based on a dual visual state space model, characterized in that: The method comprises: S1, obtaining the surface image of the belt to be detected; S2, inputting the belt surface image to be detected into the trained belt tear image defect detection backbone network, detecting and outputting the target detection result, wherein the belt tear image defect detection backbone network is composed of an image serialization module, a dual visual state space belt tear image feature extraction network, a multi-scale feature fusion module and a dual-branch target detection output module; The image serialization module serializes the belt surface image to be detected and outputs an image sequence and an image microsequence; The dual visual state space belt tear image feature extraction network uses a dual visual state space feature extraction module to extract global semantic category information and local detail information of the belt tear small target defect; The multi-scale feature fusion module uses a feature pyramid structure based on a visual state space feature extraction module to perform multi-scale feature fusion to obtain image fusion features of three sizes; The dual-branch target detection output module uses two branches and utilizes the image fusion features of the three sizes to perform target recognition and classification tasks respectively, and outputs the final target detection result.

2. The method according to claim 1, characterized in that The image serialization module first slices the belt surface image to be detected into blocks to obtain a plurality of image blocks; Then, each image block is locally cut into blocks to obtain multiple local image blocks; Then, the sliced ​​image blocks and the local image blocks are converted into two image sequence pairs, namely, an image sequence and an image microsequence, by using a convolution down sampling operation. Both the image sequence and the image microsequence are discrete two-dimensional image sequences.

3. The method according to claim 1, characterized in that: The dual vision state space belt tear image feature extraction network uses the dual vision state space feature extraction module to extract the global semantic category information and local detail information of the belt tear small target defect in four stages. The four stages use N1, N2, N3, and N4 dual vision state space feature extraction modules in cascade, and down-sample using convolution with a step size of 2 in different stages to reduce the image feature size, and obtain image fusion features F1, F2, F3, and F4 of four sizes, respectively, and the sizes are two times the down-sampling relationship, among which F1 is not used to generate target detection results later because it contains more noise information; down-sampling is through continuous parameter iteration in the training stage, effectively filtering out invalid information in the feature map of the previous stage, reducing the amount of calculation, and will not lose effective image features; The local detail information extracted by the dual vision state space feature extraction module does not directly participate in the output of the target detection result. Instead, the local detail information is integrated into the image fusion feature through feature fusion in the dual vision state space feature extraction module, thereby indirectly playing a role in accurately detecting the output result.

4. The method according to claim 1, characterized in that: The first dual visual state space feature extraction module in the dual visual state space feature extraction module takes the image sequence and the image micro-sequence as input, first uses a local visual state space branch composed of visual state space feature extraction modules to extract the local image features inside the image micro-sequence, and performs feature fusion with the input image sequence by addition, and then sends the fused sequence features to another global visual state space branch composed of visual state space feature extraction modules to extract long-distance global semantic category information between image sequences, and at the same time models the relationship between the global features of the image sequence and the local features of the image micro-sequence to obtain image fusion features, and sends the image local features extracted by the local visual state space branch and the image fusion features extracted by the global visual state space branch to the second cascaded dual visual state space feature extraction module to continue to extract deeper image features.

5. The method according to claim 4, characterized in that The visual state space feature extraction module is responsible for modeling discrete two-dimensional image sequences and obtaining the relationship between sequences. When the discrete two-dimensional image sequence is used as input, in addition to the front and back sequences, there are positional relationships in four directions, namely, up, down, left, and right, between the image sequences. According to the cross-scanning method in four different directions, all image matrices composed of several image sequences are rearranged to form four long image sequences composed of image sequences. Each long image sequence is then sent to the visual state space feature extraction module to extract the corresponding semantic information in the sequence to obtain four feature sequences. The four feature sequences are added and averaged to obtain a new image matrix, and then the new image matrix is ​​flattened into a one-dimensional vector to obtain a serialized image vector. Among them, the visual state space feature extraction module extracts image features from each long image sequence through layer normalization, linear layer, activation function, depthwise separable convolution, discrete state space model, and layer normalization operations in sequence, and then multiplies the image features with the weight matrix obtained by the other branch of the long image sequence through the linear layer and the activation function, and then passes the multiplication result through a linear layer to obtain an image feature sequence, introduces a residual connection, and adds the image feature sequence to the long image sequence to obtain the feature sequence.

6. The method according to claim 5, characterized in that The discrete state space model takes pixel intensity, edge, texture, color histogram, object position, shape or motion as states. These states are quantified into discrete values ​​to form a state space. Intermediate implicit states are introduced to extract features in the image. Through discretized state transfer and observation processes, the complex dynamic and semantic relationships in the image sequence are accurately modeled.

7. The method according to claim 3, characterized in that The multi-scale feature fusion module fuses the features of the current layer and the previous layer layer by layer through two paths, top-down and bottom-up, to generate a new feature map, and uses the feature pyramid structure based on the visual state space feature extraction module to fuse the extracted feature map to generate a new feature map; Among them, top-down means that the image fusion feature F4 with the smallest size is upsampled to expand the resolution, and then spliced ​​with F3 like F3, and the spliced ​​features are sent to the visual state space feature extraction module to fuse the features of two different scales, and the fused features are upsampled and spliced ​​with F2 of a larger size, and the spliced ​​features are sent to the visual state space feature extraction module to fuse the features of two different scales, and obtain the multi-scale fusion feature P2; For bottom-up fusion, P2 is downsampled to the same size as F3, and then concatenated with the corresponding features in top-down fusion, and sent to the visual state space feature extraction module to fuse the features of two different scales to obtain the multi-scale fusion feature P3; P3 is downsampled to the same size as F4, and then concatenated with the corresponding features in the top-down fusion, and sent to the visual state space feature extraction module to fuse the features of two different scales to obtain the multi-scale fusion feature P4.

8. The method according to claim 1, characterized in that: The dual-branch target detection output module adjusts the feature map dimension by upsampling the multi-scale fusion features P2, P3, and P4 to the original image size and concatenating them followed by a 1×1 convolution; Then, the classification task branch consists of 2 3×3 convolutions and 1 1×1 convolution. Assuming the image size is H×W, C is the number of target detection categories, and outputs the classification result of H×W×C; The target recognition branch consists of two 3×3 convolutions and two 1×1 convolutions. The two 1×1 convolutions are used to output H×W×4 position detection results and H×W×1 intersection-over-union scores respectively. And the final output format is (c o ,x o ,y o ,h o ,w o ), where subscript o represents output, c represents defect category number, (x, y) represents the center point coordinates of the target detection box, and (h, w) represents the height and width of the target detection box.

9. The method according to claim 1, characterized in that: The method splits the belt tearing small target detection task into two tasks: a classification task and a rectangular box regression task. The loss function consists of a classification task loss function and a rectangular box regression task loss function. The classification task loss function is a binary cross entropy loss function. The rectangular box regression task loss function consists of a distribution focus loss function and a complete intersection-over-union loss function. These three loss functions are weighted proportionally to form the loss function, which is used to supervise the learning process of the model. The binary cross entropy loss function is used to judge the quality of the classification model prediction results by calculating the difference between the category prediction probability and the category label. The specific formula is as follows: Among them, y ic represents the cth label of the i-th sample output by the model, p ic Represents the probability that the output belongs to the label, and N represents the number of groups of objects predicted by the model; The distribution focus loss function can be used to allow the network to quickly focus on the value near the label, making the probability density at the label as large as possible. The calculation is based on the KL divergence, which is used to compare the difference between the predicted distribution and the true distribution. For each predicted bounding box, the true category and the predicted category are encoded as distribution vectors respectively. The KL divergence between the two distribution vectors is calculated to judge the quality of the model output. Assume that the distribution probability of the predicted bounding box position is p0, p1, ..., p n , then for each true bounding box position y, find the two predicted bounding box positions y closest to y i and i+1 , and then calculate the probability p corresponding to these two positions i and p i+1 The loss of all these positions is accumulated to get the final DFL loss. The specific formula is as follows: DFL_Loss(p i ,p i+1 )=-((y i+1 -y)log(p i )+(y-y i )log(p i+1 )) Among them, p i and p i+1 is the distribution probability of the two predicted bounding box positions output by the model, y is the position of the true bounding box, and y i and i+1 represents the predicted bounding box position closest to y; The intersection-over-union (IoU) ratio is a way to describe the overlap between the predicted bounding box and the true bounding box of target detection. The IoU ratio between the predicted bounding box and the true bounding box is used to measure the degree of regression of the box. The complete IoU loss function is based on this principle and adds two metrics: the consistency of the center point distance and the aspect ratio. The relative position information and shape difference between the predicted bounding box and the detected bounding box are used to judge the fitting of the model output rectangular box. The specific formula is as follows: Among them, ρ 2 (b,b gt ) represents the Euclidean distance between the center points of the predicted bounding box and the true bounding box, d represents the diagonal length of the minimum closed area that can contain both the predicted bounding box and the true bounding box, w and h represent the width and height of the predicted bounding box, respectively. gt and h gt Represent the width and height of the real bounding box respectively; Finally, the total loss function is the weighted sum of the above three loss functions. The specific formula is as follows: Loss=w bce BCE_Loss+w dfl DFL_Loss+w ciou CIoU_Loss Among them, w bce 、w dfl 、w ciou Represent the corresponding weights respectively.

10. A belt tear detection system based on a dual visual state space model, characterized in that: The system comprises: An acquisition module, used for acquiring the surface image of the belt to be detected; A detection module is used to input the belt surface image to be detected into a trained belt tear image defect detection backbone network, and detect and output a target detection result. The belt tear image defect detection backbone network consists of an image serialization module, a dual visual state space belt tear image feature extraction network, a multi-scale feature fusion module, and a dual-branch target detection output module; The image serialization module serializes the belt surface image to be detected and outputs an image sequence and an image microsequence; The dual visual state space belt tear image feature extraction network uses a dual visual state space feature extraction module to extract global semantic category information and local detail information of the belt tear small target defect; The multi-scale feature fusion module uses a feature pyramid structure based on a visual state space feature extraction module to perform multi-scale feature fusion to obtain image fusion features of three sizes; The dual-branch target detection output module uses two branches and utilizes the image fusion features of the three sizes to perform target recognition and classification tasks respectively, and outputs the final target detection result.

Citation Information

Patent Citations

  • Surface defect detection method based on multi-scale information fusion

    CN113610822A

  • Infrared small target detection method based on YOLOv4 multi-scale feature fusion

    CN115546502A

  • Metal diaphragm surface defect detection method based on cross feature fusion

    CN116452556A

  • Mobile remote sensing image acquisition method and road maintenance monitoring method

    CN116958825A

  • Remote sensing image ship small target detection method and system

    CN117789030A

Cited By

  • High-resolution large-scale forest biomass remote sensing prediction method and system

    CN119323736A

  • Target re-identification method and device, medium and product

    CN119380006A

  • Novel mining belt tearing segmentation model and degree detection method

    CN119850585A

  • A new mining belt tearing segmentation model and degree detection method

    CN119850585B

  • Mini-LED surface defect detection method and related device

    CN119919395A