## 3 Spectral Library and Dataset
### The Proposed Hybrid DenseNet Architecture  
Recently, a few studies [28; 29] show that the architecture of multi-dimensional CNNs is beneficial for the models to learn the highly discriminative features compared to those single-dimensional CNNs and thus gets better classification performance. Inspired by their findings, we create a hybrid DenseNet classification model containing a 1D spectral branch and a 2D spatial branch parallelly. Besides, in order to remove the spectral redundancy and reduce computational burden accordingly, Principle Component Analysis method (PCA) is applied over the original HSI data along the spectral dimension before classification. The architecture of the proposed model is shown in Figure 8.  
Let the active HSI data be denoted by \(\mathbf{I}\in\mathbf{R}^{H\times W\times B}\), where \(\mathbf{I}\) is the active HSI data cube captured by the imager, \(H\) is the height, \(W\) is the width, and \(B\) is the number of spectral bands. PCA helps to reduce the number of spectral bands from \(B\) to \(N\), while maintaining the same spatial dimensions. We represent the PCA reduced data cube by \(\mathbf{M}\in\mathbf{R}^{H\times W\times N}\), where \(\mathbf{M}\) is the modified input after PCA. The flow diagram of the proposed method is shown in Figure 8, where the number of the principle components is set to be 40 in the experiments, i.e., \(N=40\). Besides, in our experiments, the value of \(H\times W\times B\) is \(568\times 696\times 174\). In order to use the deep-learning based image classification technology, the active HSI data cube should be divided into small overlapping 3D patches, the truth labels of which are decided by the labels of their central pixels. The 3D patches, \(\mathbf{P}\in\mathbf{R}^{S\times S\times N}\) from \(\mathbf{M}\), covering the \(S\times S\) window and \(N\) principle components. In this way, we create the training set using the spectral library, and the testing set using the dataset, separately. In our experiments, \(S\) has a value of 7. The size of input patches is \(7\times 7\times 40\). In the 1D spectral branch, input patches are convolved with 1D convolutional kernels along the spectral dimension, with the kernel size of \(1\times 1\times 7\). In the first convolutional layer, where there are 24 1D kernels, we use \"valid\" padding method and set the down sampling stride to be (1,1,2), which are used to reduce the number of spectral channels. After the first convolutional layer, 24 feature maps  
Figure 8: The architecture of the proposed hybrid DenseNet model. Figure 7: Example of a densely-connected architecture with four layers (\(l=4\)). with a shape of \((7\times 7\times 17)\) are obtained. Then, the dense spectral block containing 3 convolutional layers is used to learn the spectral features. In the dense block, each convolutional layer has 12 kernels with a \(1\times 1\times 7\) size, and the stride of the convolutional operations is set as (1,1,1) to maintain the size of feature maps. After the dense spectral block, 60 feature maps with the shape of \((7\times 7\times 17)\) are generated. After another convolutional layers with kernel size of \(1\times 1\times 17\), 60 feature maps with the shape of \((7\times 7\times 1)\) are obtained. Finally, the Global Average Pooling layer is employed to get the feature vector with size of \(1\times 60\). Details of the layers of the spectral branch are listed in Table 4.  
Meanwhile, input patches are delivered to the 2D spatial branches, and the first convolutional layer's kernel size is set to \(1\times 1\times 40\), which compresses the spectral bands into one dimension. After that, 24 feature maps in the shape of \((7\times 7\times 1)\) are generated. Then, the dense spatial block containing 3 convolutional layers is attached. Each convolutional layer in the dense spatial block has 12 channels with a \(3\times 3\times 1\) kernel size. After the dense spatial block, 60 feature maps in the shape of \((7\times 7\times 1)\) are obtained.