Method for constructing image classification network with fusible multi-branch architecture

The fusion of convolution kernels in a multi-branch architecture network enhances reasoning speed without sacrificing accuracy, addressing performance issues in existing convolutional neural networks.

CN119206307AActive Publication Date: 2024-12-27CHINA SHIPBUILDING RES INST (SEVENTH RES INST OF CHINA STATE SHIPBUILDING CORP)
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411215351.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-27
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Existing convolutional neural networks in computer vision are hindered by slow performance on multi-branch architectures due to hardware limitations, particularly on CPUs, leading to poor parallel effects.

Method used

A method for building an image classification network with a fusion-capable multi-branch architecture, involving a multi-branch architecture network training, followed by fusion of convolution kernels using specific algorithms to merge modules into a single-branch architecture, enhancing reasoning speed without compromising accuracy.

Benefits of technology

The method accelerates model reasoning speed while maintaining accuracy, suitable for applications like autonomous driving and low-latency response systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206307A_ABST
    Figure CN119206307A_ABST
Patent Text Reader

Abstract

The invention discloses a method for constructing an image classification network with a fusible multi-branch architecture, and belongs to the technical field of computer vision. According to the method, a series of convolution kernels with different sizes are used for capturing multi-scale information in an image, so that better performance is obtained; then, three fusion algorithms (fusion algorithms 1, 2 and 3) are provided to perform multi-aspect fusion between the convolution kernels, between the convolution kernels and normalization layers in the closet, between the activation functions and between the convolution kernels and residual edges, so that a multi-branch architecture is fused into a single-path architecture; and the reasoning speed of the network is accelerated on the premise of not reducing the precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method for building an image classification network with a fusion-capable multi-branch architecture. Background Art

[0002] Image classification in computer vision refers to a technology that allows machines to classify images by simulating the perception and understanding capabilities of the human eye. With the help of algorithms, machines can identify objects, targets, text, etc. in images. By combining advanced technologies such as artificial intelligence and big data, computer vision algorithms can learn from massive amounts of data and achieve accuracy that is equal to or exceeds that of humans, thereby reducing labor costs and improving equipment efficiency and performance.

[0003] At present, convolutional neural networks in artificial intelligence have been widely used in computer vision algorithms. In order to improve performance, a multi-branch network with multiple convolution kernels in parallel is generally used to enhance the performance of the algorithm model. For example, multiple convolution kernels of different sizes are connected in parallel, and then convolution operations are performed on the image to capture multi-scale information, thereby improving model performance. However, due to computer hardware reasons, computer hardware (GPU or CPU) is often slow when running multi-branch networks, and the parallel effect is poor (especially when deployed on the CPU). Therefore, this field urgently needs an innovative method to overcome these problems and achieve "fast and good" effects. Summary of the invention

[0004] The present invention provides a method for building an image classification network with a fused multi-branch architecture in order to solve the above-mentioned problems in the prior art.

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

[0006] The present invention provides a method for building an image classification network with a fusion multi-branch architecture, comprising:

[0007] Step 1: Build a multi-branch architecture network including a head module including a standard convolution module, a transition module including a standard convolution module, a fusion module and a classification head module;

[0008] Step 2: Train and adjust the multi-branch architecture network and obtain the weight with the best performance;

[0009] Step 3: Based on the weights with the best performance, for the standard convolution modules in the multi-branch architecture network, use fusion algorithm 2 to combine the convolution kernels in all standard convolution modules. and BN n Fusion into a convolution kernel Merge the two layers into one layer and "erase" all BN from the network;

[0010] Step 4: Perform the following operations on all fusible modules in the network:

[0011] 1) Using fusion algorithm 1, multi-channel standard convolution and Fill and fuse into a group convolution kernel gconv with a group number of 3 5×5 , at this time, multi-way standard convolution and Transformed into a single-way group convolution gconv 5×5 ;

