# View Synthesis with Scene Recognition for Cross-View Image Localization
## 4 Performance Evaluation for View Synthesis
### Evaluation Using Jain Index  
To determine if the new images created by Style Transfer were accurately and equally carrying the features from the reference image and patch image, we used the Jain Index [35] to measure the fairness of each attribute extracted from the images. For \(I_{P}\), \(I_{R}\), and \(I_{O}\), we obtained the top five attributes from \(A_{P}\), \(A_{R}\), and \(A_{O}\), respectively. Since Style Transfer has three different models, as mentioned, i.e., mountain, church, and bedroom, each model had four sets of patch images with the matching keyword: cloudy, forest, overcast, and roads. From these image sets, twelve images were taken with five attributes, for a total of sixty attributes across the twelve images. If a previous attribute from \(A_{P}\) or \(A_{R}\) was seen in \(A_{O}\), that attribute was added to the total amount of correct attributes carried over, which defined the rule of a _strict_ set of matching. Only attributes that were in the previous images \(A_{P}\) or \(A_{R}\) would be tallied. Then, they would be divided by the total amount of attributes to obtain the average accuracy of the model, which is expressed in (3). \[Accuracy=\frac{\sum_{n=1}^{N}\sum_{k=1}^{K}(A_{nk})}{N\times K} \tag{3}\]  
If any attributes related to the respective image groups were seen, those attributes were added to the total number of matched attributes carried over. For example, if the \(A_{O}\) in the forest image set had any attributes related to forests, flora, or fauna, those attributes would be added to the correct attributes. Once the total matched attributes carried over had been tallied, they were then divided by the total amount of attributes in the image set to produce the average that the respective model would have in carrying an attribute over to \(A_{O}\). With this, we can find the average accuracy percentage in each table. \(\sum_{n=1}^{N}\sum_{k=1}^{K}(A_{nk})\) represents the summation of all the matched attributes from each image in the category, where \(N\) represents the total number of images and \(K\) represents the total number of \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{5}{c}{**Keywords for Filtering Patch Images**} \\ \hline \hline \(M_{p}\) & **Cloudy** & **Forest** & **Overcast** & **Roads** \\ \hline Mountain & O & O & X & O \\ Church & O & O & X & X \\ Bedroom & X & X & X & X \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Subjective evaluation of the quality of the synthesized view on different pre-trained models in Figure 5. The “X” shows that the model did not retain the original structure. The “O” shows that the model kept the original structure of the reference image. attributes. \(A_{R}(n)\), \(A_{P}(n)\), and \(A_{O}(n)\) are the attribute lists of the \(n\)th reference, patch image, and output image, respectively. \(A_{nk}\) is a binary value, which is equal to 1 if the \(K\)th attribute of the \(n\)th image belongs to the attribute list of the \(n\)th reference image or the nth patch image. \[O_{R}(n)=\sum_{k=1}^{K}G_{nk} \tag{4}\]  
\[O_{P}(n)=\sum_{k=1}^{K}F_{nk} \tag{5}\]  
\[R(n)=Jain(O_{R}(n),O_{P}(n))\]  
\[=\frac{\left(O_{R}(n)+O_{P}(n)\right)^{2}}{2\left(O_{R}(n)^{2}+O_{P}(n)^{2} \right)^{2}} \tag{6}\]  
In Equation (4), \(G_{nk}\) is equal to 1 if \(K\)th \(A_{R}(n)\) belongs to \(A_{O}(n)\). Otherwise, \(G_{nk}\) is equal to 0. In Equation (5), \(F_{nk}\) is equal to 1 if Kth \(A_{P}(n)\) belongs to \(A_{O}(n)\). Otherwise, \(F_{nk}\) is equal to 0. Equation (6), which is known as the Jain Index, judges the fairness of how many attributes from \(A_{R}\) and \(A_{P}\) carried over to \(A_{O}\). Fairness means the attributes of the output image came from the attributes of the reference image and patch image equally. For example, if the total attributes of \(A_{O}\) were four, then two attributes should have come from \(A_{R}\) and two attributes should have come from \(A_{P}\). Table 4 shows the average accuracy when only one attribute is selected from the image.