An image classification method based on ultra-densely connected neural network

By adopting the method of super-intensively connecting neural networks in the image classification network, changing the connection method of dense blocks, deleting the transition layer, and modifying the convolutional layer to a hollow convolutional layer, the problem of information loss in image classification networks when reducing image resolution is solved, and the classification accuracy and model performance are improved.

CN113902026BActive Publication Date: 2025-03-28Chinese People's Liberation Army Cyberspace Force Information Engineering University
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111229458.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-10-08
Filing Date
2021-10-21
Publication Date
2025-03-28
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

In the prior art, the image classification network loses image information in the process of reducing image resolution, resulting in low classification accuracy.

Method used

The image classification method based on super-dense connection neural network is adopted to change the connection method of dense blocks, connect across dense blocks, retain the characteristics of each level of the image, and delete the transition layer to avoid reducing the image resolution. At the same time, the convolution layer is modified to a hollow convolution layer to increase the receptive field.

Benefits of technology

It improves the accuracy of image classification, retains the original image information, and enhances the performance of the classification model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113902026B_ABST
    Figure CN113902026B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image classification technology, and specifically relates to an image classification method based on an ultra-densely connected neural network. The method first obtains an image to be classified; then the image to be classified is input into a trained classification model to obtain an image classification result; wherein the classification model includes a convolution layer, a first dense block, a second dense block, a third dense block and a classification layer connected in sequence, the first dense block, the second dense block and the third dense block each include a plurality of convolution blocks, and each convolution block includes two convolution layers, and each convolution block in each dense block is connected to each convolution block in another dense block. The present invention changes the connection mode of the dense blocks, realizes cross-dense block connection, thereby retaining the features of each level of the image, ensuring the classification accuracy, and there is no pooling layer between the dense blocks, the image resolution is no longer reduced, and the original information of the image is retained as much as possible, further ensuring the classification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image classification, and in particular relates to an image classification method based on an ultra-densely connected neural network. Background Art

[0002] At present, deep learning technology is booming and has become the core technology in the field of artificial intelligence. Deep convolutional neural network is a key algorithm in deep learning technology. It is widely used in the field of computer vision, especially in image classification, segmentation, recognition, positioning, etc., and has achieved great success. It has repeatedly won the first prize in international competitions for image processing and analysis of natural scene images and various professional fields (such as medicine and remote sensing), and has basically completely replaced traditional algorithms. Image classification is a classic problem in computer vision. The academic community has proposed a variety of classification networks around this problem, such as VGG, GoogLeNet, ResNet, DenseNet, etc. These networks, especially DenseNet networks (network structure as shown in Table 1), have good classification effects, but there are still some problems. For example, these network models all need to continuously reduce the image resolution to achieve the purpose of classification, but this method loses image information. Moreover, some network models contain dense blocks, such as DenseNet networks, which contain multiple convolution blocks. The connection methods between these convolution blocks are limited to various connections within a dense block, which will lead to low classification accuracy. Summary of the invention

[0003] The present invention provides an image classification method based on an ultra-densely connected neural network, which is used to solve the problem of low classification accuracy in the prior art.

[0004] In order to solve the above technical problems, the technical solutions included in the present invention and the beneficial effects corresponding to the technical solutions are as follows:

[0005] The present invention provides an image classification method based on an ultra-densely connected neural network, comprising the following steps:

[0006] 1) Obtain the image to be classified;

[0007] 2) Input the image to be classified into the trained classification model to obtain the image classification result;

[0008] Among them, the classification model includes a convolution layer, a first dense block, a second dense block, a third dense block and a classification layer connected in sequence, the first dense block, the second dense block and the third dense block each include multiple convolution blocks, and each convolution block includes two convolution layers, each convolution block in the first dense block is connected to each convolution block in the second dense block, each convolution block in the second dense block is connected to each convolution block in the third dense block, and each convolution block in the first dense block is connected to each convolution block in the third dense block; the trained classification model is obtained by training the classification model using an image set and the corresponding classification results.

[0009] The beneficial effects of the above technical solution are as follows: the classification model of the present invention is improved on the basis of the DenseNet network model in the prior art. The first improvement is to change the connection method of the dense blocks to realize cross-dense block connection, thereby retaining the features of each level of the image and ensuring the classification accuracy of the classification model. The second improvement is to delete the transition layer between the first dense block and the second dense block in the DenseNet network model (including a convolution layer and a pooling layer), and the transition layer between the second dense block and the third dense block (including a convolution layer and a pooling layer), that is, there is no longer a pooling layer between the first dense block and the second dense block, and there is no longer a pooling layer between the second dense block and the third dense block. The image resolution is no longer reduced, the original image information is retained as much as possible, and the classification accuracy is further guaranteed.

[0010] Furthermore, in order to retain image information as much as possible to improve the classification accuracy of the classification model and achieve ultra-dense connection, the structures of the first dense block, the second dense block and the third dense block of the classification model are respectively consistent with the structures of the first dense block, the second dense block and the third dense block of the DenseNet-40 network model, but all 3×3 convolutional layers in the second dense block of the classification model are hollow convolutional layers with a dilation rate of 2, and all 3×3 convolutional layers in the third dense block of the classification model are hollow convolutional layers with a dilation rate of 4.

