# Multidimensional Attention-Based CNN Model for Identifying Apple Leaf Disease

Authors: Kahkashan Perveen; Sanjay Kumar; Sahil Kansal; Mukesh Soni; Najla A. Alshaikh; Shanzeh Batool; Mehrun Nisha Khanam; Bernard Osei
Journal: Journal of Food Quality
 (2023)

---

## Abstract

To prevent the spread of illnesses and guarantee the steady and healthy growth of the apple sector, the proper diagnosis of apple leaf diseases is of utmost importance. The subtle interclass variations and enormous intraclass variances among apple leaf disease features, together with the uniformity of disease spots and the complicated background environment, make apple leaf disease diagnosis extremely challenging. A unique dual-branch apple leaf disease diagnosis system (DBNet) was put out to address the aforementioned issues. An attention branch with many dimensions and a multiscale joint branch (MS) make up the dual-branch network topology of the DBNet (DA). In this study, the MS branch and the DA branch are combined to create a DBNet, which successfully improves recognition accuracy while mitigating the negative impacts of complicated backdrop environments and lesion similarities. The accuracy of the DBNet network increases by 0.02843, 0.02412, 0.0144, and 0.0125, respectively, when compared to previous leaf disease detection models. This makes it evident that the suggested DBNet model has certain benefits over others in terms of identifying apple leaf disease.


---

## Body

## 1. Introduction

Plant diseases are the main factors that endanger the development of agriculture worldwide and cause severe economic losses every year. Owing to advancements in machine learning technologies, plant disease identification has become an important research field in pattern recognition and modern agricultural development [1]. Early plant disease identification methods extract the diseased area from the image manually and use the K-means clustering algorithm, an artificial neural network (ANN), and a support vector machine (SVM) according to the segmented plant disease spots and the SVM method for disease diagnosis [2, 3]. However, due to the complexity of plant disease spots, it is not easy to extract helpful disease spot features [4]. Even if compelling lesion features are extracted for diagnosis, the method has the disadvantages of a low recognition rate and weak generalization ability [5, 6]. The proposal of AlexNet in 2012 made the deep convolutional neural network (CNN) more widely used in image recognition [7, 8]. [9] used transfer learning to adjust VGG-16 and realized the disease identification of Camellia oleifera. [10] proposed an ARNet combining attention mechanism and residual to learn tomato disease identification. [11] proposed a dual-channel convolutional neural network that connects the grayscale image of the lesion and the LBP (local binary pattern) feature map to realize the disease identification of pumpkin. The above methods have achieved good results in plant disease identification. However, there is still room for further research on the intra- and interclass gaps caused by complex background environments and the similarity of disease spots.B-CNN record localized feature interactions in a translationally invariant way and represent an image as a pooled outer product of features acquired from two CNNs. Although they may be trained end-to-end, B-CNNs are similar to orderless texture representations constructed on deep features. When two variant extractors gather detailed features with varied morphological and geographic properties rather than using bottleneck features, B-CNNs can be informative. Transferability of weights would be provided by bottleneck features obtained from several state-of-the-art models, but a fine-tuning model created from scratch would provide a general interpretation of features. It is necessary to build second-order pooling techniques that offer 11 precise self-attention processes. In the future, it is intended to use aerial imaging technology to construct a model to extract several properties from many plant leaf photos for different classes instead of doing experiments on single leaf images. To better solve this problem, based on the bilinear convolution neural network B-CNN (bilinear CNN) [12], this paper proposes a new apple leaf disease identification method, DBNet (dual branch network), which is used to identify five common and high incidence mosaic diseases: rust, grey spot, spotted leaf spot, and brown spot-on apple leaves.To accomplish weak-feature adaptive extraction, DB-Net employs a unique dual-branch separation and fusion approach. The Brain Compression Assessment Branch and Infarct Assessment Branch of the DB-Net encoder submodules are suggested to use lightweight encoding structures with variable receptive fields that are tailored to the features of the lesion region. DB-Net reduces duplicate information and clearly explains the severity of lesions using its keyframe selection method and area guiding expertise. In summary, DB-Net combines global and local characteristics to gather multiscale and multicategory brain status information, therefore improving noncontrast CT’s weak points and achieving accurate HT prediction. DB-Net assists clinicians in secondary diagnosing the HT risk of cerebral stroke patients and can prevent doctors from making incorrect HT risk diagnoses. DBNet contains a multiscale branch (MS) and a multidimensional attention branch (DA). The multiscale joint branch (MS) improves the structure of inception [13] to extract image features from different receptive fields and fuses the feature information of different levels through cross-layer connections. Multidimensional attention branch (DA) is a new attention mechanism proposed based on SENet [14], which can extract attention features of 3 different dimensions. Then DBNet fuses the two branches’ multiscale elements and multidimensional features and achieves high recognition accuracy on the apple leaf disease dataset [15] released by Northwest A&F University.The detection of apple leaf diseases has been quite challenging because of their complicated history and the similarities of their lesions. This study suggests a new double-branch network technique for identifying apple leaf diseases (DBNet). This article further goes into great length on the DBNet network topology, the multiscale joint branch (MS) model building, and the multidimensional attention branch (DA) principle in the coming sections.


## 2. Problem Description and Solution Ideas

A dual-branch network detection approach for apple leaf diseases is presented in the study. By combining the multiscale and multidimensional attention elements of lesion pictures, the proposed technique may successfully reduce the complexity of the background environment and the resemblance of lesions to apple leaf diseases. Due to the complex background and the similarity of lesions, the identification of apple leaf diseases has caused great difficulties. This paper proposes a new double-branch network apple leaf disease identification method (DBNet). Next, the DBNet network structure, the model construction of the multiscale joint branch (MS), and the multidimensional attention branch (DA) principle are studied further in this paper in detail.


### 2.1. DBNet Network Structure

