Abstract

Changes in land cover will cause the changes in the climate and environmental characteristics, which has an important influence on the social economy and ecosystem. The main form of land cover is different types of soil. Compared with traditional methods, visible and near-infrared spectroscopy technology can classify different types of soil rapidly, effectively, and nondestructively. Based on the visible near-infrared spectroscopy technology, this paper takes the soil of six different land cover types in Qingdao, China orchards, woodlands, tea plantations, farmlands, bare lands, and grasslands as examples and establishes a convolutional neural network classification model. The classification results of different number of training samples are analyzed and compared with the support vector machine algorithm. Under the condition that Kennard–Stone algorithm divides the calibration set, the classification results of six different soil types and single six soil types by convolutional neural network are better than those by the support vector machine. Under the condition of randomly dividing the calibration set according to the proportion of 1/3 and 1/4, the classification results by convolutional neural network are also better. The aim of this study is to analyze the feasibility of land cover classification with small samples by convolutional neural network and, according to the deep learning algorithm, to explore new methods for rapid, nondestructive, and accurate classification of the land cover.

1. Introduction

Land cover is a direct result of the interaction between natural environment and human activities. It mainly focuses on describing the natural properties of the earth’s surface which has specific time and space characteristics. Changes in land cover will cause the changes in the climate and environmental characteristics, which has an important influence on the social economy and ecosystem [1, 2]. The main form of land cover is different types of soil, including cultivated lands, woodlands, grasslands, and bare lands. Therefore, it is of great significance to classify different types of soil quickly and accurately for land cover research, soil investigation, and mapping.

The early classification method is the land use topographic map obtained by combining with the actual ground survey. Now the classification technology of the remote sensing image is mostly used to realize the classification of different types of soil [35]. Visible and near-infrared spectroscopy technology is a fast, nondestructive measurement method. It has been widely used in medicine, agriculture, oil, and other fields [69]. The spectral analysis method indirectly obtains useful information of the substance. Through establishing an effective correction model between the spectrum and the information, the result is obtained [1012]. The spectral technology is introduced into the classification of soil, the remote sensing image information is replaced by the spectral information, and different types of soil models are established. It can be fast and nondestructive to realize the classification of soil.

Deep learning is modeled by simulating the neural structure of the human brain and has made breakthroughs in applications such as image recognition and speech recognition [13, 14]. The commonly used classification method support vector machine (SVM) is a machine learning method based on statistical learning theory. The idea behind SVM is that input samples are projected from low-dimensional feature space to high-dimensional space through nonlinear mapping, which allows data in the low-dimensional space that is not linearly separable to transform into linearly separable data in the high-dimensional space [15, 16]. While deep learning is to transform the original signal layer by layer, transform the feature representation in the original space to the new feature space. And it automatically learns to get the hierarchical feature representation, and the classification result is achieved [17]. Convolution neutral network (CNN) is a network structure in the deep learning, which has a good effect in the classification of images and makes the CNN method widely used in many fields [18, 19]. CNN is a new and nondestructive method for the application of quality monitoring of agricultural products, includes the detection and grading of fruits, vegetables, etc., and has achieved good results [20, 21]. CNN is usually used for classification modeling with large sample size.

Based on the visible near-infrared spectroscopy technology, this paper took six different types of soil orchards, woodlands, tea plantations, farmlands, bare land, and grasslands in Qingdao, China, as examples, and established a convolutional neural network classification model. The classification results under the conditions of different label samples were analyzed, and the classification results with the shallow network SVM were compared. In this paper, the aim is to analyze the feasibility of land cover classification with small samples by CNN and explore new methods for rapid, nondestructive, and accurate classification of soil according to the CNN.

2. Materials and Methods

2.1. Experimental Materials

Ten sampling points were collected from Licang District, Laoshan District, Chengyang District, and Jiaozhou District, Qingdao, China. The sampling points selected are the areas with consistent color and vegetation coverage, and the spatial distribution of each sampling point was relatively uniform. The basic overview of each sampling point is shown in Table 1. When sampling, a shovel was used to take 0–20 cm of surface soil, and about 1 kg of each soil sample was collected. Then it was put in a sealed bag and the label was stuck. It was brought back to the lab, air-dried, and ground, and it was passed through 0.45 mm nylon sieve. Finally, it was put into the sealing bag, a number was made, and it was marked for subsequent testing.

