1. Introduction
Wheat is a grass plant and a cereal crop widely grown worldwide. The earliest regions where wheat was cultivated can be traced back to the Mesopotamian region, and China is one of the countries that started planting wheat relatively early. As one of the three significant grains, almost all wheat is used for consumption, with only about one-sixth used as feed. Wheat is a major cereal crop in China and one of the most significant staple crops in Gansu Province [
1]. Gansu Province is characterized by complex and diverse climatic conditions and ecological environments, as well as rich types of wheat varieties; so, wheat grows all year round in Gansu Province [
2]. There are many varieties of wheat, and, for specific reasons, different varieties of wheat seeds may be mixed, resulting in low seed purity. It is, therefore, of great importance and value to use scientific technology to identify wheat varieties quickly and accurately.
The advancement of agricultural information technology has led to the widespread implementation of technologies like image processing and machine vision in the agricultural sector, such as monitoring crop pests and diseases, detecting defects in agricultural products, grading the quality of agricultural products, and recognizing crop varieties [
3,
4,
5,
6,
7,
8]. Niu et al. [
9] used a combination of transfer learning and the DenseNet network to create a tomato-leaf disease-recognition model that successfully classified these diseases, achieving a test accuracy of up to 97.76%, which is significantly higher compared to a model that combines transfer learning with AlexNet, VGG, and MobileNet. Zhang et al. [
10] proposed a method for peanut-pod grade image recognition based on a transfer-learning approach for five grades of peanut-pod images and constructed a network model (Penut_AlexNet model, PA model) suitable for peanut-pod grade recognition by using the AlexNet model for transfer learning. Through a series of parameter tuning, the final PA model obtained 95.43% accuracy in peanut-pod grade classification recognition. Yang and other scholars [
11] improved the VGG16 network and applied it to 16 peanut varieties and seven corn-seed varieties. The recognition accuracy of peanut pods is 96.7%, and the recognition accuracy of corn seeds is 90.1%, which outperforms other classical convolutional neural networks in terms of performance.
From the above literature, we can know that crop-variety classification using convolutional neural networks (CNNs) is feasible, and it is capable of achieving high classification accuracy. However, it is worth noting that these models suffer from the challenges of large parameter sizes, long training times, and models that are not easy to use. Lu et al. [
12] improved the ResNet model by proposing A-ResNet50 and A-ResNet101, which are soft-attention mechanism-based methods for small-sample hops pest and disease recognition. These two methods achieved 93.27% and 93.11% accuracy on the test set, which provides a useful reference for solving the problem of high-precision recognition on small-sample datasets. Lingwal et al. [
13] identified 15 varieties of wheat grains using CNNs with an accuracy of 97.53%. Vidyarthi et al. [
14] proposed to combine the deep convolutional neural networks (DCNN) with a soft attention mechanism to identify the pests of hops. DCNN was combined with image-processing technology to grade cashew kernels. The results show that the accuracy of both Inception-V3 and ResNet50 neural networks can reach 98.4%.
Considering the limitations of storage and computing power when deployed on mobile and embedded devices, the complexity of the model needs to be compressed as much as possible under the premise of guaranteeing the accuracy. Wang et al. [
15] proposed an improved lightweight disease-recognition model called Multiscale ResNet. The model achieved an accuracy of 93.05% on seven disease image data collected in a real environment. It is worth noting that, although the accuracy of Multiscale ResNet decreased by about 3.72% relative to the ResNet18 model, this reduction came at the cost of reducing the training parameters by about 93% and shrinking the overall model size by about 35%, which provides a useful direction for the deployment of vegetable disease-recognition systems at the edge. Zhang [
16] used 56 peach varieties as the research object and improved ResNet18. The improved model has a Top-1 accuracy of 94.4% and a model size of 14.35 MB, which improves the accuracy by 20% compared with the traditional SVM algorithm and improves the accuracy by 1.2% and 1% compared with mainstream networks such as VGG and MobileNetv3 and loses a very small amount of accuracy compared with ResNet18 in exchange for a threefold model reduction. Li et al. [
17] used RegNet, a lightweight transfer-learning network, for the identification of five apple-leaf diseases in the field environment and compared the proposed method with networks, such as ShuffleNet, EfficientNet-B0, MobileNetV3, and Vision Transformer, and concluded that the transfer-learning-based method can identify apple-leaf diseases quickly and accurately.
As the number of model layers increases, the problem of gradient vanishing in CNN training leads to degradation of classification performance. ResNet [
18] prevents gradient vanishing and overfitting by introducing residual cells and short connections but under-utilizes the output information from the convolutional layers inside the residual cells as well as the information transfer across the cells. DenseNet [
19] proposes a denser connectivity approach that allows convolutional layers to be connected to each other, but only considers connections between layers within a unit and does not take full advantage of the multiple layers of features extracted from different units. Zhang et al. [
20] proposed ResDenNet, which combines the advantages of ResNet and DenseNet while considering the connection between different units and the fusion of multilayer features to achieve better results in image super-resolution reconstruction. Gao [
21] proposed a local dense residual network (LDRNet) to address the problem of redundancy of weight parameters caused by the widening and deepening of convolutional neural networks in the image-classification tasks, experimented with it on four datasets of different types and sizes, i.e., cifar10, cifar100, STL-10, and Flowers-17, and compared it with some classical networks. Sets were experimented with and compared with some classical networks. The results show that LDRNet achieves higher test accuracies on these datasets, proving its effectiveness and superiority in image-classification tasks. Xu [
22] proposed a modified residual dense block convolution neural network (MRDB-CNN) for two important fundus image-research tasks: fundus image quality classification and fundus diabetic retinopathy (DR) discrimination. The experimental results show that the accuracy of the MRDB-CNN network is higher than other network structures for both fundus image quality classification and fundus DR discrimination, reaching 99.90% and 94.90% accuracy, respectively. Wei et al. [
23] designed a residual dense network model suitable for hyperspectral image classification and achieved 98.71%, 99.31%, and 97.91% classification accuracy on Indian Pines data, University of Pavia data, and Salinas data, respectively.
In recent years, attention mechanisms have been the focus of extensive research, being introduced into CNNs to enhance their learning capabilities. In 2019, Cao et al. [
24] proposed GCNet (global context network), whose core component is the global context block (GCBlock), which helps the network to better understand the relationships between objects and the overall context of an image by capturing global information in the image in an efficient way. Yan [
25] improved the YOLOv3 target-detection model by introducing the GCNet attention module and the custom feature fusion module as a way to detect tea pests and diseases, and the experimental results show that the improved model can detect tea pests and diseases very well. Zhang [
26] added GCBlock to ResNet and introduced Gram’s Corner field, which fully extracted the time-associated features and long-distance dependence and achieved a 99.37% classification accuracy for arrhythmia signals. Using the SMS augmentation algorithm and two-way feature fusion, Zeng et al. [
27] proposed a citrus huanglong disease-detection method for natural contexts, which also introduces a global-context module to establish effective long-range dependencies. The experimental results show that the method achieves an average accuracy of 84.8% and outperforms other target-detection algorithms such as SSD, RetinaNet, YOLO v3, YOLO v5s, Faster RCNN, and Cascade RCNN in terms of performance.
The above findings show that convolutional neural networks present excellent performance in image-classification tasks, with the ability to automatically learn and extract complex features from images. However, CNNs also have some shortcomings, including the problems of cumbersome network structure, a large number of parameters, and the inability to completely guarantee classification accuracy. It is also worth noting that residual dense networks have been widely used in hyperspectral image classification but are relatively less used in RGB image-classification tasks. Meanwhile, GCBlock is usually used in target-detection tasks, while its use is more limited in image-classification tasks, especially in the field of wheat-seed image recognition. Therefore, in view of the aforementioned problems, the aim of this paper is to find out the wheat-variety recognition model suitable for smart terminal deployment with few parameters, low computing power, and high classification accuracy. The main contributions of this paper are as follows:
We collected images of 29 mainstream wheat seeds in Gansu Province and prepared the data by screening and different image-preprocessing techniques to ensure the quality and availability of the data and to provide sufficient training data for the model to learn effectively;
Since the residual dense network and global context module are less applied in the field of wheat-seed image recognition, we improve the network based on the ResNet18 network by combining the idea of a dense network in the residual module and introducing the global context module and propose the GC_DRNet network model for wheat-seed recognition;
Comparative experiments and analyses of the proposed GC_DRNet model with other classical networks on the self-constructed wheat-seed dataset and the public dataset CIFAR-100 have fully demonstrated the fast accuracy of the GC_DRNet model, which can successfully identify the varieties of wheat seeds.
In conclusion, the research objectives of this study are to develop an efficient model for wheat-seed image classification to address the challenges of convolutional neural networks in this task, to provide a solution with fewer parameters and suitable for smart terminal applications, to provide a research idea for wheat-variety recognition, and to provide technical support for practical wheat-seed recognition applications.
The remainder of this paper is structured as follows. The experimental wheat-image dataset, the methodology used in this paper, and the constructed network-recognition model are described in
Section 2. The experimental setup and training of the model, as well as the analysis and evaluation of the experimental results, are described in
Section 3. This is summarized in
Section 4.