Identifying apple leaf diseases is a more detailed subcategory division of the same primary category. Affected by the similarity of lesions, the interclass gap between subclasses is small and influenced by the complex background environment. The intraclass gap between subclasses is large. As shown in Figure1, the color and texture of rust, grey spot, and leaf spot are similar in color and texture, resulting in a small gap between classes.Figure 1
Image of apple leaf disease. (a) Mosaic, (b) rust, (c) grey spot, (d) Alternaria leaf spot, and (e) brown spot.
(a)(b)(c)(d)(e)On the other hand, the influence of leaves and a cluster of leaves results in a sizeable intraclass gap. Therefore, the convolutional neural network has a high probability of misjudgment in the recognition process.B-CNN is mainly used for fine-grained image classification tasks. Compared with traditional convolution neural networks, its unique feature is that the architecture adopts a shunt structure with two branches, each of which uses the primary convolution neural network as feature extraction. The two branches can be either symmetrical or asymmetrical. After the feature extraction, the bilinear pooling operation is used to realize feature fusion. B-CNN adopts a dual-branch structure to extract more object features and local features but does not consider the attention mechanism and the impact of multiscale information on network performance. Based on B-CNN, this paper proposes a novel dual-branch convolution neural network model (DBNet). The starting point of DBNet network design is to alleviate the adverse effects of complex background environment and lesion similarity on disease identification, so a dual-branch structure is designed, and the weights of each branch are not shared. The key to its network structure is to use a dual-branch network to extract more effective lesion features, and because of the different branch network structures, the extracted features are also different. DB-Net offers a novel dual-branch separation and fusion technique to provide weak-feature adaptive extraction. The DB-Net encoder submodules, brain compression assessment branch and infarct assessment branch are advised to utilize lightweight encoding structures with variable receptive fields that are suited to the peculiarities of the lesion location. DB-keyframe Net’s selection process and expertise remove redundant information and effectively convey the severity of lesions. In summary, DB-Net integrates global and local features to collect multiscale and multicategory brain state information, therefore addressing the shortcomings of noncontrast CT and attaining accurate HT prediction. DB-Net helps physicians identify the secondary HT risk of cerebral stroke patients and can help doctors avoid making inaccurate HT risk diagnoses. The multiscale joint branch (MS) uses different convolutional kernels such as standard and atrous convolution to obtain various receptive fields in parallel so that both overall global and detailed local information can be extracted. The multidimensional attention branch (DA) adopts a combination of standard convolution and attention mechanisms to pay more attention to the lesion area of the image and the minor differences between the diseases during disease identification, thereby improving the recognition efficiency of the network accuracy. The network structure of DBNet is shown in Figure2, where Ⓒ represents the Concat connection, ⊗ represents “∗,” ⊕ means “+,” FC refers to the fully connected layer, and Softmax refers to an activation function.Figure 2
DBNet network structure diagram.The DBNet network structure can be categorized into three parts: the multiscale joint branch (MS), the multidimensional attention branch (DA), and the final feature fusion part. Input a disease image of size three × 224 × 224, which extracts features through the MS and DA branches, respectively. Both units use VGG-16 as the base network and adjust the VGG-16 network according to the different functions of the two branches in DBNet. The MS branch obtains image features under various receptive fields through convolution kernels of different sizes, aggregates the extracted features, and connects with the low-level image information of the external network through cross-layer connections to obtain multilevel features, thereby achieving the purpose of multiscale information fusion. The DA branch combines spatial and channelization through the attention mechanism in the three dimensions of channel, width, and height. It performs three-dimensional attention adjustment for each position of the feature map so that the convolutional neural network can better focus on the prominent lesion area of the image. Finally, the features extracted by the MS and DA branches are subjected to global average pooling. While reducing the model parameters, the concept method is used for feature fusion, and finally, the Softmax function is used to achieve apple leaf disease identification.


### 2.2. Multiscale Joint Branch (MS)

Due to the differences in disease spot images of different plant diseases, for example, mosaic disease and brown spot disease on apple leaves are different from rust, grey spot disease, and spotted leaf disease. The lesion area of the latter three only occupies a small part of the leaves. Moreover, the influence of complex backgrounds such as a single leaf and a cluster of leaves will also cause significant difficulties in the image recognition of the same type of disease. Therefore, it is not optimal to obtain features of multiscale objects under only one convolution branch. The primary purpose of constructing the MS branch is to get different receptive fields by using convolution kernels of various sizes. When the lesion information in the image is scattered, the large kernel convolution can obtain more global features, while the lesion information can be obtained.On the other hand, the small kernel convolution can get more local parts when the information distribution is relatively concentrated. The structure of the MS branch module is shown in Figure3. C refers to the number of channels, W refers to the width, H refers to the height, d refers to the void ratio, Concat connection, and ⊕ means “+.” The MS branch can be divided into multiscale convolutional and cross-layer links. The multisize convolution part consists of 6 convolution kernels of different sizes, consisting of 1 × 1 and 3 × 3 convolutions, respectively, atrous convolutions with atrous rates of 2 and 3 [14], and 1 × 3 and 3 × 1 nonconvolutions composed of symmetric convolutions [16].Figure 3
MS branch structure diagram.The distance between the kernel locations is governed by the dilation factor. The atrous method is another name for the convolution carried out in this manner. The architecture, in this case, uses the atrous algorithm in conjunction with FC-reduced VGG16. By introducing zero-values into the convolution kernels, dilated convolutions or atrous convolutions increase the window size without increasing the number of weights. Among them, the atrous convolution is a hyperparameter with a whole rate added to the standard convolution, and the number 0 can be used to fill the convolution kernel during implementation. As shown in Figure4(a): the 3 × 3 standard convolution has a hole rate of 1, and the receptive field is 3 × 3. The convolution with a hole rate of 2 is filled with a 0 in the 3 × 3 standard convolution. The receptive field is 5 × 5; the convolution with a dilation rate of 3 is filled with two 0 s in the 3 × 3 standard convolution, and the receptive field is 7 × 7. In the deep convolutional neural network, down-sampling is usually used to increase the receptive field, but it will reduce the image resolution and may cause loss of spatial detail information. The dilated convolution expands the receptive field by setting the dilation rate, and setting different dilation rates can also capture multiscale context information. It can be seen from Figure 4(a) that the atrous convolution with atrous rates of 2 and 3 expands the receptive field of the 3 × 3 convolution to 5 × 5 and 7 × 7 without adding additional parameters, capturing the multistage information.Figure 4
Atrous convolution and asymmetric convolution. (a) Dilated convolution and (b) asymmetric convolution.
(a)(b)Asymmetric convolutions operate by separating the image’sx and y axes. Using a convolution with an (n × 1) kernel before one with a (1 × n) kernel, for instance. Fewer parameters and less processing are required for the asymmetric 3D convolutions. For a more accurate analysis of the human activity in movies, 3D convolution extends 2D convolution to the spatial-temporal domain. However, compared to 2D convolution, 3D convolution uses a much larger number of parameters. The standard n × n convolution can be decomposed into two one × n and n × one asymmetric convolutions. The calculation amount of n × n standard convolution is n × n, and the calculation amount becomes 2 × n after decomposing into asymmetric convolution. Asymmetric convolutions 1 × 3 and 3 × 1 were initially designed to reduce the amount of computation, but there will be a slight loss of accuracy, so the results of the 3 × 3 convolution and 1 × 3, 3 × 1 convolution are added. Based on the original 3 × 3 convolution, the horizontal and vertical kernels are also learned, as shown in Figure 4(b). The main idea is to use 3 parallel layers to operate the input feature with the standard convolution and two asymmetric convolutions, and then use the additive properties of the convolution to fuse the asymmetric convolution into the standard convolution equivalently. The three convolution kernels can be regarded as enhanced convolution kernels. That is, the kernel skeleton of the standard convolution is enhanced by the asymmetric convolution.(1)out=sumg3∗3y,g3∗1yⒸg1∗1y,g3∗32yⒸg3∗33y.In the formula, g represents different types of convolution operations: x represents the input; sum represents the addition operation; and Ⓒ represents the concept connection.The input image size of the MS branch isC×H×W, the number of channels is C, and 4 sets of feature maps are generated through 6 convolution kernels of different sizes. First, the number of product kernels is set to C/4. The concept connection aggregates 4 groups of feature maps with a channel number of C/4. The channel number of the feature map is C, the same as the original input size. The cross-layer connection combines the low-level and high-level information of the CNN, which not only retains the low-level texture information but also improves the high-level semantic information of the CNN. As shown in Figure 5, the cross-layer connection connects the feature map output by the upper layer of the CNN with the feature map output by the lower layer of the convolution neural network, the number of channels will be doubled, and this feature map is used like the following feature map—layer input.Figure 5
Cross-layer connections.


