# Buckwheat Disease Recognition Based on Convolution Neural Network
## 4 Buckwheat Disease Recognition Based on Convolution Neural Network
### Convolutional Neural Network Structure of Buckwheat Disease Recognition
#### 4.2.1 Improved Network Based on Inception Structure  
Inception is a local topology network, which performs multiple convolution operations or pooling operations for the input image in parallel, and stitches all the output into a very deep feature map. Because different convolution operations and pooling operations such as \(1\times 1\), \(3\times 3\) or \(5\times 5\) can obtain different information of buckwheat disease image, parallel processing of these operations and combining all the results will obtain better image characterization of buckwheat disease.  
The convolutional neural network used in this article is shown in Figure 6. The network adds two inceptions based on the traditional structure. The specific processing was as follows:  
1. Firstly, the input of the network was the image of buckwheat disease with the size of 64 \(\times\) 64. The diseased image was then convolved with 136 9 \(\times\) 9 convolution kernels to obtain 136 56 \(\times\) 56 feature maps.
2. The feature map was sent to the inception 1 structure, and all inception structures in the network used the same convolution operation, that is, the size of the feature map was not changed. The size of the pooling window in all subsequent pooling layers was 2 \(\times\) 2. Therefore, the size of the feature map becomes 28 \(\times\) 28 after pooling.
3. 200 5 \(\times\) 5 convolution kernels are adopted to obtain 200 24 \(\times\) 24 feature maps. After these feature maps were sent to the inception 2 structure, 264 5 \(\times\) 5 convolution kernels were used to obtain 264 8 \(\times\) 8 feature maps after pooling.
4. After pooling, it entered the last layer of the convolution layer. The number of convolution kernels was 520 and the size was 3 \(\times\) 3. Therefore, 520 feature maps of 2 \(\times\) 2 will be obtained. Finally, the results were processed by the full connection layer and the classified output layer.  
In the initial two convolutional layers of the network, the receptive fields of size 9 \(\times\) 9 and 5 \(\times\) 5 were used, respectively. In order to extract more feature information of different scales in a smaller receptive field, and expand the width and depth of the network, we added inception 1 and inception 2 structures to the two convolution layers, respectively. Their structures are shown in Figures 7 and 8. In the inception 1 structure, 1 \(\times\) 1, 3 \(\times\) 3, 1 \(\times\) 5, 5 \(\times\) 1, 4 different scales of convolution kernels are used for multi-channel feature extraction, and the channels are fused. The top 1 \(\times\) 1 convolution can effectively reduce the number of channels in the input feature map and the computation cost of the network. The 1 \(\times\) 1 convolution at the bottom layer is to restore the number of channels in the input feature map and maintain the consistency of the number of channels in the input and output feature maps. In the inception 2 structure, the input feature map becomes smaller, so the 1 \(\times\) 5 and 5 \(\times\) 1 convolutions in inception 1 are replaced with 1 \(\times\) 3 and 3 \(\times\) 1 convolutions, respectively. In the second convolutional layer, the number of input feature maps is more than that of the first layer, so the number of channels in the structure is increased from 30 to 40.  
Figure 6: The structure of the convolutional neural network for buckwheat disease identification.  
Conv represents the convolution operation according to the size of the convolution kernel; the number of channels represents the number of convolution channels.