[0011] Furthermore, in order to retain image information as much as possible to improve the classification accuracy of the classification model, the classification layer includes a 32×32 global average pooling layer.

[0012] Furthermore, the method also includes a step of preprocessing the image to be classified.

[0013] Furthermore, the preprocessing method includes at least one of cropping and scaling.

[0014] Furthermore, in order to expand the training and testing data to improve the classification accuracy of the classification model, the training of the classification model also includes the step of expanding the image set.

[0015] Furthermore, the expansion method includes at least one of upper and lower mirroring, left and right mirroring, and random rotation.

[0016] Furthermore, the first convolutional layer in the classification model is a 3×3 convolutional layer. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the connection method between two dense blocks in the DenseNet network model of the prior art;

[0018] Figure 2 It is a schematic diagram of the connection mode between two dense blocks in the classification model of the present invention. DETAILED DESCRIPTION

[0019] The present invention improves the DenseNet network model of the prior art and uses the improved DenseNet network model to implement image classification. The DenseNet network model of the prior art is first introduced below. The structures of the DenseNet-40 network model, the DenseNet-100 network model, and the DenseNet-250 network model are shown in Table 1 below.

[0020] Table 1

[0021]

[0022]

[0023] As can be seen from Table 1 above, the DenseNet network model includes the sequentially connected convolution layer Conv, the first dense block Dense Block (1), the first transition layer Transition Layer (1), the second dense block Dense Block (2), the second transition layer Transition Layer (2), the third dense block Dense Block (3), and the classification layer Classification Layer. Each dense block includes multiple convolution blocks, and each convolution block includes two convolution layers, namely a 1×1 convolution layer and a 3×3 convolution layer. Dense Block (1) (i.e. Figure 1 The dense block 1 in the first transition layer Transition Layer (1) (i.e. Figure 1 The convolutional layer and pooling layer in ), the second dense block Dense Block (2) (i.e. Figure 2 The dense blocks in 2) are connected to each other in the following way Figure 1As shown in the figure, a small circle in dense block 1 and dense block 2 refers to a convolution block. For the DenseNet-40 network model, its dense block 1 should contain 12 convolution blocks, but only 3 convolution blocks are drawn in this figure for illustration purposes only. Moreover, from the size column in the figure, it can be seen that this network model inevitably needs to change the image size, which will cause loss of image information.

[0024] The following is a detailed description of an image classification method based on an ultra-densely connected neural network in conjunction with the accompanying drawings and embodiments.

[0025] Method Example:

[0026] An embodiment of an image classification method based on an ultra-densely connected neural network of the present invention has the following specific process:

[0027] Step 1: Build a classification model. The classification module in this embodiment takes the DenseNet-40 network model as an example to illustrate its improvements. Of course, it can also be extended to the DenseNet-100 network model and the DenseNet-250 network model. The specific improvements are as follows:

[0028] ① Remove the first transition layer and the second transition layer in the DenseNet-40 network model, that is, the 1×1 convolution layer and the 2×2 average pooling layer between the first dense block Dense Block (1) and the second dense block Dense Block (2) in the DenseNet-40 network model, and the 1×1 convolution layer and the 2×2 average pooling layer between the second dense block Dense Block (2) and the third dense block Dense Block (3) in the DenseNet-40 network model.

[0029] ② Modify the second dense block Dense Block (2) in the DenseNet-40 network model. Change all 3×3 convolutional layers contained in the second dense block Dense Block (2) to hollow convolutional layers, and change their expansion rates to 2.

[0030] ③ Modify the third dense block (3) in the DenseNet-40 network model. Change all 3×3 convolutional layers contained in the third dense block (3) to hollow convolutional layers, and change their expansion rates to 4.

[0031] ④ After modification according to ①②③, the size of each layer of network feature map can be made 32×32. At this time, the first dense block Dense Block (1) and the second dense block Dense Block (2) in the DenseNet-40 network model are densely connected, the second dense block Dense Block (2) and the third dense block Dense Block (3) are densely connected, and the first dense block Dense Block (1) and the third dense block Dense Block (3) are densely connected. The connection diagram after the first dense block DenseBlock (1) and the second dense block Dense Block (2) are densely connected is as follows: Figure 2 As shown, the first dense block (i.e. Figure 2 The convolution blocks in the dense block 1) and the second dense block (i.e. Figure 2 The convolution blocks in the dense block 2) are all connected, and the second dense block Dense Block (2) and the third dense block Dense Block (3), as well as the first dense block Dense Block (1) and the third dense block Dense Block (3) are densely connected. Figure 2 That is, each convolution block in the second dense block is connected to each convolution block in the third dense block, and each convolution block in the first dense block is connected to each convolution block in the third dense block, so as to improve the classification accuracy. It should be noted that the first dense block and the second dense block both contain 12 convolution blocks, corresponding to Figure 2 There should be 12 circles in the figure. For the convenience of viewing, only 3 circles are drawn in the first dense block and the second dense block. However, it should be understood that for the classification model in this implementation, 12 circles should be drawn in the first dense block and the second dense block respectively. Correspondingly, the connection method is that each convolution block in the first dense block is connected to each convolution block in the second dense block.

[0032] ⑤The 8×8 global average pooling layer included in the classification layer in the DenseNet-40 network model is modified to a 32×32 global average pooling layer to retain the original information of the image as much as possible.

[0033] Based on the above five improvements, the structure of the classification model of this embodiment is as follows: it includes a convolutional layer, a first dense block, a second dense block, a third dense block and a classification layer connected in sequence, each convolutional block includes two convolutional layers, each convolutional block in the first dense block is connected to each convolutional block in the second dense block, the 3×3 convolutional layer in the second dense block is a hollow convolutional layer with a dilation rate of 2, the 3×3 convolutional layer in the third dense block is a hollow convolutional layer with a dilation rate of 4, and the classification layer includes a 32×32 global average pooling layer.

[0034] Step 2: Use the image set and the corresponding classification results to train the classification model.

[0035] In order to expand the data samples and improve the accuracy of classification model training, it is necessary to expand the data samples of the original images using data augmentation methods such as upper and lower mirroring, left and right mirroring, and random rotation.

[0036] In order to meet the classification model's requirement for the input image size, i.e. 32×32, the original image needs to be preprocessed by cropping, scaling, etc. so that the size of each image is modified to 32×32.

[0037] After all images are processed, they are labeled (indicating classification results), and the images are divided into training image data sets and verification image data sets according to a certain ratio, and the classification model is trained to obtain a trained classification model. After obtaining the classified classification model, the image classification can be realized.

[0038] Step 3: After obtaining the trained classification model, obtain the image to be classified, and modify its size to 32×32 using techniques such as cropping and scaling, and input the modified image into the classification model to obtain the classification result. At this point, the classification of the image to be classified is completed.

[0039] This method has the following characteristics:

[0040] 1) Based on the connection method between each convolution block in the dense block, cross-dense block connection is added, so that each convolution block in one dense block is connected to the convolution block in another dense block, thereby retaining the features of each level of the image and ensuring the classification accuracy of the classification model.

