Industrial image recognition method and system based on mamba and conv

By combining Mamba and Conv in industrial image recognition, a deep fusion of local and global features is achieved, solving the problems of high computational complexity and high resource requirements in existing technologies. This improves recognition efficiency and adaptability, making it suitable for real-time high-precision recognition in low-computing-power environments.

CN120953264BActive Publication Date: 2026-02-27QINGDAO UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511459306.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-02-27
Estimated Expiration
2045-10-13

AI Technical Summary

Technical Problem

Existing hybrid architectures in industrial image recognition suffer from problems such as global computational redundancy, quadratic expansion of memory and computing power with resolution, failure to deeply integrate local and long-range dependencies, and increased latency due to multi-scale iterative decoding, making it difficult to achieve real-time high-precision recognition on low-computing-power devices.

Method used

An industrial image recognition method based on Mamba and Conv is adopted. By combining local convolutional branches and state space branches, and using a gating mechanism to dynamically adjust the importance of features, a deep fusion of local and global features is achieved, reducing computational complexity and improving recognition efficiency.

Benefits of technology

It improves the feature representation integrity and resource friendliness of industrial image recognition, reduces the requirements for video memory and computing power under high-resolution input, has strong adaptability, supports rapid migration and deployment, and meets the real-time high-precision recognition needs of low computing power environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953264B_ABST
    Figure CN120953264B_ABST
Patent Text Reader

Abstract

The application discloses an industrial image recognition method and system based on Mamba and Conv, and relates to the technical field of image recognition.The method steps comprise: acquiring an industrial image to be detected; and recognizing the industrial image to be detected by using an image recognition network, wherein a preliminary feature extraction module composed of Conv is used to extract preliminary features of the industrial image to be detected, then a deep feature extraction module composed of Mamba and Conv is used to further extract local features and global features according to the preliminary features, the local features and the global features are fused to obtain fused features, and finally a classifier is used to classify the image according to the fused features.The application can effectively solve the problems of the prior art, such as insufficient capture of local details, limited modeling ability of long-distance dependence, and higher demand for computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, and particularly relates to an industrial image recognition method and system based on Mamba and Conv. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute prior art.

[0003] Current deep learning-based image recognition methods usually extract multi-scale features from input images by designing CNN modules, Transformer modules, Mamba, Transformer, and CNN combined modules, and then concatenate a classifier network after the feature extraction module to realize image classification. However, the existing technology still has the following deficiencies in practical application:

[0004] First, although the traditional convolutional neural network (CNN) has good spatial local perception ability in local feature extraction and can effectively capture local texture information in images, its receptive field is limited and it is not good at modeling long-distance dependencies. When dealing with complex scenes or tasks with strong global context dependencies, CNN often needs to stack a large number of convolutional layers to expand the receptive field, which not only leads to complex network structure, significant increase in parameter quantity and computational overhead, but also easily causes problems such as gradient vanishing, slow training convergence, and reduces the training efficiency and inference performance of the model.

[0005] Second, the visual model based on Transformer realizes the modeling of long-distance dependencies in the feature space through the self-attention mechanism, and improves the modeling ability of global information, which shows high recognition accuracy in large-scale visual tasks. However, the pure Transformer architecture calculates the mutual relationship of input features globally, and the computational complexity and input resolution grow in square, which leads to significant computational resource and memory overhead in high-resolution image or large-scale data scenarios, making it difficult to efficiently deploy on resource-constrained terminal devices.

[0006] In view of the above problems, in recent years, hybrid structures combining Mamba and Transformer, Conv and Transformer, and Mamba and Conv have appeared. Among them, the schemes combining Mamba and Transformer and Conv and Transformer can reduce the redundancy of pure self-attention calculation to a certain extent and reduce part of the calculation amount by introducing local convolution or state space units before and after the global modeling module, but the overall calculation complexity is still high due to the retention of the explicit modeling process of global features, and it is difficult to meet the rapid reasoning demand in low-power environments. The method combining Mamba and Conv mostly adopts a simple module series connection or stacking manner, and fails to realize deep fusion of local and long sequence dependent information, so it is difficult to fully exert the efficient long-distance information capture advantage of the state space model and the local feature extraction capability of the convolution, resulting in insufficient overall feature extraction and expression capability, which limits the application effect and deployment efficiency in complex image scenes.