[0012] 2) Based on 1), two Dirac convolution modules are used to process the residual edge, where the Dirac convolution kernel is dracconv 5×5 ; This method ensures that the feature map value of the residual edge does not change, and at the same time, the residual edge is convolved to facilitate subsequent fusion;

[0013] 3) Based on 2), the convolution kernels and activation functions of the standard convolution module, grouped convolution module and Dirac convolution module in the same layer are fused using fusion algorithm 1 and fusion algorithm 3. At this time, the two-way convolution has become a single-way convolution, and the residual edge is "absorbed";

[0014] Step 5: Output the final image classification network with a fusion-capable multi-branch architecture.

[0015] On this basis, the present invention can also be improved as follows:

[0016] 1) The standard convolution module consists of a standard convolution kernel with a step size of 1, a batch normalization function BN, and an activation function, where:

[0017] The standard convolution kernel names are defined as The standard convolution expression is:

[0018]

[0019] Among them, f( ) is the convolution kernel operation function, k is the convolution kernel size parameter, n is the convolution kernel number, w is the convolution kernel coefficient matrix, b is the convolution kernel bias coefficient, and x is the input;

[0020] BN name is defined as BN n , the expression is:

[0021]

[0022] Where f( ) is the BN operation function, n is the BN number, γ is the BN weight coefficient, β is the BN bias coefficient, x is the input, μ is the mean of x, σ is the standard deviation of x, and ∈ is a constant (∈=10 -5 );

[0023] The activation function selects ReLU, its name is defined as ReLU, and the expression can be written as:

[0024]

[0025] Among them, f( ) is the ReLU operation function, and x is the input;

[0026] The final output of a single standard convolution module is:

[0027]

[0028] 2) Dirac convolution module

[0029] The Dirac convolution module consists of a Dirac convolution kernel with a step size of 1 and an identity function, where:

[0030] The Dirac convolution kernel name is defined as The Dirac convolution expression is:

[0031]

[0032] Among them, f( ) is the convolution kernel operation function, k is the convolution kernel size parameter, n is the convolution kernel number, w drac is the convolution kernel coefficient matrix, b drac is the convolution kernel bias coefficient, x is the input;

[0033] The activation function of this module is named dracact and its expression is:

[0034] f dracact (x) = 1, x∈R;

[0035] Among them, f dracact ( ) is the operation function of the activation function, and x is the input.

[0036] On this basis, the present invention can also be improved as follows:

[0037] 1) Header module

[0038] The head module consists of a standard convolution kernel conv^(3×3) with a stride of 2 and a ReLU function, which plays a role in downsampling;

[0039] 2) Transition module

[0040] The transition module has the same structure as the head module, consisting of a standard convolution kernel conv^(3×3) with a step size of 2 and a ReLU function, which plays the role of downsampling;

[0041] 3) Basic modules

[0042] The basic module has a two-layer structure. The first layer consists of a step size of 1. BN n and ReLU, the second layer consists of 3 standard convolution modules with a stride of 1 and kernel sizes of 1×1, 3×3, and 5×5 respectively; the specific process is as follows:

[0043] a) Input x first passes through BN0 and ReLU are used for nonlinear processing, and each feature map in the input x will be Fusion;

[0044] b) The results of step a) will be subjected to multi-scale feature extraction to obtain more diverse information; and regularized and nonlinearized through BN1, BN2, BN3 and ReLU functions;

[0045] c) The feature map obtained in step b) is concatenated along the channel into a new feature map, which is added to the original input x to obtain the output y of the basic module;

[0046] 4) Classification Head Module

[0047] The classification head module consists of a global average pooling layer GAP and a fully connected layer FC, which are used for feature compression and category probability calculation.

[0048] On this basis, the present invention can also be improved as follows: Fusion Algorithm 1 specifically includes:

