# GPU Parallel Implementation for Real-Time Feature Extraction of Hyperspectral Images
## 5 Results and Discussion
### Parallel Implementation
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Indian Pines**} \\ \hline
**Func.No.** & **OpenCV** & **PyTorch** & **CUDA** & **Speedup1** & **Speedup2** \\ \hline
4 & 12 & 46.040 & **0.527** & 22.8 & 90.8 \\ \hline
5 & 1030 & 57.854 & **2.707** & 380.5 & 21.4 \\ \hline
6 & 18 & 21.94 & **1.011** & 17.8 & 21.7 \\ \hline
7 & 16 & 7.987 & **0.706** & 22.7 & 11.3 \\ \hline
9 & 26 & 5068.039 & **1.165** & 22.3 & 4350.2 \\ \hline
10 & 218 & **9.978** & 138.013 & 1.6 & 0.07 \\ \hline \multicolumn{5}{c}{**Pavia University scene**} \\ \hline
**Func.No.** & **OpenCV** & **PyTorch** & **CUDA** & **Speedup1** & **Speedup2** \\ \hline
4 & 35 & 186.989 & **1.994** & 17.6 & 93.8 \\ \hline
5 & 2244 & 167.535 & **7.618** & 292.2 & 21.9 \\ \hline
6 & 86 & 63.938 & **5.650** & 15.2 & 11.3 \\ \hline
7 & 440 & 33.916 & **1.851** & 237.7 & 18.3 \\ \hline
9 & 114 & 23096.868 & **6.594** & 17.3 & 3502.7 \\ \hline
10 & 31 & **3.989** & 26.111 & 1.2 & 0.15 \\ \hline \multicolumn{5}{c}{**Salinas scene**} \\ \hline
**Func.No.** & **OpenCV** & **PyTorch** & **CUDA** & **Speedup1** & **Speedup2** \\ \hline
4 & 49 & 243.348 & **1.876** & 26.1 & 129.7 \\ \hline
5 & 5516 & 264.292 & **13.602** & 405.5 & 19.4 \\ \hline
6 & 104 & 81.782 & **5.299** & 19.6 & 15.4 \\ \hline
7 & 418 & 41.890 & **1.739** & 240.4 & 24.1 \\ \hline
9 & 130 & 26728.524 & **6.230** & 20.9 & 4290.3 \\ \hline
10 & 263 & **11.971** & 141.452 & 1.86 & 0.08 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Execution times (ms) and acceleration factors of several key functions of different versions. time is in a stable numerical region in different datasets, reflecting the parallel potential of parallel implementation and more suitable for real-time processing of big data. Based on the above analysis, in the UAV experiment in Section 5.3, we only evaluate the implementation of CUDA and OpenCV. In addition, Figure 8 shows the percentages of data transfer time between the host and the device for the proposed parallel method and gives the percentage of three specific data transmission operations in the total data transfer time. The transfer of adjusted data between the host and the device includes two processes, one is to transfer the results of the second SVD to the host, and the other is to transfer the reshaped data to the device. They are all marked with red lines in Figure 3. It can be observed from the Figure 8 that the data transfer time accounts for a small proportion of the total time of the proposed parallel method, and the maximum is less than 6.5%, which means that the pure calculation time occupies more than 93.5%, which proves the effectiveness of the parallel algorithm, that is algorithm performance depends on processing units themselves (not by data transfers), which is also an important issue for GPU parallelization. At the same time, it can also be obtained that the total time of data transmission is mostly concentrated on the input of the raw data and the output of the final result data. Combined with the results in Table 7, this parallel algorithm has advantages in solving large-scale problems. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Datasets** & **PyTorch** & **OpenCV** & **CUDA** & **Speedup1** & **Speedup2** \\ \hline Indian Pines & 6968 & 1394 & **528.923** & 2.6 & 13.2 \\ \hline Pavia University & 26,594 & 3091 & **473.736** & 6.5 & 56.1 \\ \hline Salinas scene & 31,250 & 6662 & **529.153** & 12.6 & 59.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Run time (ms) of INAPC of different versions for the three datasets. Figure 8: _Cont._