### 2.3. Multidimensional Attention Branch (DA)

SENet is built with a “Squeeze-and-Excitation” (SE) block that explicitly models interdependencies between channels to adaptively recalibrate channel-wise feature responses. A compression method suggested by the squeeze and excitation (SE) methodology is used for condensable abstraction of numerous contiguous slices of a volume into a single slice to consolidate the information across layers of an image volume. By updating the concurrent SE block, we additionally augment the network with spatial and channel-wise attention in addition to the increased input for the 2D backbone network. The resultant network gains from the 2D network’s cheap computing cost as well as the enhanced data from picture volumes and carefully observed characteristics. The multidimensional attention branch net (MDA-Net) simulates the manual segmentation procedure for 3D images. When working with an image volume, we frequently choose one main view to successively segment 2D slices, periodically checking the third dimension across slices to get more data.Compared with traditional image classification, the gaps between different types of plant diseases are only contained in small local details. They are also affected by the lesions' background and shape, making identification more difficult. The MS branch can deal with the intraclass gap caused by complex environments and the uneven distribution of lesions through the fusion of multiscale information. However, for the small interclass gap between some lesions, the effect is not apparent, and in the process of down-sampling, important local news will be lost. Based on SENet, this article proposes a new attention mechanism, multidimensional attention, and constructs a multidimensional attention branch (DA) through the multidimensional attention mechanism. The DA branch employs an attention mechanism to pinpoint the lesion location in the image, allowing for more effective lesion features and mitigating the negative effects of the image size change. The structure of the multidimensional attention module is shown in Figure6.Figure 6
Structure diagram of the DA branch attention module.Among them, C refers to the number of channels, H refers to the height, W refers to the width, 1 × 1 Conv represents 1×1 convolution, and Softmax() refers to the Softmax activation operation on a particular dimension, ⊗ describes “∗,” and ⊕ means “+.”The input size of the DA branch module isC × H × W. After 1 × 1 convolution, Softmax operations are performed in the three dimensions of channel, height, and width, and xi represents different states. Input f1 refers to the convolution operation, and Softmax() refers to the Softmax operation on a particular dimension in the following formula:(2)yC=SoftmaxCg1y,yH=SoftmaxHg1y,yW=SoftmaxWg1y.After the Softmax operation is multiplied by a dimension proportion coefficient, the coefficient represents the proportion of each dimension to obtain the overall balance of each dimension’s attention. Ai represents attention to different sizes, and sum represents the sum operation in the following formula:(3)BC=CsumC,H,W∗yC,BH=HsumC,H,W∗yH,BW=WsumC,H,W∗yW.Then, the attention of different dimensions is added, multiplied with the input image to obtain attention features, and finally accumulated with the input image to get more significant image features.(4)yout=y+sumBC,BH,BW.The principle of the DA branch attention module is shown in Figure7. Among them, the size of the input matrix Xin(C × W × H) is 2 × 3 × 4, and the value of each element is as follows:(5)Yin=234514567889223454765789.Figure 7
Schematic diagram of multidimensional attention.Spatial attention adjusts the feature map at each position of the (H, W) two dimensions, and channel attention changes the channel dimension C. The multidimensional attention module treats the feature map in the convolutional neural network as a three-dimensional matrix, and each positioning element is independent of the other. The attention matrices of the three dimensions C, H, and W are calculated by the Softmax function, but because the three dimensions C, H, and W are not the same size, the proportion of each dimension in the whole is not the same. As the number of layers of the convolution neural network continues to deepen, the three dimensions C, W, and H will also change, so they need to be multiplied by a dimension proportion coefficient as shown in formula (3). In the shallow CNN, the number of channels is small due to the large height and width of the image, and the two dimensions of width and size play a crucial role. With the down-sampling of the convolution neural network, the number of channels increases and the width and height decrease, so the channel dimension plays a significant role in the deep convolution neural network. Therefore, the attention mechanism of the DA branch can also change the proportion of attention in each dimension as the number of network layers continues to deepen.


## 2.1. DBNet Network Structure

Identifying apple leaf diseases is a more detailed subcategory division of the same primary category. Affected by the similarity of lesions, the interclass gap between subclasses is small and influenced by the complex background environment. The intraclass gap between subclasses is large. As shown in Figure1, the color and texture of rust, grey spot, and leaf spot are similar in color and texture, resulting in a small gap between classes.Figure 1
Image of apple leaf disease. (a) Mosaic, (b) rust, (c) grey spot, (d) Alternaria leaf spot, and (e) brown spot.
(a)(b)(c)(d)(e)On the other hand, the influence of leaves and a cluster of leaves results in a sizeable intraclass gap. Therefore, the convolutional neural network has a high probability of misjudgment in the recognition process.B-CNN is mainly used for fine-grained image classification tasks. Compared with traditional convolution neural networks, its unique feature is that the architecture adopts a shunt structure with two branches, each of which uses the primary convolution neural network as feature extraction. The two branches can be either symmetrical or asymmetrical. After the feature extraction, the bilinear pooling operation is used to realize feature fusion. B-CNN adopts a dual-branch structure to extract more object features and local features but does not consider the attention mechanism and the impact of multiscale information on network performance. Based on B-CNN, this paper proposes a novel dual-branch convolution neural network model (DBNet). The starting point of DBNet network design is to alleviate the adverse effects of complex background environment and lesion similarity on disease identification, so a dual-branch structure is designed, and the weights of each branch are not shared. The key to its network structure is to use a dual-branch network to extract more effective lesion features, and because of the different branch network structures, the extracted features are also different. DB-Net offers a novel dual-branch separation and fusion technique to provide weak-feature adaptive extraction. The DB-Net encoder submodules, brain compression assessment branch and infarct assessment branch are advised to utilize lightweight encoding structures with variable receptive fields that are suited to the peculiarities of the lesion location. DB-keyframe Net’s selection process and expertise remove redundant information and effectively convey the severity of lesions. In summary, DB-Net integrates global and local features to collect multiscale and multicategory brain state information, therefore addressing the shortcomings of noncontrast CT and attaining accurate HT prediction. DB-Net helps physicians identify the secondary HT risk of cerebral stroke patients and can help doctors avoid making inaccurate HT risk diagnoses. The multiscale joint branch (MS) uses different convolutional kernels such as standard and atrous convolution to obtain various receptive fields in parallel so that both overall global and detailed local information can be extracted. The multidimensional attention branch (DA) adopts a combination of standard convolution and attention mechanisms to pay more attention to the lesion area of the image and the minor differences between the diseases during disease identification, thereby improving the recognition efficiency of the network accuracy. The network structure of DBNet is shown in Figure2, where Ⓒ represents the Concat connection, ⊗ represents “∗,” ⊕ means “+,” FC refers to the fully connected layer, and Softmax refers to an activation function.Figure 2
DBNet network structure diagram.The DBNet network structure can be categorized into three parts: the multiscale joint branch (MS), the multidimensional attention branch (DA), and the final feature fusion part. Input a disease image of size three × 224 × 224, which extracts features through the MS and DA branches, respectively. Both units use VGG-16 as the base network and adjust the VGG-16 network according to the different functions of the two branches in DBNet. The MS branch obtains image features under various receptive fields through convolution kernels of different sizes, aggregates the extracted features, and connects with the low-level image information of the external network through cross-layer connections to obtain multilevel features, thereby achieving the purpose of multiscale information fusion. The DA branch combines spatial and channelization through the attention mechanism in the three dimensions of channel, width, and height. It performs three-dimensional attention adjustment for each position of the feature map so that the convolutional neural network can better focus on the prominent lesion area of the image. Finally, the features extracted by the MS and DA branches are subjected to global average pooling. While reducing the model parameters, the concept method is used for feature fusion, and finally, the Softmax function is used to achieve apple leaf disease identification.