[0049] The fusion of any two convolution kernels is regarded as the fusion of coefficient matrices w and bias coefficients b. First, multiple convolution kernels to be fused are padded to the same size, and then replaced by an equivalent grouped convolution module. For the padded part, the sizes of all the grouped convolution kernels to be fused are first counted, and the largest one is taken as the target. Then, the non-largest convolution kernels are zero-filled until they are equal to the size of the largest convolution kernel.

[0050] Among them, the fused coefficient matrix w can be regarded as multiple convolution kernel coefficient matrices w of the same size n Splicing along the channel dimension is expressed as:

[0051] w={w1,w2,...,w n}

[0052] Among them, n is the convolution kernel number, w n is the nth convolution kernel coefficient matrix;

[0053] The bias coefficient b is a one-dimensional vector, which is concatenated along its dimension. Its expression b * for:

[0054] b={b1,b2,...,b n}

[0055] Where n is the convolution kernel number, b n is the nth convolution kernel bias coefficient;

[0056] Expression of w and b and grouped convolution kernel The expression form is consistent; {w1, w2, ..., w n}conform to Coefficient matrix w g expression, and b symbol b g The bias expression form; therefore, a group convolution kernel is used to replace the multi-way convolution kernel; the final result is The channel input dimension of is equal to the sum of the channel input dimensions of each convolution kernel before fusion, and the channel output dimension is equal to the sum of the channel output dimensions of each convolution kernel before fusion; therefore, the channel dimensions of its input x and output y will double, so slicing is used to restore the dimensions of x and y to normal.

[0057] On this basis, the present invention can also be improved as follows: Fusion Algorithm 2 specifically includes:

[0058] For the standard convolution module, the output y is transformed into:

[0059]

[0060] Among them, the part x>0 makes a new convolution kernel The expression is:

[0061]

[0062] Among them, f( ) is the operation function, w * is the new convolution kernel weight coefficient matrix, b * is the bias coefficient of the new convolution kernel, and the rest of the parameters are as shown above;

[0063] Through the new convolution kernel The standard convolution kernel and BN n Fusion into a new convolution kernel.

[0064] On this basis, the present invention can also be improved as follows: Fusion Algorithm 3 specifically includes:

[0065] In order to ensure that the output of the Dirac convolution module, the standard convolution module, and the grouped convolution module remain unchanged, the activation function is used:

[0066]

[0067] Among them, x res is the feature map of the residual edge; the activation function is applied to the part of the feature map that belongs to the residual edge. ReLU , apply the identity mapping function f to the non-residual part dracact .

[0068] The beneficial effects provided by the present invention are:

[0069] The present invention first proposes an image classification network with a multi-branch architecture, and then proposes three fusion algorithms (fusion algorithms 1, 2 and 3) to fuse the multi-way convolution modules in the network into a single-way convolution module, thereby improving the network reasoning speed without sacrificing accuracy. In summary, the present invention provides an accurate, efficient and practical method, which improves the reasoning efficiency of multi-branch architecture networks and can provide a general method for real-time reasoning, such as autonomous driving, automatic navigation, missile guidance, low-latency response equipment, etc.

[0070] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 Schematic diagram of the overall network architecture of an embodiment of the present invention.

[0072] Figure 2 Schematic diagram of a convolution module according to an embodiment of the present invention.

[0073] Figure 3 Schematic diagram of modules in a network according to an embodiment of the present invention.

[0074] Figure 4 Schematic diagram of the convolution kernel filling process according to an embodiment of the present invention.

[0075] Figure 5 Schematic diagram of the effect of fusion algorithm 2 according to an embodiment of the present invention.

[0076] Figure 6 This is a schematic diagram of the process in which the fusible module of an embodiment of the present invention gradually changes from multiple branches to a single branch under the operation of fusion algorithms 1, 2, 3 and residual edge Dirac convolution. DETAILED DESCRIPTION

[0077] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.

[0078] The present invention provides an image classification network with a fusionable multi-branch architecture. The network adopts a multi-branch architecture training mode during training, and fuses the multi-branch architecture into an equivalent single-branch architecture according to a corresponding fusion algorithm during reasoning, thereby accelerating the model reasoning speed without changing the accuracy. The present invention mainly involves the following three parts:

[0079] (1) Overall architecture

[0080] like Figure 1 The figure is a schematic diagram of the overall network architecture of an embodiment of the present invention. Among them, 1x, 2x, 4x and 8x represent the number of times the module is repeated. The present invention is mainly divided into a head module, a transition module, a fusion module and a classification head module (the convolution module is not included in the Figure 1 (drawn in).

[0081] The overall workflow of the present invention is as follows:

[0082] 1) Input image;

[0083] 2) The head module performs preliminary sampling of the input image;

[0084] 3) The transition module downsamples and increases the dimension of the result of 2);

[0085] 4) The fusion module can extract features from the results of 3) and learn effective information;

[0086] 5) Repeat the process of 3) and 4) until all the fusion modules are passed;

[0087] 6) The classification head module calculates the result of 5) to obtain the classification result (category information and category probability);

[0088] 7) Output classification results.

[0089] The size changes of the input image after each module are shown in Table 1. In this table, the tuple (W, H, C) is used to represent the size of the image, where W represents the width of the image, H represents the height of the image, and C represents the number of channels of the image.

[0090] Table 1 Dimensional changes

[0091]

[0092]

[0093] (2) Module part

[0094] 1) Standard convolution module

[0095] like Figure 2 , which is a schematic diagram of the convolution module of an embodiment of the present invention. Among them, only a has a BN layer, and the BN layers of b and c will be "absorbed" by the convolution kernel. For details, please refer to Fusion Algorithm 2.

[0096] The standard convolution module consists of a standard convolution kernel with a step size of 1, a batch normalization (BatchNormalization, BN) function and an activation function, such as Figure 2 As shown in a in . Among them:

[0097] The standard convolution kernel names are defined as The standard convolution expression can be written as:

[0098]

[0099] Among them, f( ) is the convolution kernel operation function, k is the convolution kernel size parameter, n is the convolution kernel number, w is the convolution kernel coefficient matrix, b is the convolution kernel bias coefficient, and x is the input.

[0100] BN name is defined as BN n , the expression can be written as:

[0101]

[0102] Where f( ) is the BN operation function, n is the BN number, γ is the BN weight coefficient, β is the BN bias coefficient, x is the input, μ is the mean of x, σ is the standard deviation of x, and ∈ is a constant (∈=10 -5 ).

[0103] The activation function selects ReLU, its name is defined as ReLU, and the expression can be written as:

[0104]

[0105] Among them, f( ) is the ReLU operation function and x is the input.

[0106] The final output of a single standard convolution module is:

[0107]

[0108] 2) Grouped convolution module

[0109] The grouped convolution module consists of a grouped convolution kernel with a step size of 1 and a ReLU function, such as Figure 2 As shown in b in the figure. Among them:

[0110] The grouped convolution kernel name is defined as The grouped convolution expression can be written as:

[0111]

[0112] Among them, f( ) is the convolution kernel operation function, k is the convolution kernel size parameter, n is the convolution kernel number, w g is the convolution kernel coefficient matrix, b g is the convolution kernel bias coefficient, and x is the input.

[0113] The activation function is the same as the standard convolution module, so it will not be described in detail.

[0114] 3) Dirac convolution module

[0115] In order to fuse the residual edges in the basic module, the present invention proposes a Dirac convolution module.

[0116] The Dirac convolution module consists of a Dirac convolution kernel with a step size of 1 and an identity function, such as Figure 2 As shown in c in . Among them:

[0117] The Dirac convolution kernel name is defined as The Dirac convolution expression can be written as:

[0118]

[0119] Among them, f( ) is the convolution kernel operation function, k is the convolution kernel size parameter, n is the convolution kernel number, w drac is the convolution kernel coefficient matrix, b drac is the convolution kernel bias coefficient, and x is the input.