[0007] Some existing researches use a Transformer-Mamba hybrid encoder to fuse the shallow semantic feature information and the deep semantic feature information of the feature map, and use multiple stacked decoders to decode the features output by the encoder to obtain a feature sequence, and input the feature sequence into a prediction head for prediction. However, the hybrid encoder needs to iteratively process multi-scale feature maps, and the overall complexity is increased after stacking the decoders, so the calculation overhead is too high, and it is difficult to meet the real-time requirement in a low-power environment.

[0008] In summary, the existing hybrid structure has the defects of global calculation redundancy, memory and power consumption increasing with the square of the resolution, local and long-range dependence failing to be deeply fused, multi-scale iterative decoding aggravating the delay, and the like, and it is difficult to realize real-time high-precision recognition in a low-power end. SUMMARY

[0009] In view of the deficiencies of the prior art, the purpose of the present application is to provide an industrial image recognition method and system based on Mamba and Conv, to realize deep fusion of local and global features, to accurately capture local textures by the convolution branch, to efficiently model long sequences or global context by the Mamba branch, and to dynamically adjust the importance of the two kinds of features through a gating mechanism, thereby effectively solving the problems of insufficient local detail capture, limited long-distance dependence modeling capability, and high demand for computing resources in the prior art.

[0010] In order to achieve the above purpose, the present application is realized by the following technical solutions:

[0011] The first aspect of the present application provides an industrial image recognition method based on Mamba and Conv, comprising the following steps:

[0012] obtaining an industrial image to be detected;

[0013] recognizing the industrial image to be detected by using an image recognition network, wherein a preliminary feature extraction module composed of a Conv is used to extract preliminary features of the industrial image to be detected, then a deep feature extraction module composed of a Mamba and a Conv is used to further extract local features and global features according to the preliminary features, and the local features and the global features are fused to obtain fused features, and finally a classifier is used to classify the image according to the fused features.

[0014] Further, the preliminary feature extraction module includes two Conv2D modules of the same structure connected in sequence, and the deep feature extraction module includes two MambaConv Mixer modules of the same structure connected in sequence.

[0015] Further, the Conv2D module includes a Conv2D layer, a batch normalization layer and a ReLU activation function layer.

[0016] Further, the MambaConv Mixer module includes a MambaConv Mixer structure for residual connection and a feature deep layer expression module, the feature deep layer expression module is used for further adjusting and optimizing the extracted features, the MambaConv Mixer structure includes four modules: a Mamba-based global feature extraction module, a Conv-based local feature extraction module, a Gate calculation module and a global and local feature fusion module, wherein the global feature is extracted by using the Mamba-based global feature extraction module, the local feature is extracted by using the Conv-based local feature extraction module, the extracted features are assigned weights by using the Gate calculation module, and the global feature and the local feature are fused by using the global and local feature fusion module.

[0017] Further, after the preliminary feature extraction module extracts the preliminary features of the industrial image to be detected, the preliminary features are divided into two parts and input into the Mamba-based global feature extraction module and the Conv-based local feature extraction module, respectively.

[0018] Further, the specific steps of extracting the global feature by using the Mamba-based global feature extraction module are as follows:

[0019] extracting image texture features of the preliminary features and changing the image dimension;

[0020] modeling long-range dependencies of the features with the changed image dimension by using a state space model to obtain preliminary global features;

[0021] The dimension of the preliminary global feature is restored to obtain the final global feature.

[0022] Further, the specific steps of assigning weights to the extracted features by the Gate calculation module are as follows:

[0023] The global feature and the local feature are respectively subjected to average pooling operation and then spliced to obtain spliced features.

[0024] The spliced features are normalized to obtain the calculated Gate value, and the corresponding feature weight is assigned according to the Gate value.

[0025] The second aspect of the present application provides an industrial image recognition system based on Mamba and Conv, comprising:

[0026] The data acquisition module is configured to acquire the industrial image to be detected.

[0027] The data processing module is configured to recognize the industrial image to be detected by using the image recognition network, wherein the preliminary feature of the industrial image to be detected is first extracted by using the preliminary feature extraction module composed of Conv, then the local feature and the global feature are further extracted according to the preliminary feature by using the deep feature extraction module composed of Mamba and Conv, the local feature and the global feature are fused to obtain the fused feature, and finally the image is classified according to the fused feature by using the classifier.

[0028] The third aspect of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is suitable for being loaded and executed by a processor, and the steps in the industrial image recognition method based on Mamba and Conv according to the first aspect of the present application are executed.