[0041] 2) The transition layer between the original first dense block and the second dense block, as well as the transition layer between the second dense block and the third dense block are deleted, that is, there is no pooling layer between the first dense block and the second dense block, as well as between the second dense block and the third dense block, and the image resolution is no longer reduced, the original image information is retained as much as possible, and the classification accuracy is further guaranteed.

[0042] 3) The 3×3 convolutional layers contained in the second and third dense blocks are modified to dilated convolutions, and their dilation rates are modified to 2 and 4, respectively, to increase the receptive field.

Claims

1. An image classification method based on an ultra-densely connected neural network, characterized in that: The steps include: 1) Obtain the image to be classified; 2) Input the image to be classified into the trained classification model to obtain the image classification result; The classification model is composed of a convolutional layer, a first dense block, a second dense block, a third dense block and a classification layer connected in sequence. The first dense block, the second dense block and the third dense block each include multiple convolutional blocks, and each convolutional block includes two convolutional layers. The structures of the first dense block, the second dense block and the third dense block of the classification model are respectively consistent with the structures of the first dense block, the second dense block and the third dense block of the DenseNet-40 network model, but all 3×3 convolutional layers in the second dense block of the classification model are hollow convolutional layers with a dilation rate of 2, and all 3×3 convolutional layers in the third dense block of the classification model are hollow convolutional layers with a dilation rate of 4; each convolutional block in the first dense block is connected to each convolutional block in the second dense block, each convolutional block in the second dense block is connected to each convolutional block in the third dense block, and each convolutional block in the first dense block is connected to each convolutional block in the third dense block; the trained classification model is obtained by training the classification model using an image set and corresponding classification results; The classification layer is a 32×32 global average pooling layer.

2. The image classification method based on ultra-densely connected neural network according to claim 1, characterized in that: It also includes the step of preprocessing the image to be classified.

3. The image classification method based on ultra-densely connected neural network according to claim 2 is characterized in that: The preprocessing method includes at least one of cropping and scaling.

4. The image classification method based on ultra-densely connected neural network according to claim 1, characterized in that: When training the classification model, the step of expanding the image set is also included.

5. The image classification method based on ultra-densely connected neural network according to claim 4 is characterized in that: The expansion method includes at least one of upper and lower mirroring, left and right mirroring, and random rotation.

6. The image classification method based on ultra-densely connected neural network according to claim 1, characterized in that: The first convolutional layer in the classification model is a 3×3 convolutional layer.

Citation Information

Patent Citations

  • Hybrid pipelined acceleration architecture and acceleration method for binary weight DenseNet model

    CN112001492A

  • Breast cancer auxiliary diagnosis technology

    CN113205882A

  • Crack image shadow removal method based on improved EnlighttenGAN

    CN118365543A