[0120] The activation function of this module is named dracact and its expression is:

[0121] f dracact (x)=1,x∈R

[0122] where f dracact ( ) is the operation function of the activation function, and x is the input.

[0123] In the present invention, the Dirac convolution kernel is a standard convolution kernel using a Dirac initialization method, which is characterized in that the central element of each convolution kernel is 1 in sequence, and the remaining elements are all zero.

[0124] This module can convolute the residual edge without changing the residual edge data, which facilitates subsequent fusion with other convolution modules.

[0125] 4) Header module

[0126] like Figure 3 FIG. 1 is a schematic diagram of a module in a network according to an embodiment of the present invention. A and B play the role of downsampling and dimension expansion. C is responsible for capturing multi-scale information, and D is responsible for converting feature maps into classification probabilities.

[0127] This module is Figure 3 As shown in a in . It consists of a standard convolution kernel conv with a step size of 2 3×3 It is composed of the ReLU function and plays the role of downsampling.

[0128] 5) Transition module

[0129] This module has the same structure as the head module. Figure 3 As shown in b, it consists of a standard convolution kernel conv with a step size of 2 3×3 It is composed of the ReLU function and plays the role of downsampling.

[0130] 6) Basic module (i.e. fusion module)

[0131] like Figure 3 As shown in c in . It has a two-layer structure. The first layer is composed of a step size of 1 BN n and ReLU. The second layer consists of three standard convolution modules with a stride of 1 and kernel sizes of 1×1, 3×3, and 5×5. The specific process is as follows:

[0132] a) Input x first passes through BN0 and ReLU are used for nonlinear processing, and each feature map in the input x will be Fusion.

[0133] b) The results of the previous step will be subjected to multi-scale feature extraction to obtain more diverse information; and regularized and nonlinearized through BN1, BN2, BN3 and ReLU functions;

[0134] c) The feature map obtained in the previous step will be concatenated along the channel into a new feature map, added to the original input x (residual edge) to obtain the output y of this module.

[0135] 7) Classification Header Module

[0136] This module is Figure 3As shown in d in , it consists of a global average pooling layer (GAP) and a fully connected layer (FC) for feature compression and category probability calculation.

[0137] (3) Fusion algorithm part

[0138] 1) Fusion algorithm 1: Fusion of convolution kernels and convolution kernels

[0139] like Figure 4 As shown, it is a schematic diagram of the convolution kernel filling process according to an embodiment of the present invention.

[0140] The fusion of any two convolution kernels can be seen as the fusion of the coefficient matrix w and the fusion of the bias coefficient b.

[0141] The overall idea of ​​the algorithm is to first fill the multiple convolution kernels to be fused into the same size, and then replace them with an equivalent grouped convolution module.

[0142] For the padding part, first count the sizes of all the grouped convolution kernels to be fused, take the largest one as the target, and then pad the non-largest convolution kernels with zeros until they are equal to the size of the largest convolution kernel.

[0143] The fused coefficient matrix w can be regarded as multiple convolution kernel coefficient matrices w of the same size n The expression for concatenation along the channel dimension can be written as:

[0144] w={w1,w2,...,w n}

[0145] Where n is the convolution kernel number, w n is the nth convolution kernel coefficient matrix.

[0146] The bias coefficient b is a one-dimensional vector, which is concatenated along its dimension. Its expression b * can be written as:

[0147] b={b1,b2,...,b n}

[0148] Where n is the convolution kernel number, b n is the bias coefficient of the nth convolution kernel.

[0149] The above expressions of w and b and grouped convolution kernels The expression of {w1, w2, ..., w along the channel is consistent. n}conform to Coefficient matrix w g expression, and b symbol b g Bias expression. Therefore, a group convolution kernel can replace a multi-way convolution kernel. If some of the convolution kernels to be fused are group convolution kernels, they can also be fused according to the above method. At this time, the group convolution obtained is an asymmetrically divided group convolution kernel.