## 2.2. Multiscale Joint Branch (MS)

Due to the differences in disease spot images of different plant diseases, for example, mosaic disease and brown spot disease on apple leaves are different from rust, grey spot disease, and spotted leaf disease. The lesion area of the latter three only occupies a small part of the leaves. Moreover, the influence of complex backgrounds such as a single leaf and a cluster of leaves will also cause significant difficulties in the image recognition of the same type of disease. Therefore, it is not optimal to obtain features of multiscale objects under only one convolution branch. The primary purpose of constructing the MS branch is to get different receptive fields by using convolution kernels of various sizes. When the lesion information in the image is scattered, the large kernel convolution can obtain more global features, while the lesion information can be obtained.On the other hand, the small kernel convolution can get more local parts when the information distribution is relatively concentrated. The structure of the MS branch module is shown in Figure3. C refers to the number of channels, W refers to the width, H refers to the height, d refers to the void ratio, Concat connection, and ⊕ means “+.” The MS branch can be divided into multiscale convolutional and cross-layer links. The multisize convolution part consists of 6 convolution kernels of different sizes, consisting of 1 × 1 and 3 × 3 convolutions, respectively, atrous convolutions with atrous rates of 2 and 3 [14], and 1 × 3 and 3 × 1 nonconvolutions composed of symmetric convolutions [16].Figure 3
MS branch structure diagram.The distance between the kernel locations is governed by the dilation factor. The atrous method is another name for the convolution carried out in this manner. The architecture, in this case, uses the atrous algorithm in conjunction with FC-reduced VGG16. By introducing zero-values into the convolution kernels, dilated convolutions or atrous convolutions increase the window size without increasing the number of weights. Among them, the atrous convolution is a hyperparameter with a whole rate added to the standard convolution, and the number 0 can be used to fill the convolution kernel during implementation. As shown in Figure4(a): the 3 × 3 standard convolution has a hole rate of 1, and the receptive field is 3 × 3. The convolution with a hole rate of 2 is filled with a 0 in the 3 × 3 standard convolution. The receptive field is 5 × 5; the convolution with a dilation rate of 3 is filled with two 0 s in the 3 × 3 standard convolution, and the receptive field is 7 × 7. In the deep convolutional neural network, down-sampling is usually used to increase the receptive field, but it will reduce the image resolution and may cause loss of spatial detail information. The dilated convolution expands the receptive field by setting the dilation rate, and setting different dilation rates can also capture multiscale context information. It can be seen from Figure 4(a) that the atrous convolution with atrous rates of 2 and 3 expands the receptive field of the 3 × 3 convolution to 5 × 5 and 7 × 7 without adding additional parameters, capturing the multistage information.Figure 4
Atrous convolution and asymmetric convolution. (a) Dilated convolution and (b) asymmetric convolution.
(a)(b)Asymmetric convolutions operate by separating the image’sx and y axes. Using a convolution with an (n × 1) kernel before one with a (1 × n) kernel, for instance. Fewer parameters and less processing are required for the asymmetric 3D convolutions. For a more accurate analysis of the human activity in movies, 3D convolution extends 2D convolution to the spatial-temporal domain. However, compared to 2D convolution, 3D convolution uses a much larger number of parameters. The standard n × n convolution can be decomposed into two one × n and n × one asymmetric convolutions. The calculation amount of n × n standard convolution is n × n, and the calculation amount becomes 2 × n after decomposing into asymmetric convolution. Asymmetric convolutions 1 × 3 and 3 × 1 were initially designed to reduce the amount of computation, but there will be a slight loss of accuracy, so the results of the 3 × 3 convolution and 1 × 3, 3 × 1 convolution are added. Based on the original 3 × 3 convolution, the horizontal and vertical kernels are also learned, as shown in Figure 4(b). The main idea is to use 3 parallel layers to operate the input feature with the standard convolution and two asymmetric convolutions, and then use the additive properties of the convolution to fuse the asymmetric convolution into the standard convolution equivalently. The three convolution kernels can be regarded as enhanced convolution kernels. That is, the kernel skeleton of the standard convolution is enhanced by the asymmetric convolution.(1)out=sumg3∗3y,g3∗1yⒸg1∗1y,g3∗32yⒸg3∗33y.In the formula, g represents different types of convolution operations: x represents the input; sum represents the addition operation; and Ⓒ represents the concept connection.The input image size of the MS branch isC×H×W, the number of channels is C, and 4 sets of feature maps are generated through 6 convolution kernels of different sizes. First, the number of product kernels is set to C/4. The concept connection aggregates 4 groups of feature maps with a channel number of C/4. The channel number of the feature map is C, the same as the original input size. The cross-layer connection combines the low-level and high-level information of the CNN, which not only retains the low-level texture information but also improves the high-level semantic information of the CNN. As shown in Figure 5, the cross-layer connection connects the feature map output by the upper layer of the CNN with the feature map output by the lower layer of the convolution neural network, the number of channels will be doubled, and this feature map is used like the following feature map—layer input.Figure 5
Cross-layer connections.


## 2.3. Multidimensional Attention Branch (DA)

