# Best Frame Selection to Enhance Training Step Efficiency in Video-Based Human Action Recognition
## 4 Result and Discussion
### Implementation Details  
All HAR methods [30; 31; 32; 33] were trained using random frames and video cropping with static or blind cropping regions. All of these methods were implemented on a system with the following hardware specifications:  
* CPU: i7 9700;
* RAM: 16 GB;
* Video Graphics Card: Nvidia RTX 2070 super;  
and using the MATLAB 2020 software. A total of 70% of the videos in each dataset were used for training, and the remaining 30% were used as test data. The training and test data were the same in all comparisons. In all implementations, the number of input frames was set to 20, and the video dimensions were set to 111 by 111. The remaining part is the data augmentation used in previous methods, which could not be used in the proposed method due to the optimal selection of frames and cropping regions. To generate different data without losing optimality, a total of four different time intervals with or without overlap with a difference of at least five frames were selected  
Figure 4: (**Left**): video energy map; (**right**): the resulting image after applying the average filter. Figure 5: (**Left**): the frames of the shortened video; (**center**): result obtained by the proposed method; (**right**): the result of a bad random ROI selection. based on the computed energy (Part 5 of Algorithm 1, and 200 different cropping regions were selected from the maximum values obtained in Section 3 of Algorithm 2. Hence, 800 quasi-random candidates could be created for each video as data augmentation. In the first step of the implementation, a constant \(P_{\textit{trresh}}\) equal to 0.1 was assumed, and different gradient masks were tested in the proposed method Part 2 of Algorithm 2. The obtained results are given in Tables 1 and 2. The results show that the Sobel mask is the best choice as the gradient operator for adaptive frame cropping in both datasets. In some cases, especially in the training phase of HMDB51, the other masks showed better accuracy, but in the overall evaluation, due to the test set results, the Sobel mask was found as the best choice. In the second step of the implementation, the Sobel mask was chosen as the gradient operator, and the \(P_{\textit{trresh}}\) effect in the proposed method was analyzed (Part 3 of Algorithm 1. The obtained results are presented in Tables 3 and 4, which show that the \(P_{\textit{trresh}}\) value directly affects the accuracy, and that the value of 0.1 was the best candidate. In some cases, especially in the training phase of HMDB51, the other values showed a better accuracy, but in the overall evaluation in both datasets, the value of 0.1 was the best choice. The results obtained with the selected parameters are given in Table 5. In addition, the relative change in the training time was calculated according to:  
\[Relative_{\textit{Runtime}}=\frac{\textit{HAR with Proposed Method Training time}}{\textit{HAR without Proposed Method Training time}} \tag{1}\]  
Accordingly, the results of Table 6 show the advantage of the proposed method in terms of \(Relative_{\textit{Runtime}}\).