[0150] According to the above calculation, we finally get The channel input dimension of is equal to the sum of the channel input dimensions of each convolution kernel before fusion, and the channel output dimension is equal to the sum of the channel output dimensions of each convolution kernel before fusion. Therefore, the channel dimensions of its input x and output y will double. In this case, slicing can be used to restore the dimensions of x and y to normal.

[0151] 2) Fusion algorithm 2: Fusion of convolution kernel and BN layer

[0152] like Figure 5 FIG. 2 is a schematic diagram showing the effect of fusion algorithm 2 according to an embodiment of the present invention.

[0153] For a standard convolutional module, its output y can be transformed into

[0154]

[0155] The x>0 part of the formula can be used to make a new convolution kernel The expression is:

[0156]

[0157] Among them, f( ) is the operation function, w * is the new convolution kernel weight coefficient matrix, b * is the new convolution kernel bias coefficient, and the remaining parameters are as shown above.

[0158] Through the new convolution kernel You can use the standard convolution kernel and BN n The convolution kernel is fused into a new one, which speeds up the reasoning process. Figure 5 shown.

[0159] 3) Fusion algorithm 3: Fusion of activation functions and activation functions

[0160] This algorithm is applied when the activation functions of the convolution modules to be fused are different, which is when the Dirac convolution module and the standard convolution module / grouped convolution module are fused in the present invention.

[0161] In order to ensure that the outputs of the Dirac convolution module and the standard convolution module / grouped convolution module remain unchanged, the present invention proposes the following activation function:

[0162]

[0163] Among them, x res is the feature map of the residual edge. This function applies f to the part of the feature map that belongs to the residual edge. ReLU , apply the identity mapping function f to the non-residual part dracact .

[0164] The specific implementation is as follows:

[0165] Step 1: Build a multi-branch architecture network including a head module including a standard convolution module, a transition module including a standard convolution module, a fusion module and a classification head module;

[0166] Step 2: Train and adjust the multi-branch architecture network and obtain the weight with the best performance;

[0167] Step 3: Based on the weights with the best performance, for the standard convolution modules in the multi-branch architecture network, use fusion algorithm 2 to combine the convolution kernels in all standard convolution modules. and BN n Fusion into a convolution kernel Merge the two layers into one layer and "erase" all BN from the network;

[0168] Step 4: Perform the following operations on all fusible modules in the network:

[0169] like Figure 6 As shown, it is a schematic diagram of the process of gradually changing from multiple branches to a single branch under the operation of fusion algorithms 1, 2, 3 and residual edge Dirac convolution of the fusion module of an embodiment of the present invention.

[0170] 1) Using fusion algorithm 1, multi-channel standard convolution and Fill and fuse into a group convolution kernel gconv with a group number of 3 5×5 , at this time, multi-way standard convolution and Transformed into a single-way group convolution gconv 5×5 ;

[0171] 2) Based on 1), two Dirac convolution modules are used to process the residual edge, where the Dirac convolution kernel is dracconv 5×5 ; This method ensures that the feature map value of the residual edge does not change, and at the same time, the residual edge is convolved to facilitate subsequent fusion;

[0172] 3) Based on 2), the convolution kernels and activation functions of the standard convolution module, grouped convolution module and Dirac convolution module in the same layer are fused using fusion algorithm 1 and fusion algorithm 3. At this time, the two-way convolution has become a single-way convolution, and the residual edge is "absorbed";

[0173] Step 5: Output the final image classification network with a fusion-capable multi-branch architecture.

[0174] The solution provided by the present invention has the following effects:

[0175] The present invention first proposes an image classification network with a multi-branch architecture, and then proposes three fusion algorithms (fusion algorithms 1, 2 and 3) to fuse the multi-way convolution modules in the network into a single-way convolution module, thereby improving the network reasoning speed without sacrificing accuracy. In summary, the present invention provides an accurate, efficient and practical method, which improves the reasoning efficiency of multi-branch architecture networks and can provide a general method for real-time reasoning, such as autonomous driving, automatic navigation, missile guidance, low-latency response equipment, etc.