SENet is built with a “Squeeze-and-Excitation” (SE) block that explicitly models interdependencies between channels to adaptively recalibrate channel-wise feature responses. A compression method suggested by the squeeze and excitation (SE) methodology is used for condensable abstraction of numerous contiguous slices of a volume into a single slice to consolidate the information across layers of an image volume. By updating the concurrent SE block, we additionally augment the network with spatial and channel-wise attention in addition to the increased input for the 2D backbone network. The resultant network gains from the 2D network’s cheap computing cost as well as the enhanced data from picture volumes and carefully observed characteristics. The multidimensional attention branch net (MDA-Net) simulates the manual segmentation procedure for 3D images. When working with an image volume, we frequently choose one main view to successively segment 2D slices, periodically checking the third dimension across slices to get more data.Compared with traditional image classification, the gaps between different types of plant diseases are only contained in small local details. They are also affected by the lesions' background and shape, making identification more difficult. The MS branch can deal with the intraclass gap caused by complex environments and the uneven distribution of lesions through the fusion of multiscale information. However, for the small interclass gap between some lesions, the effect is not apparent, and in the process of down-sampling, important local news will be lost. Based on SENet, this article proposes a new attention mechanism, multidimensional attention, and constructs a multidimensional attention branch (DA) through the multidimensional attention mechanism. The DA branch employs an attention mechanism to pinpoint the lesion location in the image, allowing for more effective lesion features and mitigating the negative effects of the image size change. The structure of the multidimensional attention module is shown in Figure6.Figure 6
Structure diagram of the DA branch attention module.Among them, C refers to the number of channels, H refers to the height, W refers to the width, 1 × 1 Conv represents 1×1 convolution, and Softmax() refers to the Softmax activation operation on a particular dimension, ⊗ describes “∗,” and ⊕ means “+.”The input size of the DA branch module isC × H × W. After 1 × 1 convolution, Softmax operations are performed in the three dimensions of channel, height, and width, and xi represents different states. Input f1 refers to the convolution operation, and Softmax() refers to the Softmax operation on a particular dimension in the following formula:(2)yC=SoftmaxCg1y,yH=SoftmaxHg1y,yW=SoftmaxWg1y.After the Softmax operation is multiplied by a dimension proportion coefficient, the coefficient represents the proportion of each dimension to obtain the overall balance of each dimension’s attention. Ai represents attention to different sizes, and sum represents the sum operation in the following formula:(3)BC=CsumC,H,W∗yC,BH=HsumC,H,W∗yH,BW=WsumC,H,W∗yW.Then, the attention of different dimensions is added, multiplied with the input image to obtain attention features, and finally accumulated with the input image to get more significant image features.(4)yout=y+sumBC,BH,BW.The principle of the DA branch attention module is shown in Figure7. Among them, the size of the input matrix Xin(C × W × H) is 2 × 3 × 4, and the value of each element is as follows:(5)Yin=234514567889223454765789.Figure 7
Schematic diagram of multidimensional attention.Spatial attention adjusts the feature map at each position of the (H, W) two dimensions, and channel attention changes the channel dimension C. The multidimensional attention module treats the feature map in the convolutional neural network as a three-dimensional matrix, and each positioning element is independent of the other. The attention matrices of the three dimensions C, H, and W are calculated by the Softmax function, but because the three dimensions C, H, and W are not the same size, the proportion of each dimension in the whole is not the same. As the number of layers of the convolution neural network continues to deepen, the three dimensions C, W, and H will also change, so they need to be multiplied by a dimension proportion coefficient as shown in formula (3). In the shallow CNN, the number of channels is small due to the large height and width of the image, and the two dimensions of width and size play a crucial role. With the down-sampling of the convolution neural network, the number of channels increases and the width and height decrease, so the channel dimension plays a significant role in the deep convolution neural network. Therefore, the attention mechanism of the DA branch can also change the proportion of attention in each dimension as the number of network layers continues to deepen.


## 3. Experimental Results and Analysis

### 3.1. Experiment Preparation

The experiment uses the open-source apple leaf disease data set of Northwest A&F University, as shown in Figure1. The data set uses a BM-500GE color camera to shoot in outdoor and laboratory environments, comprising 26,377 images, including 4,875 mosaic disease images, 5 655 pieces of brown spot disease, 5 694 pieces of rust disease, 4 810 pieces of grey leaf spot disease, and 5 343 pieces of leaf spot disease. Take 70% of the data set as training and 30% as a test, the training set to the test set is 7 : 3, and keep the identical data distribution of the training set and test set. The specific data distribution is shown in Table 1. The training set contains 18462 images, and the validation set contains 7,915 photographs. Table 2 depicts the experimental environment’s specific setup. NVIDIA Tesla V100 graphics card with 32 GB video memory is used, and the Paddle 1.8.3 version is used for the deep learning framework. The rate is 0.001, the loss function adopts cross-entropy loss, and finally, the neural network is trained with 60 images per batch (batch size), and the training period (epoch) is 30 rounds. Table 3 shows the experimental parameters.Table 1
Data distribution.
Apple leaf diseaseData setTraining setValidation setMosaic disease587544122463Brown spot disease665549582697Rust669449852709Gray spot disease581043672443Spotted leaf disease634347402603Total313772346212915Table 2
Experimental configuration.
Configuration itemsParameter valuesCPUIntel® Xeon® gold 6271C CPU @ 2.60 GHzGraphics cardNVIDIA tesla V100 GPU 32 GBMemory32 GBDisk100 GBDeep learning frameworkPaddle 1.8.3Operating systemUbuntu 16.04 LTSOther toolsPython 3.7, CUDA10.1Table 3
Experimental parameter.
Parameter namesParameter valuesSize of image224 × 224Size of batch70Rate of learning0.001Training period (epoch)40The NVIDIA V100 Tensor Core is the most sophisticated data center GPU yet created, capable of accelerating AI, high-performance computing (HPC), and graphics. It is driven by NVIDIA Volta architecture, is available in 16 and 32 GB variants, and can execute up to 100 CPUs in a single GPU. Data scientists, academics, and engineers may now focus on building the next AI breakthrough rather than minimizing memory utilization. Data scientists are tackling more sophisticated AI tasks, such as voice recognition, virtual personal assistant training, and teaching self-driving cars. Solving this kind of challenge necessitates training deep learning models with exponentially increasing complexity in a reasonable period. The V100 GPU is the first in the world to achieve the deep learning performance of 100 teraFLOPS (TFLOPS) thanks to its 640 Tensor Cores. The most powerful processing servers in the world are made possible by the newest iteration of NVIDIA NVLINK, which links several V100 GPUs at speeds of up to 300 GB/s. On earlier systems, training AI models would take weeks of computer time. Now, it just takes a few days. With this significant decrease in training time, AI will now be able to solve a vast array of issues.


### 3.2. Experimental Results and Analysis