[0029] The fourth aspect of the present application provides a computer device, comprising:

[0030] The processor is suitable for executing the computer program.

[0031] The computer readable storage medium stores the computer program, and the computer program is executed by the processor to realize the industrial image recognition method based on Mamba and Conv according to the first aspect of the present application.

[0032] The present application discloses an industrial image recognition method and system based on Mamba and Conv, and the technical scheme has the following beneficial effects:

[0033] 1. This invention combines local convolutional branches with Mamba state space branches and uses a gating mechanism to weight the outputs of both as needed. It can automatically adjust the ratio of local to global information according to the characteristics of the input scene, so that the network has a better ability to take into account local details and global contextual relationships, and improves the completeness of industrial image recognition in expressing multi-scale features.

[0034] 2. Compared to the Transformer architecture, which relies solely on self-attention for global modeling, this invention introduces a state-space module into the Mamba branch to recursively model long sequence dependencies, reducing computational complexity from quadratic to linear. Simultaneously, by using convolutional branches to handle local information capture, it avoids the global branch's simultaneous global scan of all spatial locations, reducing the demand for GPU memory and computing power under high-resolution input. This results in lower inference speed and computational resource consumption under the same conditions, offering better resource friendliness and deployment feasibility.

[0035] 3. The MambaCNN network proposed in this invention adopts a parallel dual-branch design with low coupling, clear structure, and strong adaptability. The feature dimension, number of layers, and gating weight configuration of the convolutional branch and state space branch can be flexibly adjusted according to specific application scenarios, making it easy to integrate into visual backbone networks of different sizes. It also supports rapid migration and use in industrial image classification vision tasks, reducing the network redesign and debugging cycle.

[0036] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a flowchart of the industrial image recognition method based on Mamba and Conv in Embodiment 1 of the present invention;

[0039] Figure 2 This is a diagram showing the overall architecture of the MambaConv Mixer in Embodiment 1 of the present invention. Detailed Implementation

[0040] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0041] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It is to be understood that the terms "comprising," "including," and "having" can be used interchangeably. It is to be understood that where the application is described or claimed in enabled dependencies, alternative applications also can include other enabled dependencies.

[0042] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present application.

[0043] Embodiment one:

[0044] The embodiment one of the present application provides an industrial image recognition method based on Mamba and Conv, designs a MambaCNN network to improve the precision and calculation efficiency of industrial image recognition, reduces the hardware deployment threshold, and has better universality and scalability. The MambaCNN network realizes synchronous and efficient extraction of local detail information and global dependent features in the same network structure through efficient parallel coupling of a local convolution branch and a state space module combined with an adaptive gating mechanism. Specifically, it includes two Conv2D modules, two MambaConv Mixer modules and a classifier connected in turn. The Conv2D module is used to change the feature map size and extract the preliminary features of the image. The MambaConv Mixer module is used to change the feature map size, extract local features and global features, and fuse them. The classifier is used for image classification of the fused features of the image. The collected industrial image is input into the MambaCNN network to realize image classification, and the image classification result is obtained.

[0045] As shown in Figure 1 , the method specifically comprises the following steps:

[0046] Step 1: Obtain an industrial image to be detected.

[0047] In this embodiment, the MambaCNN network is preferably applied to image recognition tasks with macroscopic geometric features (such as the number of gear teeth and the distribution of shaft holes), such as for part type identification. Therefore, the acquired industrial image to be detected is the industrial image of the corresponding device in the required task.

[0048] Step 2: Use an image recognition network to identify the industrial image to be detected.

[0049] Step 2.1: First, use the preliminary feature extraction module composed of Conv to extract the preliminary features of the industrial image to be detected.

[0050] In one specific implementation, the preliminary feature extraction module includes two identical Conv2D modules connected in sequence. The Conv2D modules are used to change the feature map size and extract preliminary features of the image. The Conv2D module contains a Conv2D layer, a batch normalization layer (BN layer), and a ReLU activation function layer.

[0051] Step 2.2: Then, the deep feature extraction module composed of Mamba and Conv is used to further extract local and global features based on the preliminary features, and the local and global features are fused to obtain fused features.

[0052] In one specific implementation, the deep feature extraction module includes two MambaConv Mixer modules with identical structures connected sequentially. The MambaConv Mixer module is used to change the feature map size, extract local and global features at depth, and fuse them. The MambaConv Mixer module contains a MambaConv Mixer structure that performs residual connections and a deep feature representation module.