[0176] Optionally, in some possible implementations, all or part of the above implementations may be included.

[0177] It should be understood that in the description of this specification, reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this description, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and some features of different embodiments or examples without contradicting each other.

[0178] Of course, without departing from the spirit and essence of the present invention, those skilled in the art may make various corresponding changes and modifications based on the present invention, but these changes and modifications should all fall within the scope of protection of the claims of the present invention.

Claims

1. A method for building an image classification network with a fusion multi-branch architecture, characterized in that: include: Step 1: Build a multi-branch architecture network including a head module including a standard convolution module, a transition module including a standard convolution module, a fusion module and a classification head module; Step 2: Train and adjust the multi-branch architecture network and obtain the weight with the best performance; Step 3: Based on the weights with the best performance, for the standard convolution modules in the multi-branch architecture network, use fusion algorithm 2 to combine the convolution kernels in all standard convolution modules. and BN n Fusion into a convolution kernel Merge the two layers into one layer and remove all BN from the network; Step 4: Perform the following operations on all fusible modules in the network: 1) Using fusion algorithm 1, multi-channel standard convolution and Fill and fuse into a group convolution kernel gconv with a group number of 3 5×5 , at this time, multi-way standard convolution and Transformed into a single-way group convolution gconv 5×5 ; 2) Based on 1), two Dirac convolution modules are used to process the residual edge, where the Dirac convolution kernel is dracconv 5×5 ; This method ensures that the feature map value of the residual edge does not change, and at the same time, the residual edge is convolved to facilitate subsequent fusion; 3) Based on 2), the convolution kernels and activation functions of the standard convolution module, grouped convolution module and Dirac convolution module in the same layer are fused using fusion algorithm 1 and fusion algorithm 3. At this time, the two-way convolution has become a single-way convolution, and the residual edge is absorbed; Step 5: Output the final image classification network with a fusion-capable multi-branch architecture.

2. The method for constructing an image classification network with a fusion multi-branch architecture according to claim 1, characterized in that: 1) The standard convolution module consists of a standard convolution kernel with a step size of 1, a batch normalization function BN, and an activation function, where: The standard convolution kernel names are defined as The standard convolution expression is: Among them, f() is the convolution kernel operation function, k is the convolution kernel size parameter, n is the convolution kernel number, w is the convolution kernel coefficient matrix, b is the convolution kernel bias coefficient, and x is the input; BN name is defined as BN n , the expression is: Among them, f() is the BN operation function, n is the BN number, γ is the BN weight coefficient, β is the BN bias coefficient, x is the input, μ is the mean of x, σ is the standard deviation of x, ∈ is a constant (∈=10 -5 ); The activation function selects ReLU, its name is defined as ReLU, and the expression can be written as: Among them, f() is the ReLU operation function, and x is the input; The final output of a single standard convolution module is: 2) Dirac convolution module The Dirac convolution module consists of a Dirac convolution kernel with a step size of 1 and an identity function, where: The Dirac convolution kernel name is defined as The Dirac convolution expression is: Among them, f() is the convolution kernel operation function, k is the convolution kernel size parameter, n is the convolution kernel number, w is the convolution kernel number, drac is the convolution kernel coefficient matrix, b drac is the convolution kernel bias coefficient, x is the input; The activation function of this module is named dracact and its expression is: f drracact (x)=1,x∈R; Among them, f dracact () is the operation function of the activation function, and x is the input.