To verify the effectiveness of the proposed DBNet method, this method is compared with the commonly used convolutional neural network models, namely, VGG-16, AlexNet, ResNet-50, and B-CNN. On the apple leaf disease dataset, each model is trained from scratch until the model converges, and the training conditions of each model are guaranteed to be the same. In the model training process, each time the training set completes a training iteration, a test is performed on the validation set, which can more intuitively display the performance changes of the model during the training process. Figure8 with Tables 4–7 shows the changes in the loss function and accuracy of various network models on the apple leaf disease dataset. Among them, loss refers to the loss function, Epoch refers to the training period, and accuracy (acc) refers to the accuracy rate.Figure 8
(a) AlexNet loss and accuracy, (b) VGG-16 loss and accuracy, (c) ResNet-50 loss and accuracy, and (d) training results of different network models.
(a)(b)(c)(d)Table 4
AlexNet loss and accuracy.
SerialTrain lossTrain accVal lossVal acc10.30.40.330.3950.350.480.360.4490.40.520.410.48130.450.560.450.52170.50.590.510.56210.550.620.550.62250.60.660.580.65290.650.690.630.7Table 5
VGG-16 loss and accuracy.
SerialTrain lossTrain accVal lossVal acc10.20.30.230.2950.250.380.260.3490.30.420.310.38130.350.460.350.42170.40.490.410.46210.450.520.450.52250.50.560.480.55290.550.690.630.7Table 6
ResNet-50 loss and accuracy.
SerialTrain lossTrain accVal lossVal acc10.10.030.090.1950.180.060.140.2490.220.110.180.28130.260.150.220.32170.290.210.260.36210.320.250.320.42250.360.280.350.45290.490.430.50.6Table 7
Training results of different network models.
SerialTrain lossTrain accVal lossVal acc10.11.030.50.5550.181.060.450.6490.261.110.490.68130.31.150.40.72170.331.210.390.76210.361.250.350.82250.41.280.340.85290.531.430.31It can be seen from Figure8 that the models of DBNet, AlexNet, VGG-16, ResNet-50, and B-CNN all converged within 30 rounds of training cycles. Although the DBNet model has more attention modules and multiscale parts than other models, it does not affect the model loss function’s decline speed and convergence speed. From the training and validation data results, it can be seen that DBNet does not have serious overfitting due to its model structure in the apple leaf disease data.The accuracy rates of VGG-16, DBNet, ResNet-50, AlexNet, and B-CNN network models are shown in Table8. The DBNet proposed in this article has attained the highest recognition accuracy of 97.662% on the apple leaf disease dataset. Compared with VGG-16, ResNet-50, AlexNet, and B-CNN, the recognition accuracy is improved by 0.10764, 0.05407, 0.04649, respectively, from 0.0312. The effectiveness of the DBNet method in apple leaf disease identification has been verified.Table 8
Accuracy of the network model.
Network modelAccuracy (accuracy) %AlexNet96.898VGG1682.255ResNet5083.013B-CNN84.542DBNet87.662Figure9 with table data in 6 depicts the variance in the accuracy of different models. In the figure, each network model shows an overall upward trend. In the first 20 training cycles, the accuracy of each network model fluctuates wildly. The accuracy improves significantly in the last 10 training cycles and gradually stabilizes. AlexNet contains five convolutional layers and three fully connected layers; the network depth is eight layers; and the accuracy rate on the dataset is only 86.898%. The VGG-16 network depth is sixteen layers, which is 0.05357 higher than that of AlexNet, indicating that the network depth significantly influences the accuracy. Experimenting with the deeper ResNet-50 network, the accuracy rate is improved by 0.00758 compared with VGG-16, and the improvement is insignificant. Therefore, after the network depth reaches a certain level, the neural network is deepened again, and the effect is not expected to be considerable. Still, with the web, as the model’s depth increases, the model becomes more complex. Compared with the single-branch network ResNet-50 with the highest accuracy, the B-CNN network composed of two VGG-16s in the experiment is improved by 0.01529, indicating that the dual-branch network is better than the single-branch in the task of apple leaf disease identification. The dual-branch network can extract more image features. The DBNet proposed, which includes the MS branch and DA branch, can better alleviate the adverse effects of complex background environment and the similarity of lesions compared with the two VGG-16 branches of the B-CNN, and the accuracy rate is also high. It reached 97.662%.Figure 9
Comparison of accuracy changes of different network models.To verify the complexity of the DBNet model, this paper analyses it in terms of model parameters (Params), floating-point operations (FLOPs), and CPU prediction time, as shown in Table9. AlexNet is affected by the depth of the network, and the model parameters, the number of floating-point operations, and the prediction time are the least affected, but its accuracy is also affected. ResNet-50 adopts the bottleneck module, which reduces the number of parameters compared with VGG-16, and B-CNN makes the model too complicated due to the dual branch network and bilinear pooling. Although the DBNet in this article uses two VGG-16 as the primary network, the DA branch in DBNet replaces the standard convolution in VGG-16 with a depth-wise separable convolution, and the MS branch uses a combination of shallow information and in-depth information. The cross-layer connection dramatically reduces the number of model parameters, floating-point operations, and prediction time.Table 9
Network complexity.
Network modelModel parameters (106)Number of floating-pointoperations (109)CPU prediction time (ms)AlexNet6.77482.1729ResNet5033.51839.19180VGG16238.35 631.84502B-CNN391.58 862.691139DBNet24.03218.89226


### 3.3. Ablation Experiment