[0053] The deep feature representation module is used to further adjust and optimize the extracted features, enhancing feature extraction capabilities. The deep feature representation module consists of a combination of a Conv2D layer, a ReLU activation function layer, and another Conv2D layer.

[0054] like Figure 2 As shown, the MambaConv Mixer structure includes four modules: a global feature extraction module based on Mamba, a local feature extraction module based on Conv, a gate calculation module, and a global and local feature fusion module. Specifically, the global feature extraction module based on Mamba extracts global features, the local feature extraction module based on Conv extracts local features, the gate calculation module assigns weights to the extracted features, and the global and local feature fusion module fuses the global and local features.

[0055] The preliminary feature extraction module extracts the preliminary features of the industrial image to be detected, and then divides the preliminary features into two parts, which are respectively input into the Mamba-based global feature extraction module and the Conv-based local feature extraction module to extract the global features of the image and the local features The Gate calculation module calculates the weights of the global features and the local features based on and The dynamic is allocated to the weights of the global features and the local features, and finally the global features and the local features are input into the global and local feature fusion module to obtain the fusion features of the image. 、 and

[0056] Specifically, the method comprises the following steps:

[0057] Step 2.2.1: Extracting global features by using the Mamba-based global feature extraction module.

[0058] The structure of the Mamba-based global feature extraction module is specifically: a combination of a Conv2D layer and a SiLU activation function layer, a Rearrange layer (dimension rearrangement layer), a combination of a Conv1D layer and a SiLU activation function layer, an SSM layer, and a Rearrange layer connected in sequence.

[0059] Step 2.2.1.1: Extracting image texture features of the preliminary features and changing the image dimensions.

[0060] In a specific embodiment, in order to adapt to the size of the SSM layer, the preliminary features of the image are first input into a combination of a Conv2D layer and a SiLU activation function layer to extract image texture features, and the image dimensions are changed by a Rearrange layer. Then the features with changed image dimensions are input into a combination of a Conv1D layer and a SiLU activation function layer to further extract image features.

[0061] Specifically, the first Rearrange layer changes the image dimensions, for example, changing the original image dimensions [B, C, L, P] to [B, C, LxP], where B is the batch size, C is the channel number, L is the height of the feature map, and P is the width of the feature map; the second Rearrange layer restores the image dimensions to [B, C, L, P].

[0062] Step 2.2.1.2: Modeling long-distance dependence of the features with changed image dimensions by using the state space model to obtain preliminary global features.

[0063] ​​​Specifically, the SSM layer is a State Space Model Layer, which is a core component in Mamba for efficiently modeling long-range dependencies. The combination of Conv1D layers and SiLU activation function layers further extracts image features, which are input into the SSM layer to model long-range dependencies.

[0064] A standard Mamba SSM layer mainly includes the following components:

[0065] 1. Input projection: maps the input to the input channels of the state space, formally:

[0066] .

[0067] where is the result of the input mapping to the state space at time t, is the mapping function; is the time step.

[0068] 2. State update equation: the state update equation describes the evolution of the sequence state over time:

[0069] ,

[0070] where , B are trainable parameters; is the state vector.

[0071] 3. Output mapping: maps the state vector to the output :

[0072] .

[0073] where is the output projection matrix.

[0074] 4. Convolution implementation: to efficiently implement, Mamba discretizes the response of the SSM and represents it as a one-dimensional convolution kernel, which is convolved with the input sequence to complete the entire process.

[0075] 5. Dynamic gating: Mamba introduces a lightweight gating mechanism:

[0076] .

[0077] where is the final output result; For The result after mapping to the state space; is a dynamically calculated gating value; is a convolution kernel calculated based on the SSM parameters; represents convolution.

[0078] Step 2.2.1.3: Restore the dimension of the preliminary global feature to obtain the final global feature.

[0079] The preliminary global feature is restored to the changed image dimension through a Rearrange layer to obtain the final global feature of the image .

[0080] Step 2.2.2: Extract local features using a Conv-based local feature extraction module.

[0081] In a specific embodiment, the structure of the Conv-based local feature extraction module is a combination of two Conv2D layers and SiLU activation function layers connected in sequence. The combination of the first Conv2D layer and the SiLU activation function layer is used to extract image texture features from the preliminary feature extraction image; the combination of the second Conv2D layer and the SiLU activation function is used to further extract image local features from the image texture features, obtaining the local features of the image .

