# A Generative Adversarial Network-Based Fault Detection Approach for Photovoltaic Panel
## 4 Experiment
### Model Evaluation  
In order to verify the effectiveness of the proposed method, this paper compares the ppFDetector with AnoGAN [17], [PERSON]'s method [18], f-AnoGAN [19], GANomaly [20], and Pre-trained Vgg16. Considering that the minimum input size of Vgg16 is 48 \(\times\) 48, we need to enlarge the image from 32 \(\times\) 32 to 48 \(\times\) 48. For a fully supervised model, pre-trained Vgg16, 10, 100 and 200 negative samples are respectively appended to the training set to explore the influence of different numbers of negative samples on the metric of accuracy.  
We take ROC (Receiver Operating Characteristic curve) curve, precision, accuracy, F1 and sensitivity scores as the performance metrics. Precision represents the proportion of examples classified as positive examples that are actually so. The higher the index, the better the performance. Accuracy is the ratio of the number of samples correctly classified by the classifier to the total number of samples for a given test dataset. And the higher the score, the better the model. F1 score can be regarded as a weighted average of the model precision and recall. Its maximum value is 1, and its minimum value is 0. The larger the value, the better the model. Sensitivity refers to the proportion of all positive examples identified to all positive examples. The higher the sensitivity rate, the higher the probability that the actual abnormal sample is predicted. As shown in Table 3, the performance of a fully supervised learning method (i.e., Pre-trained Vgg16) improves by increasing the proportion of negative samples in the training process. Although the precision and accuracy performance metrics of vgg16(200) are higher than ppFDetector, ppFDetector does not require a negative sample during training, and so ppFDetector outperforms the Pre-trained Vgg16 method with limited negative samples. Table 4 shows the performance comparison between the ppFDetector, semi-supervised learning methods (i.e., [PERSON]'s method and GANomaly), and unsupervised learning methods (i.e., AnoGAN and f-AnoGAN). It shows that the ppFDetector only training with positive samples is generally competitive with  
Figure 14: Output results of abnormal detection. (**a**) Test image; (**b**) Output result of abnormal area; (**c**) Line chart of latent vector \(z\); (**d**) Scatter plot of Error \(M(z,\vec{z})\).  
state-of-the-art semi-supervised and unsupervised methods, and achieves higher accuracy, precision, F1 score and sensitivity.  
Figure 15a illustrates the comparison of ROC curves of semi-supervised and unsupervised methods. The ppFDetector outperforms in PV panel fault detection. The AUC value of the ppFDetector is 0.943, which is 0.041 higher than GANomaly, and 0.052, 0.06 and 0.035 higher than [PERSON]'s method, AnoGAN and f-AnoGAN, respectively. Figure 15b illustrates the ROC curves of the ppFDetector and fully supervised method (i.e., Pre-trained Vgg16) with a different number of negative samples in the training process. The ppFDetector outperforms Pre-trained Vgg16 with limited negative samples, i.e., 10 and 100. But when the Pre-trained Vgg16 trained with more than 200 negative samples, its performance is close to ppFDetector.