To verify the influence of different combinations of convolution types on the MS branch, 9 groups of ablation experiments were set up, and the results are shown in Table10. When a single 3 × 3 convolution kernel is increased to multiple convolution kernels, the network width in the MS branch increases. The hole convolution experiment with 3 different hole rates is set to have an upward trend; when the hole rate d = 4, the accuracy rate decreases, and finally, the whole convolution with hole rate d = 2, 3 is selected. The 3 × 1 and 1 × 3 asymmetric convolutions boost the nonlinearity of the network, improve the expressiveness of the model, and additionally learn the features of the horizontal and vertical kernels, increasing the diversity of captured features and thereby improving the classification accuracy. To verify the influence of the MS branch and DA branch on DBNet network performance, four kinds of network structures VGG + VGG, VGG + MS, VGG + DA, and MS + DA ablation experiments were set up, respectively. After 30 rounds of training, the accuracy changes of the four network structures in the validation set are shown in Figure 9. The accuracy rates of the VGG + MS structure and VGG + DA structure are better than those of the VGG + VGG structure, and the MS + DA structure has the highest accuracy, indicating that the MS branch and DA branch have a promoting effect on apple leaf disease identification.Table 10
Comparison of accuracy changes of different network models.
SerialAlexNetVGG-16ResNet-50B-CNNDBNet10.50.60.530.590.5450.550.680.560.640.5990.60.720.610.680.65130.650.760.650.720.69170.70.790.710.760.74210.750.820.750.820.79250.80.860.780.850.82290.850.890.830.90.89Table11 identifies different apple leaf diseases by the four network structures of VGG + VGG, VGG + MS, VGG + DA, and MS + DA. In Table 11, the accuracy of the VGG + MS structure in the identification of five kinds of apple leaf diseases was higher than that of the VGG + VGG structure, indicating that MS branches can extract multiscale features and alleviate the adverse effects of complex background environments and uneven distribution of lesion shape [17]. On the contrary, the VGG + DA structure has high recognition accuracy for rust, grey spot, and spotted leaf disease, indicating that the DA branch can use a multidimensional attention method to alleviate the adverse effects of the similarity of lesions effectively. Therefore, this article combines the MS branch and the DA branch to form a DBNet, which can refine the recognition accuracy effectively and alleviate the adverse effects of complex background environments and lesion similarity.Table 11
Ablation experiments.
Apple leaf diseaseVGG + VGGVGG + MSVGG + DAMS + DAMosaic disease98.658100100100Brown spot disease97.99499.05599.23299.939Rust94.6895.49995.67596.846Gray spot disease96.35796.56498.22898.643Spotted leaf disease94.63795.44896.75798.005Five apple leaf diseases95.04997.05897.79198.662As given in Table12, when comparing the DBNet network to other leaf disease detection models, its accuracy improves by 0.02843, 0.02412, 0.0144, and 0.0125, respectively. This clearly shows that the proposed DBNet model has certain advantages as compared to others in detecting apple leaf disease.Table 12
Comparison of experiment results.
ModelsAccuracy (Accuracy) %[18]95.819[19]96.25[20]97.222[21]97.412DBNet96.662


## 3.1. Experiment Preparation

The experiment uses the open-source apple leaf disease data set of Northwest A&F University, as shown in Figure1. The data set uses a BM-500GE color camera to shoot in outdoor and laboratory environments, comprising 26,377 images, including 4,875 mosaic disease images, 5 655 pieces of brown spot disease, 5 694 pieces of rust disease, 4 810 pieces of grey leaf spot disease, and 5 343 pieces of leaf spot disease. Take 70% of the data set as training and 30% as a test, the training set to the test set is 7 : 3, and keep the identical data distribution of the training set and test set. The specific data distribution is shown in Table 1. The training set contains 18462 images, and the validation set contains 7,915 photographs. Table 2 depicts the experimental environment’s specific setup. NVIDIA Tesla V100 graphics card with 32 GB video memory is used, and the Paddle 1.8.3 version is used for the deep learning framework. The rate is 0.001, the loss function adopts cross-entropy loss, and finally, the neural network is trained with 60 images per batch (batch size), and the training period (epoch) is 30 rounds. Table 3 shows the experimental parameters.Table 1
Data distribution.
Apple leaf diseaseData setTraining setValidation setMosaic disease587544122463Brown spot disease665549582697Rust669449852709Gray spot disease581043672443Spotted leaf disease634347402603Total313772346212915Table 2
Experimental configuration.
Configuration itemsParameter valuesCPUIntel® Xeon® gold 6271C CPU @ 2.60 GHzGraphics cardNVIDIA tesla V100 GPU 32 GBMemory32 GBDisk100 GBDeep learning frameworkPaddle 1.8.3Operating systemUbuntu 16.04 LTSOther toolsPython 3.7, CUDA10.1Table 3
Experimental parameter.
Parameter namesParameter valuesSize of image224 × 224Size of batch70Rate of learning0.001Training period (epoch)40The NVIDIA V100 Tensor Core is the most sophisticated data center GPU yet created, capable of accelerating AI, high-performance computing (HPC), and graphics. It is driven by NVIDIA Volta architecture, is available in 16 and 32 GB variants, and can execute up to 100 CPUs in a single GPU. Data scientists, academics, and engineers may now focus on building the next AI breakthrough rather than minimizing memory utilization. Data scientists are tackling more sophisticated AI tasks, such as voice recognition, virtual personal assistant training, and teaching self-driving cars. Solving this kind of challenge necessitates training deep learning models with exponentially increasing complexity in a reasonable period. The V100 GPU is the first in the world to achieve the deep learning performance of 100 teraFLOPS (TFLOPS) thanks to its 640 Tensor Cores. The most powerful processing servers in the world are made possible by the newest iteration of NVIDIA NVLINK, which links several V100 GPUs at speeds of up to 300 GB/s. On earlier systems, training AI models would take weeks of computer time. Now, it just takes a few days. With this significant decrease in training time, AI will now be able to solve a vast array of issues.


## 3.2. Experimental Results and Analysis