[0082] Step 2.2.3: Assign weights to the extracted features using a Gate calculation module.

[0083] In a specific embodiment, the Gate calculation module is used to calculate the weight ratio of the Mamba-based global feature extraction module and the Conv-based local feature extraction module.

[0084] Specifically, the following steps are included:

[0085] Step 2.2.3.1: Average pooling operation is performed on the global feature and the local feature respectively, and then the two features are spliced to obtain the spliced feature.

[0086] Specifically, the Gate calculation module first performs average pooling operation on and , and splices and after the average pooling operation.

[0087] Step 2.2.3.2: Normalize the spliced feature to obtain the calculated Gate value, and assign the corresponding feature weight according to the Gate value.

[0088] Specifically, the spliced features are input into a Linear layer and normalized by a Sigmoid activation function layer to obtain values.

[0089] Step 2.2.4: The global and local features are fused by using a global and local feature fusion module.

[0090] In a specific embodiment, the global and local feature fusion module first obtains the preliminary fusion features of the global features and the local features by using a preliminary fusion formula:

[0091] .

[0092] Secondly, the preliminary fusion features are input into a Conv2D layer for deep fusion to obtain the fusion features of the image.

[0093] Step 2.3: Finally, a classifier is used to classify the image according to the fusion features.

[0094] In a specific embodiment, the classifier is used to classify the image according to the fusion features of the image. The structure of the classifier is specifically a combination of a normalization layer, an average pooling layer, a Flatten layer and a fully connected layer (Linear layer).

[0095] Specifically, the fusion features of the image are first normalized and average-pooled by the normalization layer and the average pooling layer, and then flattened by the Flatten layer to convert the features to [B, C, M] size, where M is the product of the width and height of the feature map, to prepare for the subsequent fully connected layer. Finally, an industrial image is classified by a fully connected layer to obtain the image classification result.

[0096] Embodiment Two

[0097] The embodiment two of the present application provides an industrial image recognition system based on Mamba and Conv, comprising:

[0098] a data acquisition module configured to acquire an industrial image to be detected;

[0099] a data processing module configured to recognize the industrial image to be detected by using an image recognition network, wherein a preliminary feature extraction module composed of Conv is first used to extract preliminary features of the industrial image to be detected, then a deep feature extraction module composed of Mamba and Conv is used to further extract local features and global features according to the preliminary features, the local features and the global features are fused to obtain fusion features, and finally a classifier is used to classify the image according to the fusion features.​

[0100] Embodiment three

[0101] Embodiment three of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is suitable for being loaded and executed by a processor to perform the steps in the Mamba and Conv based industrial image recognition method according to embodiment one of the present application.

[0102] Embodiment four

[0103] Embodiment four of the present application provides a computer device, the device comprises:

[0104] a processor, suitable for executing a computer program;

[0105] a computer readable storage medium, the computer readable storage medium stores a computer program, when the computer program is executed by the processor, the steps in the Mamba and Conv based industrial image recognition method according to embodiment one of the present application are implemented.

[0106] The steps and methods involved in the above embodiments two, three and four correspond to embodiment one, and the specific implementation can refer to the relevant description part of embodiment one.

[0107] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of electronic hardware and computer software. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0108] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network or other programmable device. The computer instructions can be stored in or transmitted by a computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired or wireless manner. The computer readable storage medium can be any available medium accessible by the computer or a data processing device such as a server, data center and the like integrated with one or more available media. The available medium can be a magnetic medium, an optical medium or a semiconductor medium and the like.