The collected soil samples were divided into orchards (S1 and S2), woodlands (S3, S5, and S8), tea plantations (S4), farmlands (S6 and S9), bare lands (S7), and grasslands (S10), as shown in Table 1. There were 26 orchards soil samples, 86 woodlands soil samples, 13 tea plantations soil samples, 73 farmlands soil samples, 13 bare lands soil samples, and 60 grasslands soil samples, totaling 271 soil samples. The contents of total carbon (TN), total phosphorus (TP), and total potassium (TK) in six types of soil were measured. The average contents of TN, TP, and TK in each type of soil are shown in Table 2, and the nutrient contents of each type of soil are different.

2.2. Spectrum Acquisition

The spectrum of soil samples was collected by QE-65000 spectrometer of ocean optics. Dh-2000 of ocean optics was used as the light source, and the QE-65000 spectrometer of ocean optics (slit 10 µm) was connected by Y-type optical fiber of ocean optics. A set of spectral acquisition system for soil nutrients was built (Figure 1). The contact end of the optical fiber and the sample was fixed by the probe bracket, keeping the incident light 45°. Under the bracket was a self-made sample box, where a spherical sample slot that coincided with the fiber inlet of the bracket was designed to hold approximately 1–2 g soil samples.

Through this spectrum sampling system, the sampling interval of the collected spectrum was 1 nm, and the integration time was 600 ms. The spectrum range was 200–1100 nm. Each soil sample was measured for 5 times, and the average spectral reflectance was taken. Because the noise in the front and back part of the reflection spectrum had a great influence, the spectrum data of 226–975 nm were retained. The average reflection spectrum of the soil samples of orchards, woodlands, tea plantations, farmlands, bare land, and grasslands are shown in Figure 2. The overall trend of the six types of soil was consistent, and the reflection spectrum increased with the increase in wavelength. But the reflection spectrum of the six types of soil was different.

2.3. Kennard–Stone Algorithm

Based on the Euclidean distance between two samples, the Kennard–Stone algorithm (K-S algorithm) realizes the sample partition selection with strong representativeness and uniform distribution range [22, 23]. In this paper, the algorithm is used to classify and select the representative calibration set and test set. The process of Kennard–Stone algorithm is as follows: (1) calculate the Euclidean distance between the two samples, select the samples with the largest Euclidean distance (more than 2); (2) calculate the Euclidean distance between the remaining samples and the selected samples in Step (1); (3) for each remaining sample, select the samples with the shortest distance from the selected samples and then select the samples corresponding to the relative longest distance among the shortest distances; and (4) repeat Step (3) until the number of selected samples is greater than or equal to the set value.

2.4. Deep Learning Algorithm

In 2006, the concept of deep learning was first proposed by Hinton [24]. Its main point is that multihidden layer artificial neural network has excellent feature learning ability, which can effectively overcome the training difficulties of deep neural network by layer pretraining “layer wise training” [17]. It is based on the sample data through certain training methods to get the deep network structure of multiple levels. The deep network structure obtained by deep learning contains a large number of single elements (neurons). Each neuron is connected with a large number of other neurons. The connection strength (weight) between neurons modifies and determines the function of the network during the learning process. The deep network structure obtained by deep learning conforms to the characteristics of the neural network. The commonly used deep learning models include deep belief network (DBN) [25, 26], stacked autoencoders (SAE) [27, 28], and convolutional neural network (CNN) [29, 30].

The basic structure of CNN is composed of input layer, convolutional layer, pooling layer, full connection layer, and output layer. Generally, several convolution layers and pooling layers are selected. The alternate setting of the convolutional layer and the pooled layer is adopted. It is that one convolutional layer is connected to a pooled layer, and the pool layer is then connected to a convolutional layer. The characteristics of convolutional neural network are that the original signal is directly used as the input of the network, which avoids the complex feature extraction and image reconstruction process in the traditional recognition algorithm. In the convolution stage, the weight sharing structure is used to reduce the number of weights and the complexity of the network model. At the same time, in subsampling stage, we use the principle of local correlation to subsample the feature map, which can effectively reduce the amount of data processing while retaining the useful structure information [29, 30].

