# Generative Adversarial Networks for Zero-Shot Remote Sensing Scene Classification
## 2 Methods
### Feature Generation Module
Our model relies on a high-performance generator that aims to generate image features similar to real image features. We used the semantic features of the unseen class to synthesize image features; if it differs significantly from the real image feature distribution, the synthesized image features cannot represent the real image features of the class. The classifier trained with synthetic image features of unseen categories misclassifies the real unseen class images. We must ensure that the image features generated by the generator are similar to the real image features, which allows us to achieve higher recognition results for the unseen categories. We were inspired by [16], and used the semantic regression module to constrain the generator. This can be represented as:  
\[L_{SR}=E_{x\sim P_{i}}[||e(y)-R(G(z,e(y)|\theta_{G})|\theta_{R})||_{2}^{2}] \tag{4}\]  
where \(R\) denotes the regressor, and \(\theta_{R}\) denotes the parameters of \(R\). \(\theta_{R}\) is pre-trained on seen classes using the following function:  
\[L_{R}=\underset{\theta_{R}}{\text{min}}||e(y)-R(x|\theta_{R})||_{2}^{2} \tag{5}\]  
**Class-Prototype Loss. ** In remote sensing images, the features of different sample images in the same class vary greatly and have diversity within the class. We used classification loss, the semantic regression module cannot guarantee that the image features synthesized by the generator are diverse. To ensure that the synthesized image features are more consistent with the distribution of real remote sensing image features and avoid the generated image features being too homogeneous, we introduced class-prototype loss in training to constrain the generator. We were inspired by [17]. First, we clustered each class of real remote sensing image features to obtain \(k\) clusters. We obtained class prototype sample image features by averaging all sample image features in each group, and can obtain \(k\) class prototype samples for each real remote sensing image class. In the training process, we hoped that the image features synthesized by the generator would be close to at least one class prototype vector in the same class. Let \(X_{n}^{y}\) denote the \(n\)th cluster of category \(y\), each category has \(k\) clusters. In this study, we set \(k=5\) for simplicity. Let \(p_{n}^{y}\) denote the \(n\)th prototype vector of category \(y\), each category has \(k\) prototype vectors. The \(p_{n}^{y}\) is defined as:  
\[p_{n}^{y}=\frac{1}{N_{n}^{y}}\sum_{x_{i}\in X_{n}^{y}}x_{i} \tag{6}\]  
where \(N_{n}^{y}\) denotes the number of samples in cluster \(X_{n}^{y}\). For the generated fake features \(\hat{x}\), we also define the prototype vector \(\hat{p}_{n}^{y}\) as:  
\[\hat{p}_{n}^{y}=\frac{1}{N_{n}^{y}}\sum_{\hat{x}_{i}\in X_{n}^{y}}\hat{x}_{i} \tag{7}\]  
We hope that each sample \(\hat{x}\) generated for the category \(y\) is be close to at least one prototype vector \(p^{y}\). This loss can be defined as:  
\[L_{1}=\frac{1}{n}\sum_{i=1}^{n}\underset{j\in[1\mathcal{L}]}{\min}\left\|\hat{ x}_{i}-p_{j}^{y}\right\|_{2}^{2} \tag{8}\]  
where \(n\) represents the number of generated samples for the category \(y\) and \(k\) represents the number of prototype vectors per class. We also hope that the prototype vector of generatedfake features \(\hat{p}_{n}^{y}\) is close to at least a real prototype vector \(p_{n}^{y}\) for the same class, which is formulated as:  
\[L_{2}=\frac{1}{n_{y}}\sum_{y=1}^{n_{y}}\min_{j\in[1,k]}\
orm{\hat{p}_{j}^{y}-p_{ j}^{y}}_{2}^{2} \tag{9}\]  
where \(n_{y}\) represents the number of all categories. Our class-prototype loss can be expressed by the following equation:  
\[L_{\text{{C}PL}}=\lambda_{1}L_{1}+\lambda_{2}L_{2} \tag{10}\]  
With this class-prototype loss for constraint, our model can avoid generating single-view image features and ensure the intra-class diversity of the synthesized image features for remote sensing images.