[0109] The above description is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An industrial image recognition method based on Mamba and Conv, characterized in that, The method comprises the following steps: An industrial image to be detected is acquired; An image recognition network is used to recognize the industrial image to be detected, wherein a preliminary feature extraction module composed of a Conv is used to extract preliminary features of the industrial image to be detected, then a deep feature extraction module composed of a Mamba and a Conv is used to further extract local features and global features from the preliminary features, and the local features and the global features are fused to obtain fused features, and finally a classifier is used to classify the image according to the fused features; The deep feature extraction module comprises two MambaConv Mixer modules connected in sequence and having the same structure, the MambaConv Mixer module comprises a MambaConv Mixer structure and a feature deep expression module connected in a residual manner, the feature deep expression module comprises a combination of a Conv2D layer, a ReLU activation function layer and a Conv2D layer, the MambaConv Mixer structure comprises four modules, namely a Mamba-based global feature extraction module, a Conv-based local feature extraction module, a Gate calculation module and a global and local feature fusion module, wherein the Mamba-based global feature extraction module is used to extract global features, the Conv-based local feature extraction module is used to extract local features, the Gate calculation module is used to assign weights to the extracted features, and the global and local feature fusion module is used to fuse the global features and the local features, the structure of the Mamba-based global feature extraction module comprises a combination of a Conv2D layer and a SiLU activation function layer, a Rearrange layer, a combination of a Conv1D layer and a SiLU activation function layer, an SSM layer and a Rearrange layer connected in sequence, and the structure of the Conv-based local feature extraction module comprises two combinations of a Conv2D layer and a SiLU activation function layer connected in sequence.

2. The Mamba and Conv based industrial image recognition method of claim 1, wherein, The preliminary feature extraction module comprises two Conv2D modules connected in sequence and having the same structure.

3. The Mamba and Conv based industrial image recognition method of claim 2, wherein, The Conv2D module comprises a Conv2D layer, a batch normalization layer and a ReLU activation function layer.

4. The Mamba and Conv based industrial image recognition method of claim 1, wherein the preliminary After the feature extraction module extracts the preliminary features of the industrial image to be detected, the preliminary features are divided into two parts and input into the Mamba-based global feature extraction module and the Conv-based local feature extraction module respectively.

5. The Mamba and Conv based industrial image recognition method of claim 1, wherein, The specific steps of extracting global features by using the Mamba-based global feature extraction module are as follows: Image texture features of the preliminary features are extracted and the image dimensions are changed; A state space model is used to model long-distance dependence of the features with changed image dimensions to obtain preliminary global features; The dimensions of the preliminary global features are restored to obtain final global features.

6. The Mamba and Conv based industrial image recognition method of claim 1, wherein, The specific steps of assigning weights to the extracted features by using the Gate calculation module are as follows: The global features and the local features are subjected to average pooling operations respectively, and then spliced to obtain spliced features; The spliced features are normalized to obtain calculated Gate values, and corresponding feature weights are assigned according to the Gate values.

7. An industrial image recognition system based on Mamba and Conv, characterized in that, The method comprises the following steps: The data acquisition module is configured to acquire an industrial image to be detected. The data processing module is configured to identify the industrial image to be detected by using an image recognition network, wherein a preliminary feature of the industrial image to be detected is extracted by using a preliminary feature extraction module composed of a Conv, then local features and global features are further extracted from the preliminary features by using a deep feature extraction module composed of a Mamba and a Conv, the local features and the global features are fused to obtain fused features, and finally, the fused features are used to classify the image by using a classifier. The deep feature extraction module comprises two MambaConv Mixer modules of the same structure connected in sequence, the MambaConv Mixer module comprises a MambaConv Mixer structure and a feature deep expression module connected in residual, the feature deep expression module comprises a combination of a Conv2D layer, a ReLU activation function layer and a Conv2D layer, the MambaConv Mixer structure comprises four modules: a Mamba-based global feature extraction module, a Conv-based local feature extraction module, a Gate calculation module and a global and local feature fusion module, wherein the global features are extracted by using the Mamba-based global feature extraction module, the local features are extracted by using the Conv-based local feature extraction module, the extracted features are assigned weights by using the Gate calculation module, the global features and the local features are fused by using the global and local feature fusion module, the structure of the Mamba-based global feature extraction module is a combination of a Conv2D layer and a SiLU activation function layer, a Rearrange layer, a combination of a Conv1D layer and a SiLU activation function layer, an SSM layer and a Rearrange layer connected in sequence, and the structure of the Conv-based local feature extraction module is a combination of two Conv2D layers and SiLU activation function layers connected in sequence.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by the processor to implement the industrial image recognition method based on Mamba and Conv according to any one of claims 1-6.

9. A computer device, comprising: The processor is suitable for executing the computer program. The computer readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by the processor to implement the industrial image recognition method based on Mamba and Conv according to any one of claims 1-6. ​

Citation Information

Patent Citations

  • Classroom speech enhancement method based on convolution bidirectional Mama

    CN120496559A

  • Hyperspectral remote sensing image classification method based on self-attention context network

    US20230260279A1