The convolutional layer can be defined as follows [31]:where is the input two-dimensional image, and represent the filters and bias of the convolutional layer, is the output feature maps of the convolutional layer, represents the convolutional operator, and denotes the rectified linear unit (ReLU) activation function. In this paper, the spectral data of each soil sample are one-dimensional vector, which is converted into two-dimensional matrix. The data band of soil spectrum is 226–975 nm, with a total of 749 wavelength points. The one-dimensional spectrum vector of 749  1 is converted into a two-dimensional matrix of 28  28. The reflectances corresponding to 28 wavelength points are taken from each column in order until 749 reflectances are all ranked in the two-dimensional matrix of 28  28, and the rest positions are filled with 0. That is the input two-dimensional image. Convolution operation is used to transform the spectral image data. The spectral feature information can be extracted more effectively by combining the neighboring information of spectral image. There are two convolutional layers with six 5  5 kernels.

The pooling layer is behind the convolution layer and used for reducing the computational complexity [31]. The pooling layer can be defined aswhere is the output feature maps of the pooling layer, denotes the ReLU activation function, and represents a max-pooling function. In this paper, there are two pooling layers with six 2  2 kernels.

The fully connected layer is used to extract more deep feature [31]. The fully connected layer can be defined aswhere and represent the filters and bias of the fully connected layer, is the output feature maps of the fully connected layer, and denotes the ReLU activation function. This paper has one fully connected layer. The specific process of CNN is shown in Figure 3. The classifier adopts softmax classifier, and the loss function is mean squared error.

2.5. Classification Evaluation Standard

The classification evaluation standard uses the number of correct prediction classification sample divided by the number of all soil samples . The formula is as follows: . The closer the is to 100%, the better the classification effect.

3. Results and Discussion

3.1. Six Types of Soil Classification Results: Dividing the Calibration Set by Kennard–Stone Algorithm
3.1.1. Dividing Calibration Set and Test Set by Kennard–Stone Algorithm

K-S algorithm was used to divide calibration set and test set of six types of soil. The total number of the calibration set samples ranged from 40 to 150, with an interval of 10, and the rest was test set. The accuracy of classification model in small sample was analyzed. The number of the calibration set samples for each type of soil is shown in Table 3.

3.1.2. Classification Results of Different Types of Soil Based on Convolutional Neural Network

The spectrum of each calibration set of soil sample was transformed into two-dimensional matrix and then was substituted into CNN network for training. The iterations are 2000. The classification results of the calibration set and the test set are shown in Table 4. When the total number of the calibration set samples was 150–100, the classification accuracy of the calibration set and the –test set was all 100%. The classification results of six types of soil in 90-40 calibration set, including orchards, woodlands, tea plantations, farmlands, bare land, and grasslands, are shown in Table 5.

From Table 4, the classification accuracy of the calibration set and the test set was 100% based on CNN, when the total number of the calibration set was from 150 to 100. When the total number of the calibration set was from 90 to 40, the classification result of 90 calibration set samples is 98.89%, and the rest was 100%. The classification accuracy of more than 60 labeled samples in the test set is more than 98%.

According to Table 5, the general trend of the test set classification results in the type 1 orchards was that the classification results decreased with the decrease of the label samples. When the total number of the calibration set was 60-90, the classification accuracy was more than 88%; when the total number of the calibration set was 50-40, the classification accuracy dropped rapidly, and the number of the wrong samples in the test set was more than 10. The general trend of the test set classification results in the type 2 woodlands was the same with that of the type 1 orchards. When the total number of the calibration set was 90-70, the classification accuracy was 100%; when the total number of the calibration set was 60-40, there were a small number of samples with wrong judgment in the test set, the number of the wrong samples was 1, 1, and 2, respectively. In the type 3 tea plantations, when the total number of the calibration set was 90-60, the classification accuracy rate was 100%; when the total number of the calibration set was 50-40, the samples with wrong judgment of the test set were 1 and 2, respectively. Because the number of the tea plantations samples was less, the classification accuracy rate was lower when the number of the calibration set was 40. In the type 4 farmlands, when the total number of the calibration set was 90-60, the classification accuracy was 100%; when the total number of the calibration set was 50-40, the accuracy was above 96%. In the type 5 bare land, except for the calibration set of 90 samples, there was a wrong sample. And there was no other sample of misjudgment, that is, the accuracy is 100%. When the total number of the calibration set was 90-40 in the type 6 grasslands, the correct rate is 100%.