3. The method for constructing an image classification network with a fusion multi-branch architecture according to claim 2, characterized in that: 1) Header module The head module consists of a standard convolution kernel conv^(3×3) with a stride of 2 and a ReLU function, which plays a role in downsampling; 2) Transition module The transition module has the same structure as the head module, consisting of a standard convolution kernel conv^(3×3) with a step size of 2 and a ReLU function, which plays the role of downsampling; 3) Basic modules The basic module has a two-layer structure. The first layer consists of a step size of 1. BN n and ReLU, the second layer consists of 3 standard convolution modules with a stride of 1 and kernel sizes of 1×1, 3×3, and 5×5 respectively; the specific process is as follows: a) Input x first passes through BN0 and ReLU are used for nonlinear processing, and each feature map in the input x will be Fusion; b) The results of step a) will be subjected to multi-scale feature extraction to obtain more diverse information; and regularized and nonlinearized through BN1, BN2, BN3 and ReLU functions; c) The feature map obtained in step b) is concatenated along the channel into a new feature map, which is added to the original input x to obtain the output y of the basic module; 4) Classification Head Module The classification head module consists of a global average pooling layer GAP and a fully connected layer FC, which are used for feature compression and category probability calculation.

4. The method for constructing an image classification network with a fusion multi-branch architecture according to claim 3, characterized in that: Fusion algorithm 1 specifically includes: The fusion of any two convolution kernels is regarded as the fusion of coefficient matrices w and bias coefficients b. First, multiple convolution kernels to be fused are padded to the same size, and then replaced by an equivalent grouped convolution module. For the padded part, the sizes of all the grouped convolution kernels to be fused are first counted, and the largest one is taken as the target. Then, the non-largest convolution kernels are zero-filled until they are equal to the size of the largest convolution kernel. Among them, the fused coefficient matrix w can be regarded as multiple convolution kernel coefficient matrices w of the same size n Splicing along the channel dimension is expressed as: w={w1,w2,...,w n } Among them, n is the convolution kernel number, w n is the nth convolution kernel coefficient matrix; The bias coefficient b is a one-dimensional vector, which is concatenated along its dimension direction. Its expression b * for: b={b1,b2,...,b n } Where n is the convolution kernel number, b n is the nth convolution kernel bias coefficient; Expression of w and b and grouped convolution kernel The expression form is consistent; {w1, w2, ..., w n }conform to Coefficient matrix w g expression, and b symbol b g The bias expression form; therefore, a group convolution kernel is used to replace the multi-way convolution kernel; the final result is The channel input dimension of is equal to the sum of the channel input dimensions of each convolution kernel before fusion, and the channel output dimension is equal to the sum of the channel output dimensions of each convolution kernel before fusion; therefore, the channel dimensions of its input x and output y will double, so slicing is used to restore the dimensions of x and y to normal.

5. The method for constructing an image classification network with a fusion-capable multi-branch architecture according to claim 4, characterized in that: Fusion algorithm 2 specifically includes: For the standard convolution module, the output y is transformed into: Among them, the part x>0 makes a new convolution kernel The expression is: Among them, f() is the operation function, w * is the new convolution kernel weight coefficient matrix, b * is the bias coefficient of the new convolution kernel, and the rest of the parameters are as shown above; Through the new convolution kernel The standard convolution kernel and BN n Fusion into a new convolution kernel.

6. The method for constructing an image classification network with a fusion-capable multi-branch architecture according to claim 5, characterized in that: Fusion algorithm 3 specifically includes: In order to ensure that the output of the Dirac convolution module, the standard convolution module, and the grouped convolution module remain unchanged, the activation function is used: Among them, x res is the feature map of the residual edge; the activation function is applied to the part of the feature map that belongs to the residual edge. ReLU , apply the identity mapping function f to the non-residual part dracact .

Citation Information

Patent Citations

  • Convolutional neural network feature fusion algorithm based on feature screening and deep fusion

    CN113837353A

  • Method for carrying out gesture recognition by using convolutional neural network based on distance perception and speed perception

    CN117496550A

  • Method for training image classification model, image processing method, and apparatuses

    US20210241109A1

  • Image segmentation method using neural network based on mumford-shah function and apparatus therefor

    US20220020155A1

  • Context-aware selective sensor fusion method for multi-sensory computing systems

    US20240062519A1