To verify the effectiveness of the proposed DBNet method, this method is compared with the commonly used convolutional neural network models, namely, VGG-16, AlexNet, ResNet-50, and B-CNN. On the apple leaf disease dataset, each model is trained from scratch until the model converges, and the training conditions of each model are guaranteed to be the same. In the model training process, each time the training set completes a training iteration, a test is performed on the validation set, which can more intuitively display the performance changes of the model during the training process. Figure8 with Tables 4–7 shows the changes in the loss function and accuracy of various network models on the apple leaf disease dataset. Among them, loss refers to the loss function, Epoch refers to the training period, and accuracy (acc) refers to the accuracy rate.Figure 8
(a) AlexNet loss and accuracy, (b) VGG-16 loss and accuracy, (c) ResNet-50 loss and accuracy, and (d) training results of different network models.
(a)(b)(c)(d)Table 4
AlexNet loss and accuracy.
SerialTrain lossTrain accVal lossVal acc10.30.40.330.3950.350.480.360.4490.40.520.410.48130.450.560.450.52170.50.590.510.56210.550.620.550.62250.60.660.580.65290.650.690.630.7Table 5
VGG-16 loss and accuracy.
SerialTrain lossTrain accVal lossVal acc10.20.30.230.2950.250.380.260.3490.30.420.310.38130.350.460.350.42170.40.490.410.46210.450.520.450.52250.50.560.480.55290.550.690.630.7Table 6
ResNet-50 loss and accuracy.
SerialTrain lossTrain accVal lossVal acc10.10.030.090.1950.180.060.140.2490.220.110.180.28130.260.150.220.32170.290.210.260.36210.320.250.320.42250.360.280.350.45290.490.430.50.6Table 7
Training results of different network models.
SerialTrain lossTrain accVal lossVal acc10.11.030.50.5550.181.060.450.6490.261.110.490.68130.31.150.40.72170.331.210.390.76210.361.250.350.82250.41.280.340.85290.531.430.31It can be seen from Figure8 that the models of DBNet, AlexNet, VGG-16, ResNet-50, and B-CNN all converged within 30 rounds of training cycles. Although the DBNet model has more attention modules and multiscale parts than other models, it does not affect the model loss function’s decline speed and convergence speed. From the training and validation data results, it can be seen that DBNet does not have serious overfitting due to its model structure in the apple leaf disease data.The accuracy rates of VGG-16, DBNet, ResNet-50, AlexNet, and B-CNN network models are shown in Table8. The DBNet proposed in this article has attained the highest recognition accuracy of 97.662% on the apple leaf disease dataset. Compared with VGG-16, ResNet-50, AlexNet, and B-CNN, the recognition accuracy is improved by 0.10764, 0.05407, 0.04649, respectively, from 0.0312. The effectiveness of the DBNet method in apple leaf disease identification has been verified.Table 8
Accuracy of the network model.
Network modelAccuracy (accuracy) %AlexNet96.898VGG1682.255ResNet5083.013B-CNN84.542DBNet87.662Figure9 with table data in 6 depicts the variance in the accuracy of different models. In the figure, each network model shows an overall upward trend. In the first 20 training cycles, the accuracy of each network model fluctuates wildly. The accuracy improves significantly in the last 10 training cycles and gradually stabilizes. AlexNet contains five convolutional layers and three fully connected layers; the network depth is eight layers; and the accuracy rate on the dataset is only 86.898%. The VGG-16 network depth is sixteen layers, which is 0.05357 higher than that of AlexNet, indicating that the network depth significantly influences the accuracy. Experimenting with the deeper ResNet-50 network, the accuracy rate is improved by 0.00758 compared with VGG-16, and the improvement is insignificant. Therefore, after the network depth reaches a certain level, the neural network is deepened again, and the effect is not expected to be considerable. Still, with the web, as the model’s depth increases, the model becomes more complex. Compared with the single-branch network ResNet-50 with the highest accuracy, the B-CNN network composed of two VGG-16s in the experiment is improved by 0.01529, indicating that the dual-branch network is better than the single-branch in the task of apple leaf disease identification. The dual-branch network can extract more image features. The DBNet proposed, which includes the MS branch and DA branch, can better alleviate the adverse effects of complex background environment and the similarity of lesions compared with the two VGG-16 branches of the B-CNN, and the accuracy rate is also high. It reached 97.662%.Figure 9
Comparison of accuracy changes of different network models.To verify the complexity of the DBNet model, this paper analyses it in terms of model parameters (Params), floating-point operations (FLOPs), and CPU prediction time, as shown in Table9. AlexNet is affected by the depth of the network, and the model parameters, the number of floating-point operations, and the prediction time are the least affected, but its accuracy is also affected. ResNet-50 adopts the bottleneck module, which reduces the number of parameters compared with VGG-16, and B-CNN makes the model too complicated due to the dual branch network and bilinear pooling. Although the DBNet in this article uses two VGG-16 as the primary network, the DA branch in DBNet replaces the standard convolution in VGG-16 with a depth-wise separable convolution, and the MS branch uses a combination of shallow information and in-depth information. The cross-layer connection dramatically reduces the number of model parameters, floating-point operations, and prediction time.Table 9
Network complexity.
Network modelModel parameters (106)Number of floating-pointoperations (109)CPU prediction time (ms)AlexNet6.77482.1729ResNet5033.51839.19180VGG16238.35 631.84502B-CNN391.58 862.691139DBNet24.03218.89226


## 3.3. Ablation Experiment

To verify the influence of different combinations of convolution types on the MS branch, 9 groups of ablation experiments were set up, and the results are shown in Table10. When a single 3 × 3 convolution kernel is increased to multiple convolution kernels, the network width in the MS branch increases. The hole convolution experiment with 3 different hole rates is set to have an upward trend; when the hole rate d = 4, the accuracy rate decreases, and finally, the whole convolution with hole rate d = 2, 3 is selected. The 3 × 1 and 1 × 3 asymmetric convolutions boost the nonlinearity of the network, improve the expressiveness of the model, and additionally learn the features of the horizontal and vertical kernels, increasing the diversity of captured features and thereby improving the classification accuracy. To verify the influence of the MS branch and DA branch on DBNet network performance, four kinds of network structures VGG + VGG, VGG + MS, VGG + DA, and MS + DA ablation experiments were set up, respectively. After 30 rounds of training, the accuracy changes of the four network structures in the validation set are shown in Figure 9. The accuracy rates of the VGG + MS structure and VGG + DA structure are better than those of the VGG + VGG structure, and the MS + DA structure has the highest accuracy, indicating that the MS branch and DA branch have a promoting effect on apple leaf disease identification.Table 10
Comparison of accuracy changes of different network models.
SerialAlexNetVGG-16ResNet-50B-CNNDBNet10.50.60.530.590.5450.550.680.560.640.5990.60.720.610.680.65130.650.760.650.720.69170.70.790.710.760.74210.750.820.750.820.79250.80.860.780.850.82290.850.890.830.90.89Table11 identifies different apple leaf diseases by the four network structures of VGG + VGG, VGG + MS, VGG + DA, and MS + DA. In Table 11, the accuracy of the VGG + MS structure in the identification of five kinds of apple leaf diseases was higher than that of the VGG + VGG structure, indicating that MS branches can extract multiscale features and alleviate the adverse effects of complex background environments and uneven distribution of lesion shape [17]. On the contrary, the VGG + DA structure has high recognition accuracy for rust, grey spot, and spotted leaf disease, indicating that the DA branch can use a multidimensional attention method to alleviate the adverse effects of the similarity of lesions effectively. Therefore, this article combines the MS branch and the DA branch to form a DBNet, which can refine the recognition accuracy effectively and alleviate the adverse effects of complex background environments and lesion similarity.Table 11
Ablation experiments.
Apple leaf diseaseVGG + VGGVGG + MSVGG + DAMS + DAMosaic disease98.658100100100Brown spot disease97.99499.05599.23299.939Rust94.6895.49995.67596.846Gray spot disease96.35796.56498.22898.643Spotted leaf disease94.63795.44896.75798.005Five apple leaf diseases95.04997.05897.79198.662As given in Table12, when comparing the DBNet network to other leaf disease detection models, its accuracy improves by 0.02843, 0.02412, 0.0144, and 0.0125, respectively. This clearly shows that the proposed DBNet model has certain advantages as compared to others in detecting apple leaf disease.Table 12
Comparison of experiment results.
ModelsAccuracy (Accuracy) %[18]95.819[19]96.25[20]97.222[21]97.412DBNet96.662


## 4. Conclusion

The article presented a dual-branch network identification method for apple leaf diseases. The presented method can effectively combine the multiscale and multidimensional attention features of lesion images to effectively alleviate the complex background environment and the similarity of lesions to apple leaf diseases. It is verified through experiments that the presented method has high recognition accuracy. At the same time, a new attention mechanism is proposed, which can extract attention features in three dimensions: channel, width, and height. The experimental comparison demonstrated that the presented method may enhance the recognition accuracy effectively. Future work may include investigations incorporating the multidimensional attention mechanism into additional computer vision tasks such as semantic segmentation.



---

*Source: 9504186-2023-02-08.xml*