3.1.3. Classification Results of Different Soil Types Based on Support Vector Machine

The spectrum of each calibration set soil sample transformed into two-dimensional matrix was substituted into SVM for training. The kernel function chose the radial basis function (RBF). The classification results of the calibration set and the test set are shown in Table 6. When the total number of samples in the calibration set was 150-100, the classification accuracy of the test set was 100%. Table 7 shows the classification results of six types of soil in the 90-40 samples of the calibration set.

From Table 6 by SVM algorithm, when the total number of calibration set was 150-40, the accuracy of the calibration set decreased with the decrease in the number of the label samples, and all of which were above 90%. Similar to CNN algorithm, when the total number of the calibration set algorithm was 150-100, the classification accuracy of the test set was all 100% by SVM. When the total number of the calibration set was 90-40, the accuracy of classification results in the test set was 98.90%, 98.43%, 98.51%, 98.10%, 91.86%, and 91.34%, respectively. Similar to CNN algorithm, the classification accuracy of more than 60 label samples in the test set was more than 98%. But in the 50-40 label samples, the classification accuracy of the test set dropped sharply, lower than 92%.

According to Table 7, when the total number of the calibration set in the type 1 orchards was 90-60, the correct rate was more than 75%; when the total number of the calibration set was 50 and 40, the wrong samples were more, and the correct rate of the classification was less than 40%. Most of the type 1 were judged as the type 2, indicating that the spectra of the orchards and woodlands were similar. SVM could not predict the category of the orchards correctly. In the type 3 tea plantations, when the total number of the calibration set was 80 and 40, there were 1 and 5 wrong samples, respectively, and the accuracy of the rest was 100%. In the type 5 bare land, except for the calibration set of 40, there was a wrong sample, and other samples were judged right, i.e., the accuracy was 100%. In the type 2 woodlands, the type 4 farmlands, and the type 6 grasslands, when the total number of the calibration set was 90-40, the accuracy was 100%.

3.2. Six Types of Soil Classification Results: Dividing the Calibration Set by Random Method

The number of the soil samples in six types of calibration set had different proportion in their categories by Kennard–Stone algorithm. To further verify the availability of CNN algorithm, the same proportion of soil samples from each type was randomly selected and classified by CNN and SVM algorithm. Table 8 shows that 1/3, 1/4, and 1/5 samples of each soil type were taken as the calibration set samples, respectively. Table 9 shows the classification results of different types of soil based on CNN and SVM by random method. Figures 4(a)4(c), respectively, show the classification results of each type of soil (orchards, woodlands, tea plantations, farmlands, bare land, and grasslands) based on SVM and CNN under the number of different proportion calibration set, which were displayed in the form of histogram.

According to Table 9, the classification accuracy of the calibration set by CNN was 100%. The 1/3 and 1/4 proportion of the calibration set by SVM had a wrong sample, respectively, and the accuracy in the 1/5 proportion was 100%. In the test set, when the proportion was 1/3 and 1/4, the accuracy of CNN was higher than that of SVM; when the proportion was 1/5, the accuracy of SVM was slightly higher than that of CNN, with 88.37% and 87.91%, respectively. In general, when the number of samples was relatively large, the classification results of CNN were better than those of SVM. When the number of samples was small, the SVM had certain advantages.

According to Figure 4, when the proportion of the calibration set was 1/3 and 1/4, the classification accuracy of six types of soil by CNN was not lower than that by SVM. The classification accuracy of the farmlands, the grasslands, and the woodlands was above 95%, followed by the orchards (88.24%, 84.12%) and the tea plantations (77.78%, 70%). The classification accuracy of the bare land was the worst, which was 66.67% and 60%. When the proportion of the calibration set was 1/5, the classification accuracy by CNN and SVM in the woodlands and the farmlands was the same, with good classification effect (97.1%, 100%). Followed by the grasslands, the classification accuracy was both higher than 85%, and SVM was slightly better than CNN, with 89.36%. The classification results of the orchards were poor, which was about 60%, and the classification accuracy of the bare land was the lowest, which was lower than 50%. In the classification results of six types of soil, CNN was better than SVM in general.

The proportions of 1/3, 1/4 and 1/5 soil samples were taken as the calibration set samples, respectively. Table 10 shows the classification results of different types of soil based on CNN and SVM by randomly dividing the calibration set 10 times.

According to Table 10, the classification results of CNN were better than that of SVM in 1/3 proportion and 1/4 proportion, but it was lower than that of SVM in 1/5 proportion. With the reduction of calibration set samples, the classification accuracy of CNN and SVM test set decreased. Compared with SVM, the classification accuracy of CNN decreased more obviously.

4. Discussion

4.1. The Feasibility of Land Cover Classification with Small Samples by Convolutional Neural Network

The essence of CNN is that each convolutional layer contains a certain number of convolution kernels. Compared with the traditional neural network, CNN reduces the number of training weights and computational complexity through weight sharing. CNN is to input the original data directly into the network and conduct network learning in the training data invisibly. It can avoid manual feature extraction and realize automatic classification. CNN is mostly used for the image information classification with a large amount of data, which contains a large number of label samples. But it is seldom used in a small amount of data classification.

In this paper, the spectral data are one-dimensional vector. To be suitable for CNN, it is transformed into two-dimensional vector for convolution and other operations, and a better classification effect is obtained. The first reason is that CNN can extract more deep and abstract features of the spectrum, which is conducive to the classification of different types of soil. The second reason is that it takes 2000 iterations to improve the accuracy of the model. SVM is a commonly used classification method, which has a good classification effect in small label samples. In this paper, compared with SVM, CNN not only has a good classification effect in the condition of more training samples but also has a better classification effect in small label samples. However, with the continuous reduction of training samples, SVM has more advantages. Therefore, CNN can be applied to the classification of land cover with small samples, but SVM is still better for the training set with too small samples.

4.2. The Advantages of the Kennard–Stone Algorithm

In this paper, different methods are used to divide the samples of the calibration set, and different classification results are obtained. The results by K-S algorithm are good. K-S algorithm is mainly used to select representative samples from the original sample to establish the model. The main idea is to select the spectrum samples with large differences as training samples and uses the samples with relatively close spectrum to predict, so as to avoid the uneven distribution of training samples. However, dividing the calibration set by random method has uncertainty and limited distribution information, so the calibration results by KS classification are better.

4.3. The Analysis of the Different Number of Samples in the Calibration Set

In the analysis of the classification results of various types of soil samples, the woodlands, farmlands, and grasslands, all show good classification effects under the different number of samples in the calibration set. However, the classification accuracy of orchards, tea plantations, and bare lands is not stable. More training samples can have a higher classification accuracy, and less training samples have a decline in classification accuracy. The total samples of forest land, farmland, and grassland are more than 60, while the total samples of orchards, tea plantations, and bare lands are less, with 26, 13, and 13, respectively. CNN cannot train enough calibration set samples, so it cannot get a better classification model, and the test set classification prediction is poor.

5. Conclusion

Based on the visible near-infrared spectroscopy technology, this paper takes six different types of soil (orchards, woodlands, tea plantations, farmlands, bare land, and grasslands) in Qingdao, China, as examples, and establishes a convolutional neural network classification model. The classification results under the conditions of different number label samples are analyzed, and the classification results with the shallow network SVM are compared. Under the condition that Kennard–Stone algorithm divides the calibration set, the classification results of six different soil types and single six soil types by convolutional neural network are better than those by the support vector machine. The classification accuracy of the test set is above 95%. Under the condition of randomly dividing the calibration set according to the proportion of 1/3 and 1/4, the classification results by convolutional neural network are also better. The classification accuracy of the test set is over 87%. According to the deep learning algorithm, the aim is to explore a new method for rapid, nondestructive, and accurate classification of the land cover. This method has guiding significance for the practical application of soil investigation and mapping.

Data Availability

The raw/processed data required to reproduce these findings cannot be shared at this time as the data also form part of an ongoing study.

Conflicts of Interest

The authors report there are no conflicts of interest.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (nos. 3130041 and U2006209) and the Natural Science Foundation of Shandong Province, China (nos. ZR2018LD007 and ZR2017BB037).